Novell exteNd
Director 5.2 API

com.sssw.cm.util
Class EboDocQueryUtil

java.lang.Object
 |
 +--com.sssw.cm.util.EboDocQueryUtil

public class EboDocQueryUtil
extends Object

This class contains utility methods related to Document queries.


Constructor Summary
EboDocQueryUtil()
           
 
Method Summary
static EbiQueryExpression genFieldValueClause(EbiContext context, EbiContentManager contentMgr, EbiDocQuery docQuery, String[] fields, boolean useNames, Object[] fieldValues, int operator, boolean or)
          For the given document query, generates a WHERE clause that involves multiple 'field value' criteria, e.g.
static boolean isKnownDataType(String dataType)
          Checks whether the specified data type is valid
static void order(int[] orderByProps, boolean[] orderArr, EbiDocMetaDataQuery docMetaQuery)
          Given a document metadata query object, specifies its ORDER BY clauses.
static void selectDocProperties(int[] selectedProps, EbiDocMetaDataQuery docMetaQuery)
          Using the supplied list of document metadata property identifiers, selects properties that are to be returned as part of the EbiDocuments that the EbiContentManager.findElements method returns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EboDocQueryUtil

public EboDocQueryUtil()
Method Detail

selectDocProperties

public static void selectDocProperties(int[] selectedProps,
                                       EbiDocMetaDataQuery docMetaQuery)
Using the supplied list of document metadata property identifiers, selects properties that are to be returned as part of the EbiDocuments that the EbiContentManager.findElements method returns.

Notes:

Parameters:
selectedProps - the list of document metadata properties to select; pass in null to have the method select all of the properties in the query
docMetaQuery - the document metadata query object

order

public static void order(int[] orderByProps,
                         boolean[] orderArr,
                         EbiDocMetaDataQuery docMetaQuery)
Given a document metadata query object, specifies its ORDER BY clauses. Notes:
Parameters:
orderByProps - the list of identifiers of the document metadata properties by which to order
orderArr - the list of order values; 'true' for 'ascending order', 'false' for 'descending order'
docMetaQuery - the document metadata query object

genFieldValueClause

public static EbiQueryExpression genFieldValueClause(EbiContext context,
                                                     EbiContentManager contentMgr,
                                                     EbiDocQuery docQuery,
                                                     String[] fields,
                                                     boolean useNames,
                                                     Object[] fieldValues,
                                                     int operator,
                                                     boolean or)
                                              throws EboUnrecoverableSystemException,
                                                     EboSecurityException,
                                                     EboItemExistenceException
For the given document query, generates a WHERE clause that involves multiple 'field value' criteria, e.g. MarketSegment = 'MiddleMarket'.
Parameters:
context - the context
contentMgr - the content manager object
docQuery - the document query object
fields - the list of field names or field IDs, depending on the value of the 'useNames' flag
useNames - if true, then 'fields' is treated as a list of field names, if false, the values in 'fields' are assumed to be field IDs
fieldValues - values for the specified fields
operator - the operator to use, e.g. EbiMetaDataQuery.ROP_EQUAL (see com.sssw.cm.api.EbiMetaDataQuery for the list of available operators)
or - if true, the criteria are OR'ed together, otherwise they are AND'ed
Returns:
the resulting query expression object
Throws:
EboUnrecoverableSystemException -  
EboSecurityException -  
EboItemExistenceException -  

isKnownDataType

public static boolean isKnownDataType(String dataType)
Checks whether the specified data type is valid
Parameters:
dataType - the data type name
Returns:
true if it's a known data type, false otherwise

Novell exteNd
Director 5.2 API