Novell exteNd
Director 5.2 API

com.sssw.cm.api
Interface EbiDocQuery

All Superinterfaces:
EbiDocMetaDataQuery, EbiMetaDataQuery, EbiQuery, EbiQueryBase, Serializable

public interface EbiDocQuery
extends EbiMetaDataQuery, EbiDocMetaDataQuery, Serializable

Objects that implement this interface represent queries that are used to search for Documents maintained by the Content Manager.

The queries are executed against the Document metadata of two kinds:

  1. Document Metadata - fields such as ID, Author, Title, Date Created, etc.
  2. Document Extension Metadata - the application-specific Metadata fields, e.g. "Director", "Year of release", "Cast", "Genre" for Documents of type "Movie Review".

The user is expected to create the Query in three steps:

  1. Specify all the selected properties using the select... methods;
  2. Specify a WHERE clause by using the where... methods, combining various WHERE subclauses via the EbiQueryExpression.andExpression, orExpression, and negateExpression methods, and then using the setWhere method off com.sssw.fw.api.EbiQueryExpression;
  3. Specify the ORDER BY clause(s) by using the orderBy... methods.

Example:

 // Get the Content Manager Delegate
 EbiContentMgmtDelegate cmgr = com.sssw.cm.client.EboFactory.getDefaultContentMgmtDelegate();

 // Create a Document Metadata Query object
 EbiDocQuery docQuery = (EbiDocQuery)cmgr.createQuery(EbiDocQuery.DOC_QUERY);

 // We're interested in Movie Reviews
 EbiDocType type = cmgr.getDocumentType(ctx, "Movie Review");
 EbiQueryExpression queryExpr = docQuery.whereDocTypeID(
    type.getDocTypeID(), EbiDocQuery.ROP_EQUAL, false);

 // The author we're interested in is Smith
 EbiQueryExpression authorExpr = docQuery.whereAuthor("Smith", EbiDocQuery.ROP_EQUAL, false);

 // We want movie reviews whose author is "Smith"
 queryExpr.andExpression(authorExpr);

 // We want reviews of movies whose Genre is "Action"...
 EbiQueryExpression fieldExpr = docQuery.whereFieldValue_ByName(
    "Genre", "Action", EbiDocQuery.ROP_EQUAL, false);

 // ... or whose Genre is "Thriller"
 EbiQueryExpression fieldExpr2 = docQuery.whereFieldValue_ByName(
    "Genre", "Thriller", EbiDocQuery.ROP_EQUAL, false);

 // Field value = "Action" or Field value = "Thriller"
 fieldExpr.orExpression(fieldExpr2);
 fieldExpr.parenthesize();

 // Movie reviews whose author is "Smith", and Genre is Action or Thriller
 queryExpr.andExpression(fieldExpr);

 // The WHERE clause is ready, set it into the Query
 docQuery.setWhere(queryExpr);

 // Execute the query
 Iterator iterResults = cmgr.query(context, docQuery).iterator();

 // Process the query results
 while (iterResults.hasNext()) {
    EbiDocument doc = (EbiDocument)iterResults.next();
    System.out.println(doc);
 }
 

See Also:
EbiQueryExpression, EbiContentMgmtDelegate.findElements(EbiContext, EbiQuery), EbiContentMgmtDelegate.findElements(EbiContext, EbiQuery, boolean), EbiContentMgmtDelegate.findElementsFiltered(EbiContext, EbiQuery), EbiContentMgmtDelegate.findElementsFiltered(EbiContext, EbiQuery, boolean)

Field Summary
static String DOC_QUERY
          The query type of "Document Query"
 
Fields inherited from interface com.sssw.fw.api.EbiMetaDataQuery
LDAP_APPROX, LDAP_BETWEEN, LDAP_ENDS_WITH, LDAP_EQUAL, LDAP_GEQ, LDAP_GREATER, LDAP_IN, LDAP_LEQ, LDAP_LESS, LDAP_MATCH, LDAP_PRESENCE, LDAP_STARTS_WITH, OP_BETWEEN, OP_IN, OP_IS_NULL, ROP_EQUAL, ROP_GEQ, ROP_GREATER, ROP_LEQ, ROP_LESS, SOP_ENDS_WITH, SOP_EQUALS_IGNORE_CASE, SOP_LIKE, SOP_LIKE_IGNORE_CASE, SOP_STARTS_WITH
 
Method Summary
 Integer getMaxRows()
          Gets the MaxRows attribute for the query.
 String getRepositoryID()
          Gets the repository id associated with the query
 void setMaxRows(Integer maxRows)
          Specifies a maximum number of rows to be returned by the query.
 EbiQueryExpression whereAuthor(String value, int op, boolean not)
          Specifies the seach condition of "where document author..."
 EbiQueryExpression whereAuthorBetween(String first, String last, boolean not)
          Specifies the search condition of "where document author between..."
 EbiQueryExpression whereAuthorIn(String[] values, boolean not)
          Specifies the search condition of "where document author in..."
 EbiQueryExpression whereCategoryID(String value, int op, boolean not)
          Specifies the seach condition of "where category ID..."
 EbiQueryExpression whereCategoryIDBetween(String first, String last, boolean not)
          Specifies the search condition of "where category ID between..."
 EbiQueryExpression whereCategoryIDIn(String[] values, boolean not)
          Specifies the search condition of "where category ID in..."
 EbiQueryExpression whereContentSize(int value, int op, boolean not)
          Specifies the search condition of "where document's content size..."
 EbiQueryExpression whereContentSizeBetween(int first, int last, boolean not)
          Specifies the search condition of "where content size between..."
 EbiQueryExpression whereContentSizeIn(int[] values, boolean not)
          Specifies the search condition of "where document's content size is in..."
 EbiQueryExpression whereCreateDate(Timestamp value, int op, boolean not)
          Specifies the search condition of "where document's creation date/time..."
 EbiQueryExpression whereCreateDateBetween(Timestamp first, Timestamp last, boolean not)
          Specifies the search condition of "where document creation date/time between..."
 EbiQueryExpression whereCreateDateIn(Timestamp[] values, boolean not)
          Specifies the search condition of "where document creation date/time in..."
 EbiQueryExpression whereDocAbstract(String value, int op, boolean not)
          Specifies the search condition of "where document's abstract..."

Note: this method will only work if the database platform for the database where Portal is deployed, is Sybase Adaptive Server Anywhere.
 EbiQueryExpression whereDocAbstractBetween(String first, String last, boolean not)
          Specifies the search condition of "where document abstract between..."

Note: this method will only work if the database platform for the database where Portal is deployed, is Sybase Adaptive Server Anywhere.
 EbiQueryExpression whereDocAbstractIn(String[] values, boolean not)
          Specifies the search condition of "where document abstract in..."

Note: this method will only work if the database platform for the database where Portal is deployed, is Sybase Adaptive Server Anywhere.
 EbiQueryExpression whereDocID(String value, int op, boolean not)
          Specifies the search condition of "where document ID..."
 EbiQueryExpression whereDocIDBetween(String first, String last, boolean not)
          Specifies the search condition of "where document ID between..."
 EbiQueryExpression whereDocIDIn(String[] values, boolean not)
          Specifies the search condition of "where document ID in..."
 EbiQueryExpression whereDocTypeID(String value, int op, boolean not)
          Specifies the search condition of "where document type ID..."
 EbiQueryExpression whereDocTypeIDBetween(String first, String last, boolean not)
          Specifies the search condition of "where document type ID between..."
 EbiQueryExpression whereDocTypeIDIn(String[] values, boolean not)
          Specifies the search condition of "where document type ID in..."
 EbiQueryExpression whereDocTypeName(String value, int op, boolean not)
          Specifies the search condition of "where document type name..."
 EbiQueryExpression whereDocTypeNameBetween(String first, String last, boolean not)
          Specifies the search condition of "where document type name between..."
 EbiQueryExpression whereDocTypeNameIn(String[] values, boolean not)
          Specifies the search condition of "where document type name in..."
 EbiQueryExpression whereExpirationDate(Timestamp value, int op, boolean not)
          Specifies the search condition of "where document's expiration date..."
 EbiQueryExpression whereExpirationDateBetween(Timestamp first, Timestamp last, boolean not)
          Specifies the search condition of "where expiration date/time ID between..."
 EbiQueryExpression whereExpirationDateIn(Timestamp[] values, boolean not)
          Specifies the search condition of "where expiration date/time in..."
 EbiQueryExpression whereFieldID(String value, int op, boolean not)
          Specifies the seach condition of "where extension metadata field ID..."
 EbiQueryExpression whereFieldIDBetween(String first, String last, boolean not)
          Deprecated.  
 EbiQueryExpression whereFieldIDIn(String[] values, boolean not)
          Specifies the seach condition of "where extension metadata field ID in..."
 EbiQueryExpression whereFieldValue_ByName(String fieldName, Object fieldValue, int op, boolean not)
          Specifies the seach condition of "where extension metadata field's value..."
 EbiQueryExpression whereFieldValue(Object fieldValue, int op, boolean not)
          Specifies the seach condition of "where extension metadata field's value..."
 EbiQueryExpression whereFieldValue(String fieldID, Object fieldValue, int op, boolean not)
          Specifies the seach condition of "where extension metadata field's value..."
 EbiQueryExpression whereFieldValueBetween_ByName(String fieldName, Object first, Object last, boolean not)
          Specifies the search condition of "where extension metadata field's value between..."
 EbiQueryExpression whereFieldValueBetween(Object first, Object last, boolean not)
          Specifies the search condition of "where extension metadata field's value between..."
 EbiQueryExpression whereFieldValueBetween(String fieldID, Object first, Object last, boolean not)
          Specifies the search condition of "where extension metadata field's value between..."
 EbiQueryExpression whereFieldValueIn_ByName(String fieldName, Object[] values, boolean not)
          Specifies the search condition of "where extension metadata field's value in..."
 EbiQueryExpression whereFieldValueIn(Object[] values, boolean not)
          Specifies the search condition of "where extension metadata field's value in..."
 EbiQueryExpression whereFieldValueIn(String fieldID, Object[] values, boolean not)
          Specifies the search condition of "where extension metadata field's value in..."
 EbiQueryExpression whereFolderID(String value, int op, boolean not)
          Specifies the search condition of "where folder ID..."
 EbiQueryExpression whereFolderIDBetween(String first, String last, boolean not)
          Specifies the search condition of "where folder ID between..."
 EbiQueryExpression whereFolderIDIn(String[] values, boolean not)
          Specifies the search condition of "where folder ID in..."
 EbiQueryExpression whereLinkChildren(EbiQueryExpression expr, boolean not)
          Deprecated. EbiJdbcMetaDataQuery
 EbiQueryExpression whereLinkParents(EbiQueryExpression expr, boolean not)
          Deprecated. EbiJdbcMetaDataQuery
 EbiQueryExpression whereLockedBy(String value, int op, boolean not)
          Specifies the search condition of "where document's 'locked by' field..."
 EbiQueryExpression whereLockedByBetween(String first, String last, boolean not)
          Specifies the search condition of "where document's 'locked by' field between..."
 EbiQueryExpression whereLockedByIn(String[] values, boolean not)
          Specifies the search condition of "where document's 'locked by' field in..."
 EbiQueryExpression whereLongVarCharFieldValue(String fieldValue, int op, boolean not)
          Specifies the search condition of "where extension metadata field's value..." for a field whose data type is EbiDocField.FT_LONGVARCHAR.
 EbiQueryExpression whereMimeType(String value, int op, boolean not)
          Specifies the search condition of "where document's MIME type..."
 EbiQueryExpression whereMimeTypeBetween(String first, String last, boolean not)
          Specifies the search condition of "where MIME type between..."
 EbiQueryExpression whereMimeTypeIn(String[] values, boolean not)
          Specifies the search condition of "where document's MIME type is in..."
 EbiQueryExpression whereName(String value, int op, boolean not)
          Specifies the seach condition of "where document name..."
 EbiQueryExpression whereNameBetween(String first, String last, boolean not)
          Specifies the search condition of "where document name between..."
 EbiQueryExpression whereNameIn(String[] values, boolean not)
          Specifies the search condition of "where document name in..."
 EbiQueryExpression whereOriginator(int value, int op, boolean not)
          Specifies the search condition of "where Originator..."
 EbiQueryExpression whereOriginatorBetween(int first, int last, boolean not)
          Specifies the search condition of "where originator between..."
 EbiQueryExpression whereOriginatorIn(int[] values, boolean not)
          Specifies the search condition of "where Originator is in..."
 EbiQueryExpression whereParentDocID(String value, int op, boolean not)
          Specifies the search condition of "where document's parent document ID..."
 EbiQueryExpression whereParentDocIDBetween(String first, String last, boolean not)
          Specifies the search condition of "where document's parent document ID between..."
 EbiQueryExpression whereParentDocIDIn(String[] values, boolean not)
          Specifies the search condition of "where document's parent document ID in..."
 EbiQueryExpression wherePublishDate(Timestamp value, int op, boolean not)
          Specifies the search condition of "where document's publish date..."
 EbiQueryExpression wherePublishDateBetween(Timestamp first, Timestamp last, boolean not)
          Specifies the search condition of "where document publish date/time between..."
 EbiQueryExpression wherePublishDateIn(Timestamp[] values, boolean not)
          Specifies the search condition of "where document publish date/time in..."
 EbiQueryExpression wherePublishStatus(int value, int op, boolean not)
          Specifies the search condition of "where document's publish status..."
 EbiQueryExpression wherePublishStatusBetween(int first, int last, boolean not)
          Specifies the search condition of "where publish status between..."
 EbiQueryExpression wherePublishStatusIn(int[] values, boolean not)
          Specifies the search condition of "where document's publish status is in..."
 EbiQueryExpression whereRepositoryID(String value, int op, boolean not)
          Specifies the seach condition of "where repository ID..."
Note: by default, the query will search for documents that belong to the repository that the query is associated with.
Note: this method does not provide the ability to run searches across multiple data sources.
 EbiQueryExpression whereRepositoryIDBetween(String first, String last, boolean not)
          Specifies the search condition of "where repository ID between..."
 EbiQueryExpression whereRepositoryIDIn(String[] values, boolean not)
          Specifies the seach condition of "where repository ID in..."
Note: by default, the query will search for documents that belong to the repository that the query is associated with.
Note: this method does not provide the ability to run searches across multiple data sources.
 EbiQueryExpression whereStatus(String value, int op, boolean not)
          Specifies the search condition of "where document's status..."
 EbiQueryExpression whereStatusBetween(String first, String last, boolean not)
          Specifies the search condition of "where status between..."
 EbiQueryExpression whereStatusIn(String[] values, boolean not)
          Specifies the search condition of "where document status in..."
 EbiQueryExpression whereSubtitle(String value, int op, boolean not)
          Specifies the search condition of "where document's subtitle..."
 EbiQueryExpression whereSubtitleBetween(String first, String last, boolean not)
          Specifies the search condition of "where document subtitle between..."
 EbiQueryExpression whereSubtitleIn(String[] values, boolean not)
          Specifies the search condition of "where document subtitle in..."
 EbiQueryExpression whereTitle(String value, int op, boolean not)
          Specifies the seach condition of "where document title..."
 EbiQueryExpression whereTitleBetween(String first, String last, boolean not)
          Specifies the search condition of "where document title between..."
 EbiQueryExpression whereTitleIn(String[] values, boolean not)
          Specifies the search condition of "where document title in..."
 EbiQueryExpression whereUpdateTime(Timestamp value, int op, boolean not)
          Specifies the search condition of "where document's update date/time..."
 EbiQueryExpression whereUpdateTimeBetween(Timestamp first, Timestamp last, boolean not)
          Specifies the search condition of "where document update date/time between..."
 EbiQueryExpression whereUpdateTimeIn(Timestamp[] values, boolean not)
          Specifies the search condition of "where document update date/time in..."
 EbiQueryExpression whereUpdateUser(String value, int op, boolean not)
          Specifies the seach condition of "where document update user..."
 EbiQueryExpression whereUpdateUserBetween(String first, String last, boolean not)
          Specifies the search condition of "where document update user between..."
 EbiQueryExpression whereUpdateUserIn(String[] values, boolean not)
          Specifies the search condition of "where document update user in..."
 
Methods implemented from interface com.sssw.fw.api.EbiMetaDataQuery
getSelectedColumnIndices, getWhere, isHierarchical, setWhere
 
Methods implemented from interface com.sssw.cm.api.EbiDocMetaDataQuery
orderByAuthor, orderByContentSize, orderByCreateDate, orderByDocAbstract, orderByDocID, orderByDocTypeID, orderByDocTypeName, orderByExpirationDate, orderByFolderID, orderByLockedBy, orderByMimeType, orderByName, orderByParentDocID, orderByPublishDate, orderByPublishStatus, orderByRepositoryID, orderByStatus, orderBySubtitle, orderByTitle, orderByUpdateTime, orderByUpdateUser, selectAuthor, selectContentSize, selectCreated, selectDocAbstract, selectDocTypeID, selectDocTypeName, selectEncoding, selectExpirationDate, selectFolderID, selectLockedBy, selectMimeType, selectName, selectParentDocID, selectPublishDate, selectPublishStatus, selectStatus, selectSubtitle, selectTitle, selectUpdateTime, selectUpdateUser
 

Field Detail

DOC_QUERY

public static final String DOC_QUERY
The query type of "Document Query"
Method Detail

whereDocID

public EbiQueryExpression whereDocID(String value,
                                     int op,
                                     boolean not)
Specifies the search condition of "where document ID..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereDocIDIn

public EbiQueryExpression whereDocIDIn(String[] values,
                                       boolean not)
Specifies the search condition of "where document ID in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereDocIDBetween

public EbiQueryExpression whereDocIDBetween(String first,
                                            String last,
                                            boolean not)
Specifies the search condition of "where document ID between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereName

public EbiQueryExpression whereName(String value,
                                    int op,
                                    boolean not)
Specifies the seach condition of "where document name..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereNameIn

public EbiQueryExpression whereNameIn(String[] values,
                                      boolean not)
Specifies the search condition of "where document name in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereNameBetween

public EbiQueryExpression whereNameBetween(String first,
                                           String last,
                                           boolean not)
Specifies the search condition of "where document name between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereAuthor

public EbiQueryExpression whereAuthor(String value,
                                      int op,
                                      boolean not)
Specifies the seach condition of "where document author..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereAuthorIn

public EbiQueryExpression whereAuthorIn(String[] values,
                                        boolean not)
Specifies the search condition of "where document author in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereAuthorBetween

public EbiQueryExpression whereAuthorBetween(String first,
                                             String last,
                                             boolean not)
Specifies the search condition of "where document author between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereTitle

public EbiQueryExpression whereTitle(String value,
                                     int op,
                                     boolean not)
Specifies the seach condition of "where document title..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereTitleIn

public EbiQueryExpression whereTitleIn(String[] values,
                                       boolean not)
Specifies the search condition of "where document title in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereTitleBetween

public EbiQueryExpression whereTitleBetween(String first,
                                            String last,
                                            boolean not)
Specifies the search condition of "where document title between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereFieldID

public EbiQueryExpression whereFieldID(String value,
                                       int op,
                                       boolean not)
Specifies the seach condition of "where extension metadata field ID..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereFieldIDIn

public EbiQueryExpression whereFieldIDIn(String[] values,
                                         boolean not)
Specifies the seach condition of "where extension metadata field ID in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the query expression

whereFieldIDBetween

public EbiQueryExpression whereFieldIDBetween(String first,
                                              String last,
                                              boolean not)
Deprecated.  

Specifies the seach condition of "where extension metadata field ID between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the query expression

whereLongVarCharFieldValue

public EbiQueryExpression whereLongVarCharFieldValue(String fieldValue,
                                                     int op,
                                                     boolean not)
Specifies the search condition of "where extension metadata field's value..." for a field whose data type is EbiDocField.FT_LONGVARCHAR. This method complements whereFieldValue(Object, int, boolean) in order to make sure that if a String value is passed in, the right type of expression is built.
Parameters:
fieldValue - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereFieldValue

public EbiQueryExpression whereFieldValue(Object fieldValue,
                                          int op,
                                          boolean not)
Specifies the seach condition of "where extension metadata field's value..."
Parameters:
fieldValue - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereFieldValueIn

public EbiQueryExpression whereFieldValueIn(Object[] values,
                                            boolean not)
Specifies the search condition of "where extension metadata field's value in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereFieldValueBetween

public EbiQueryExpression whereFieldValueBetween(Object first,
                                                 Object last,
                                                 boolean not)
Specifies the search condition of "where extension metadata field's value between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereFieldValue

public EbiQueryExpression whereFieldValue(String fieldID,
                                          Object fieldValue,
                                          int op,
                                          boolean not)
Specifies the seach condition of "where extension metadata field's value..."
Parameters:
fieldID - the ID of the field
fieldValue - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereFieldValueIn

public EbiQueryExpression whereFieldValueIn(String fieldID,
                                            Object[] values,
                                            boolean not)
Specifies the search condition of "where extension metadata field's value in..."
Parameters:
fieldID - the ID of the field
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereFieldValueBetween

public EbiQueryExpression whereFieldValueBetween(String fieldID,
                                                 Object first,
                                                 Object last,
                                                 boolean not)
Specifies the search condition of "where extension metadata field's value between..."
Parameters:
fieldID - the ID of the field
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereFieldValue_ByName

public EbiQueryExpression whereFieldValue_ByName(String fieldName,
                                                 Object fieldValue,
                                                 int op,
                                                 boolean not)
Specifies the seach condition of "where extension metadata field's value..."
Parameters:
fieldName - the name of the field
fieldValue - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereFieldValueIn_ByName

public EbiQueryExpression whereFieldValueIn_ByName(String fieldName,
                                                   Object[] values,
                                                   boolean not)
Specifies the search condition of "where extension metadata field's value in..."
Parameters:
fieldName - the name of the field
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereFieldValueBetween_ByName

public EbiQueryExpression whereFieldValueBetween_ByName(String fieldName,
                                                        Object first,
                                                        Object last,
                                                        boolean not)
Specifies the search condition of "where extension metadata field's value between..."
Parameters:
fieldName - the name of the field
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereCategoryID

public EbiQueryExpression whereCategoryID(String value,
                                          int op,
                                          boolean not)
Specifies the seach condition of "where category ID..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereCategoryIDIn

public EbiQueryExpression whereCategoryIDIn(String[] values,
                                            boolean not)
Specifies the search condition of "where category ID in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereCategoryIDBetween

public EbiQueryExpression whereCategoryIDBetween(String first,
                                                 String last,
                                                 boolean not)
Specifies the search condition of "where category ID between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereDocTypeID

public EbiQueryExpression whereDocTypeID(String value,
                                         int op,
                                         boolean not)
Specifies the search condition of "where document type ID..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereDocTypeIDIn

public EbiQueryExpression whereDocTypeIDIn(String[] values,
                                           boolean not)
Specifies the search condition of "where document type ID in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereDocTypeIDBetween

public EbiQueryExpression whereDocTypeIDBetween(String first,
                                                String last,
                                                boolean not)
Specifies the search condition of "where document type ID between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereDocTypeName

public EbiQueryExpression whereDocTypeName(String value,
                                           int op,
                                           boolean not)
Specifies the search condition of "where document type name..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereDocTypeNameIn

public EbiQueryExpression whereDocTypeNameIn(String[] values,
                                             boolean not)
Specifies the search condition of "where document type name in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereDocTypeNameBetween

public EbiQueryExpression whereDocTypeNameBetween(String first,
                                                  String last,
                                                  boolean not)
Specifies the search condition of "where document type name between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereCreateDate

public EbiQueryExpression whereCreateDate(Timestamp value,
                                          int op,
                                          boolean not)
Specifies the search condition of "where document's creation date/time..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereCreateDateIn

public EbiQueryExpression whereCreateDateIn(Timestamp[] values,
                                            boolean not)
Specifies the search condition of "where document creation date/time in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereCreateDateBetween

public EbiQueryExpression whereCreateDateBetween(Timestamp first,
                                                 Timestamp last,
                                                 boolean not)
Specifies the search condition of "where document creation date/time between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereSubtitle

public EbiQueryExpression whereSubtitle(String value,
                                        int op,
                                        boolean not)
Specifies the search condition of "where document's subtitle..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereSubtitleIn

public EbiQueryExpression whereSubtitleIn(String[] values,
                                          boolean not)
Specifies the search condition of "where document subtitle in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereSubtitleBetween

public EbiQueryExpression whereSubtitleBetween(String first,
                                               String last,
                                               boolean not)
Specifies the search condition of "where document subtitle between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereDocAbstract

public EbiQueryExpression whereDocAbstract(String value,
                                           int op,
                                           boolean not)
Specifies the search condition of "where document's abstract..."

Note: this method will only work if the database platform for the database where Portal is deployed, is Sybase Adaptive Server Anywhere. This is due to the fact that most database platforms do not support WHERE clauses that involve LONGVARCHAR fields (document abstract is a LONGVARCHAR).

Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereDocAbstractIn

public EbiQueryExpression whereDocAbstractIn(String[] values,
                                             boolean not)
Specifies the search condition of "where document abstract in..."

Note: this method will only work if the database platform for the database where Portal is deployed, is Sybase Adaptive Server Anywhere. This is due to the fact that most database platforms do not support WHERE clauses that involve LONGVARCHAR fields (document abstract is a LONGVARCHAR).

Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereDocAbstractBetween

public EbiQueryExpression whereDocAbstractBetween(String first,
                                                  String last,
                                                  boolean not)
Specifies the search condition of "where document abstract between..."

Note: this method will only work if the database platform for the database where Portal is deployed, is Sybase Adaptive Server Anywhere. This is due to the fact that most database platforms do not support WHERE clauses that involve LONGVARCHAR fields (document abstract is a LONGVARCHAR).

Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

wherePublishDate

public EbiQueryExpression wherePublishDate(Timestamp value,
                                           int op,
                                           boolean not)
Specifies the search condition of "where document's publish date..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

wherePublishDateIn

public EbiQueryExpression wherePublishDateIn(Timestamp[] values,
                                             boolean not)
Specifies the search condition of "where document publish date/time in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

wherePublishDateBetween

public EbiQueryExpression wherePublishDateBetween(Timestamp first,
                                                  Timestamp last,
                                                  boolean not)
Specifies the search condition of "where document publish date/time between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereExpirationDate

public EbiQueryExpression whereExpirationDate(Timestamp value,
                                              int op,
                                              boolean not)
Specifies the search condition of "where document's expiration date..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereExpirationDateIn

public EbiQueryExpression whereExpirationDateIn(Timestamp[] values,
                                                boolean not)
Specifies the search condition of "where expiration date/time in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereExpirationDateBetween

public EbiQueryExpression whereExpirationDateBetween(Timestamp first,
                                                     Timestamp last,
                                                     boolean not)
Specifies the search condition of "where expiration date/time ID between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereLockedBy

public EbiQueryExpression whereLockedBy(String value,
                                        int op,
                                        boolean not)
Specifies the search condition of "where document's 'locked by' field..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereLockedByIn

public EbiQueryExpression whereLockedByIn(String[] values,
                                          boolean not)
Specifies the search condition of "where document's 'locked by' field in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereLockedByBetween

public EbiQueryExpression whereLockedByBetween(String first,
                                               String last,
                                               boolean not)
Specifies the search condition of "where document's 'locked by' field between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereStatus

public EbiQueryExpression whereStatus(String value,
                                      int op,
                                      boolean not)
Specifies the search condition of "where document's status..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereStatusIn

public EbiQueryExpression whereStatusIn(String[] values,
                                        boolean not)
Specifies the search condition of "where document status in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereStatusBetween

public EbiQueryExpression whereStatusBetween(String first,
                                             String last,
                                             boolean not)
Specifies the search condition of "where status between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereParentDocID

public EbiQueryExpression whereParentDocID(String value,
                                           int op,
                                           boolean not)
Specifies the search condition of "where document's parent document ID..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereParentDocIDIn

public EbiQueryExpression whereParentDocIDIn(String[] values,
                                             boolean not)
Specifies the search condition of "where document's parent document ID in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereParentDocIDBetween

public EbiQueryExpression whereParentDocIDBetween(String first,
                                                  String last,
                                                  boolean not)
Specifies the search condition of "where document's parent document ID between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereFolderID

public EbiQueryExpression whereFolderID(String value,
                                        int op,
                                        boolean not)
Specifies the search condition of "where folder ID..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereFolderIDIn

public EbiQueryExpression whereFolderIDIn(String[] values,
                                          boolean not)
Specifies the search condition of "where folder ID in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereFolderIDBetween

public EbiQueryExpression whereFolderIDBetween(String first,
                                               String last,
                                               boolean not)
Specifies the search condition of "where folder ID between..."
Parameters:
first - the start value for the range
last - the end value for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereLinkChildren

public EbiQueryExpression whereLinkChildren(EbiQueryExpression expr,
                                            boolean not)
Deprecated. EbiJdbcMetaDataQuery

Specifies the search condition of "get all documents that have links for which the specified expression evaluates to true". An example of this would be: "get all the documents of type 'Author' for whom Books need to be reordered" (where 'Book' is also a document type; Authors and Books are linked; Authors are link-parents, and Books are link-children). Note: this method is deprecated, EbiJdbcMetaDataQuery must be used instead.
Parameters:
expr - the expression specified for the link-children
not - whether to negate the condition
Returns:
the resulting expression for the link-parents
See Also:
EbiDocQuery.whereLinkParents(EbiQueryExpression, boolean)

whereLinkParents

public EbiQueryExpression whereLinkParents(EbiQueryExpression expr,
                                           boolean not)
Deprecated. EbiJdbcMetaDataQuery

Specifies the search condition of "get all documents that are links of (condition) for which (condition)". An example of this would be: "get all Books of Authors whose last name is Smith", where 'Book' and 'Author' are document types, Authors are link-parents, and Books are link-children (Books are linked to Authors). Note that this method is deprecated, EbiJdbcMetaDataQuery must be used instead:

 // assemble inner subquery
 com.sssw.fw.persist.jdbc.api.EbiJdbcQuery innerQuery = com.sssw.fw.factory.EboFactory.getJdbcQuery("com.sssw.fw.api.EbiJdbcQuery");
 innerQuery.setPrimaryTable(EbiDocTypeMeta.DOCTYPES_TABLE);
 innerQuery.addSelect(EbiDocTypeMeta.DOCTYPES_DOCTYPEID);
 EbiQueryExpression innerExpr = innerQuery.whereColumnOp(EbiDocTypeMeta.DOCTYPENAME, "Book", EboSqlHelper.ROP_EQUAL, false);
 innerQuery.setWhere(innerExpr);

 // assemble outer subquery
 com.sssw.fw.persist.jdbc.api.EbiJdbcQuery outerQuery =
 com.sssw.fw.factory.EboFactory.getJdbcQuery("com.sssw.fw.api.EbiJdbcQuery");
 outerQuery.setPrimaryTable(EbiDocLinkMeta.DOCLINKS_TABLE);
 outerQuery.addSelect(EbiDocLinkMeta.DOCLINKS_CHILDDOCID);
 String[] fromCols = {EbiDocLinkMeta.DOCLINKS_DOCID};
 String[] toCols = {EbiDocumentMeta.DOCUMENTS_DOCID};
 outerQuery.addJoin(EboSqlHelper.JOIN_INNER, EbiDocumentMeta.DOCUMENTS_TABLE, fromCols, toCols);
 EbiQueryExpression outerExpr = outerQuery.whereColumnOp(EbiDocumentMeta.DOCUMENTS_AUTHOR, "J.K. Rowling", EboSqlHelper.ROP_EQUAL, false);
 EbiQueryExpression temp = outerQuery.whereColumnIn(EbiDocumentMeta.DOCUMENTS_DOCTYPEID, innerQuery, false);
 outerExpr.andExpression(temp);
 outerQuery.setWhere(outerExpr);

 // obtain document meta for use in main query
 com.sssw.fw.persist.api.EbiElementMeta docMeta = com.sssw.cm.core.EboPersistenceHelper.getElementMeta(EbiDocument.EL_DOCUMENT);

 // assemble main query
 com.sssw.fw.persist.jdbc.api.EbiJdbcMetaDataQuery mainQuery = com.sssw.fw.factory.EboFactory.getJdbcMetaDataQuery("com.sssw.fw.api.EbiJdbcMetaDataQuery");
 mainQuery.setPrimaryTable(EbiDocumentMeta.DOCUMENTS_TABLE);
 mainQuery.addElementType(EbiDocument.EL_DOCUMENT, docMeta);
 mainQuery.addSelect(EbiDocumentMeta.DOCUMENTS_DOCNAME, EbiDocument.EL_DOCUMENT,
 docMeta.getPropertyIndex(EbiDocumentMeta.DOCUMENTS_DOCNAME));
 EbiQueryExpression mainExpr = mainQuery.whereColumnIn(EbiDocumentMeta.DOCUMENTS_DOCID, outerQuery, false);
 mainQuery.setWhere(mainExpr);

 Collection docs = cm.findElements(m_ctx, mainQuery);
 
Parameters:
expr - the expression specified for the link-parents
not - whether to negate the condition
Returns:
the resulting expression for the link-children

wherePublishStatus

public EbiQueryExpression wherePublishStatus(int value,
                                             int op,
                                             boolean not)
Specifies the search condition of "where document's publish status..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

wherePublishStatusIn

public EbiQueryExpression wherePublishStatusIn(int[] values,
                                               boolean not)
Specifies the search condition of "where document's publish status is in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

wherePublishStatusBetween

public EbiQueryExpression wherePublishStatusBetween(int first,
                                                    int last,
                                                    boolean not)
Specifies the search condition of "where publish status between..."
Parameters:
first - the first value for the range
last - the last value for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereContentSize

public EbiQueryExpression whereContentSize(int value,
                                           int op,
                                           boolean not)
Specifies the search condition of "where document's content size..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereContentSizeIn

public EbiQueryExpression whereContentSizeIn(int[] values,
                                             boolean not)
Specifies the search condition of "where document's content size is in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereContentSizeBetween

public EbiQueryExpression whereContentSizeBetween(int first,
                                                  int last,
                                                  boolean not)
Specifies the search condition of "where content size between..."
Parameters:
first - the first value for the range
last - the last value for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereMimeType

public EbiQueryExpression whereMimeType(String value,
                                        int op,
                                        boolean not)
Specifies the search condition of "where document's MIME type..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereMimeTypeIn

public EbiQueryExpression whereMimeTypeIn(String[] values,
                                          boolean not)
Specifies the search condition of "where document's MIME type is in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereMimeTypeBetween

public EbiQueryExpression whereMimeTypeBetween(String first,
                                               String last,
                                               boolean not)
Specifies the search condition of "where MIME type between..."
Parameters:
first - the first value for the range
last - the last value for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereUpdateTime

public EbiQueryExpression whereUpdateTime(Timestamp value,
                                          int op,
                                          boolean not)
Specifies the search condition of "where document's update date/time..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereUpdateTimeIn

public EbiQueryExpression whereUpdateTimeIn(Timestamp[] values,
                                            boolean not)
Specifies the search condition of "where document update date/time in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereUpdateTimeBetween

public EbiQueryExpression whereUpdateTimeBetween(Timestamp first,
                                                 Timestamp last,
                                                 boolean not)
Specifies the search condition of "where document update date/time between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereUpdateUser

public EbiQueryExpression whereUpdateUser(String value,
                                          int op,
                                          boolean not)
Specifies the seach condition of "where document update user..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereUpdateUserIn

public EbiQueryExpression whereUpdateUserIn(String[] values,
                                            boolean not)
Specifies the search condition of "where document update user in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereUpdateUserBetween

public EbiQueryExpression whereUpdateUserBetween(String first,
                                                 String last,
                                                 boolean not)
Specifies the search condition of "where document update user between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereRepositoryID

public EbiQueryExpression whereRepositoryID(String value,
                                            int op,
                                            boolean not)
Specifies the seach condition of "where repository ID..."
Note: by default, the query will search for documents that belong to the repository that the query is associated with.
Note: this method does not provide the ability to run searches across multiple data sources. It works for multiple repositories that reside within the same data source.
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the query expression

whereRepositoryIDBetween

public EbiQueryExpression whereRepositoryIDBetween(String first,
                                                   String last,
                                                   boolean not)
Specifies the search condition of "where repository ID between..."
Parameters:
first - the start expression for the range
last - the end expression for the range
not - whether to negate the condition
Returns:
the constructed query expression

whereRepositoryIDIn

public EbiQueryExpression whereRepositoryIDIn(String[] values,
                                              boolean not)
Specifies the seach condition of "where repository ID in..."
Note: by default, the query will search for documents that belong to the repository that the query is associated with.
Note: this method does not provide the ability to run searches across multiple data sources. It works for multiple repositories that reside within the same data source.
Parameters:
values - the values for the "in" clause
not - whether to negate the condition
Returns:
the constructed query expression

whereOriginator

public EbiQueryExpression whereOriginator(int value,
                                          int op,
                                          boolean not)
Specifies the search condition of "where Originator..."
Parameters:
value - the value for the condition
op - the operator (see EbiMetaDataQuery)
not - whether to negate the condition
Returns:
the constructed query expression

whereOriginatorIn

public EbiQueryExpression whereOriginatorIn(int[] values,
                                            boolean not)
Specifies the search condition of "where Originator is in..."
Parameters:
values - the values for the IN condition
not - whether to negate the condition
Returns:
the constructed query expression

whereOriginatorBetween

public EbiQueryExpression whereOriginatorBetween(int first,
                                                 int last,
                                                 boolean not)
Specifies the search condition of "where originator between..."
Parameters:
first - the first value for the range
last - the last value for the range
not - whether to negate the condition
Returns:
the constructed query expression

setMaxRows

public void setMaxRows(Integer maxRows)
Specifies a maximum number of rows to be returned by the query. This attribute is applied to the JDBC Statement used to execute the query. Note that some JDBC drivers may not support this attribute.
Parameters:
maxRows - is an Integer containing the maximum rows to be returned.

getMaxRows

public Integer getMaxRows()
Gets the MaxRows attribute for the query. This method will return null if the attribute hasn't been set. If the attribute is not set, the JDBC statement will use a default value.
Returns:
an Integer value, may be null.

getRepositoryID

public String getRepositoryID()
Gets the repository id associated with the query
Returns:
the repository id

Novell exteNd
Director 5.2 API