|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objects that implement this interface represent queries that are used to search for Users maintained by the User Service.
The user is expected to create the Query in three steps:
Example:
// define two custom attributes from PAC or user sevice API // "officeLocation" and "lastAccess". // Get the EbiContext and User Delegate objects......... context = ... userdelegate = com.sssw.fw.usermgr.client.EboFactory.getUserDelegate(); // Create a User Query Object from fw factory EbiUserQuery userQuery = (EbiUserQuery)com.sssw.fw.factory.EboFactory.getQuery(EbiUserQuery.EL_USER_QUERY); // We're interested in users with last name 'Smith' EbiQueryExpression queryExpr = userQuery.whereLastName("Smith", EbiUserQUery.ROP_EQUAL, false); // The email address we're interested in has trailing of "novell.com" EbiQueryExpression emailExpr = userQuery.whereEmailAddressLike("novell.com", EbiUserQuery.ROP_LIKE, false); // AND the two defined above queryExpr.andExpression(emailExpr); // The custom attribute "officeLocation" we're interested in has 'Billerica' EbiQueryExpression customField1Expr = userQuery.whereAttribute( "officeLocation", "Billerica", EbiUserQuery.ROP_EQUAL, false); // The custom attribute "lastAccess" we're interested in was done 5/11/2000 EbiQueryExpression customField2Expr = userQuery.whereAttribute( "lastAccess", "5/11/2000", EbiUserQuery.ROP_EQUAL, false); // AND the two custom attributes: // "officeLocation" and "LastAccess" customField1Expr.andExpression(customField2Expr); // AND the four attributes together: // lastname is "Smith" and emailaddress end as novell.com and // officeLocation was "Billerica" and lastAccess was done 5/11/2000 queryExpr.andExpression(customField1Expr); // The WHERE clause is ready, set it into the Query userQuery.setWhere(queryExpr); // Set Select Clause (default select clause contains USERUUID and USERID // columns only, see EboUserMetaDataQuery class for details.) // Note: for selectAttribute() method only if the custom attribute is a base // attribute (i.e. defined as one of the 5 KEYn columns in the PROFILEUSERS table), // then it is allowed to be in the select clause. You may check whether an // attribute is a base attribute by calling userMeta.isBaseUserAttribute() // method. userQuery.selectFirstName(); userQuery.selectAttribute("officeLocation"); // Set orderBy clause (see EboUserMetaDataQuery class for detailes) // Note: the custom attribute restriction applies to orderByAttribute() // method as well. userQuery.orderByUserID(); userQuery.orderByAttribute("lastAccess"); // Execute the query EbiUserInfo[] results = userdelegate.getUserList(sess, userQuery);
Field Summary | |
static String |
EL_USER_QUERY
The element type for User 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 | |
EbiQueryExpression |
whereAttribute(String name,
String value,
int op,
boolean not)
Specify the seach condition of "where extension metadata attribute.." |
EbiQueryExpression |
whereAttributeBetween(String name,
String first,
String last,
boolean not)
Specify the search condition of "where attribute between..." |
EbiQueryExpression |
whereAttributeIn(String name,
String[] values,
boolean not)
Specify the seach condition of "where extension metadata field ID in..." |
EbiQueryExpression |
whereEmailAddress(String value,
int op,
boolean not)
Specify the seach condition of "where user emailaddress..." |
EbiQueryExpression |
whereEmailAddressBetween(String first,
String last,
boolean not)
Specify the search condition of "where user emailaddress between..." |
EbiQueryExpression |
whereEmailAddressIn(String[] values,
boolean not)
Specify the search condition of "where user emailaddress in..." |
EbiQueryExpression |
whereFirstName(String value,
int op,
boolean not)
Specify the seach condition of "where user First name..." |
EbiQueryExpression |
whereFirstNameBetween(String first,
String last,
boolean not)
Specify the search condition of "where user First name between..." |
EbiQueryExpression |
whereFirstNameIn(String[] values,
boolean not)
Specify the seach condition of "where user First name in..." |
EbiQueryExpression |
whereLastName(String value,
int op,
boolean not)
Specify the seach condition of "where user Last name..." |
EbiQueryExpression |
whereLastNameBetween(String first,
String last,
boolean not)
Specify the search condition of "where user Last name between..." |
EbiQueryExpression |
whereLastNameIn(String[] values,
boolean not)
Specify the seach condition of "where user Last name in..." |
EbiQueryExpression |
whereRealmName(String value,
int op,
boolean not)
Specify the search condition of "where realm name..." |
EbiQueryExpression |
whereRealmNameIn(String[] values,
boolean not)
Specify the search condition of "where realm name in..." |
EbiQueryExpression |
whereUpdateTime(Timestamp value,
int op,
boolean not)
Specify the seach condition of "where update timestamp.." |
EbiQueryExpression |
whereUpdateTimeBetween(Timestamp first,
Timestamp last,
boolean not)
Specify the search condition of "where update timestamp between..." |
EbiQueryExpression |
whereUpdateTimeIn(Timestamp[] values,
boolean not)
Specify the seach condition of "where update timestamps in..." |
EbiQueryExpression |
whereUserID(String value,
int op,
boolean not)
Specify the search condition of "where user ID..." |
EbiQueryExpression |
whereUserIDBetween(String first,
String last,
boolean not)
Specify the search condition of "where user ID between..." |
EbiQueryExpression |
whereUserIDIn(String[] values,
boolean not)
Specify the search condition of "where user ID in..." |
EbiQueryExpression |
whereUserUUID(String userIID,
int op,
boolean not)
Specify the search condition of "where user UUID..." |
EbiQueryExpression |
whereUserUUIDIn(String[] values,
boolean not)
Specify the search condition of "where user UUID in..." |
Methods implemented from interface com.sssw.fw.api.EbiMetaDataQuery |
getSelectedColumnIndices,
getWhere,
isHierarchical,
setWhere |
Methods implemented from interface com.sssw.fw.usermgr.api.EbiUserMetaDataQuery |
orderByAttribute,
orderByEmailAddress,
orderByFirstName,
orderByLastName,
orderByRealmName,
orderByUpdateTime,
orderByUserID,
orderByUserUUID,
selectAttribute,
selectEmailAddress,
selectFirstName,
selectLastName,
selectRealmName,
selectUpdateTime |
Field Detail |
public static final String EL_USER_QUERY
Method Detail |
public EbiQueryExpression whereUserUUID(String userIID, int op, boolean not)
value
- the value for the conditionop
- the operator (see EbiMetaDataQuery)not
- whether to negate the conditionpublic EbiQueryExpression whereUserUUIDIn(String[] values, boolean not)
values
- the values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereUserID(String value, int op, boolean not)
value
- the value for the conditionop
- the operator (see EbiMetaDataQuery)not
- whether to negate the conditionpublic EbiQueryExpression whereUserIDIn(String[] values, boolean not)
values
- the values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereUserIDBetween(String first, String last, boolean not)
first
- the start expression for the rangelast
- the end expression for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereFirstName(String value, int op, boolean not)
value
- the value for the conditionop
- the operator (see EbiMetaDataQuery)not
- whether to negate the conditionpublic EbiQueryExpression whereFirstNameIn(String[] values, boolean not)
values
- the values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereFirstNameBetween(String first, String last, boolean not)
first
- the start expression for the rangelast
- the end expression for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereLastName(String value, int op, boolean not)
value
- the value for the conditionop
- the operator (see EbiMetaDataQuery)not
- whether to negate the conditionpublic EbiQueryExpression whereLastNameIn(String[] values, boolean not)
values
- the values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereLastNameBetween(String first, String last, boolean not)
first
- the start expression for the rangelast
- the end expression for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereEmailAddress(String value, int op, boolean not)
value
- the value for the conditionop
- the operator (see EbiMetaDataQuery)not
- whether to negate the conditionpublic EbiQueryExpression whereEmailAddressIn(String[] values, boolean not)
values
- the values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereEmailAddressBetween(String first, String last, boolean not)
first
- the start expression for the rangelast
- the end expression for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereRealmName(String value, int op, boolean not)
value
- the value for the conditionop
- the operator (see EbiMetaDataQuery)not
- whether to negate the conditionpublic EbiQueryExpression whereRealmNameIn(String[] values, boolean not)
values
- the values for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereAttribute(String name, String value, int op, boolean not)
attribute
- name/value for the conditionop
- the operator (see EbiMetaDataQuery)not
- whether to negate the conditionpublic EbiQueryExpression whereAttributeIn(String name, String[] values, boolean not)
attributes
- the names/values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereAttributeBetween(String name, String first, String last, boolean not)
first
- the start expression for the rangelast
- the end expression for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereUpdateTime(Timestamp value, int op, boolean not)
When using this method in one of the ldap realm configurations provided with Director you must specify the time in UTC format. This is required as directory servers such as Novell eDirectory store their timestamps in this format.
value
- value for the conditionop
- the operator (see EbiMetaDataQuery)not
- whether to negate the conditionpublic EbiQueryExpression whereUpdateTimeIn(Timestamp[] values, boolean not)
When using this method in one of the ldap realm configurations provided with Director you must specify the time in UTC format. This is required as directory servers such as Novell eDirectory store their timestamps in this format.
values
- the names/values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereUpdateTimeBetween(Timestamp first, Timestamp last, boolean not)
When using this method in one of the ldap realm configurations provided with Director you must specify the times in UTC format. This is required as directory servers such as Novell eDirectory store their timestamps in this format.
first
- the start expression for the rangelast
- the end expression for the rangenot
- whether to negate the condition
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |