|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.util.AbstractXmlObject
com.waveset.object.GenericObject
com.waveset.object.QueryOptions
A class providing a more convenient set of constructor methods that build the option map for the query methods in the ObjectSource interface. Since this extends GenericObject, it implements Map and may be passed directly to ObjectSource methods.
//Hmm, since this might be convenient for the ObjectSource implementation //should we just change the signatures to take the class?
Nested Class Summary |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Field Summary | |
static java.lang.String |
ATT_CONTROLLING_ADMINS
The name of a pseudo-attribute that may be used in an attribute condition for queries on ObjectGroup objects. |
static java.lang.String |
ATT_PERMISSIONS
The name of a pseudo-attribute that may be used in an attribute condition for queries on User objects. |
static java.lang.String |
ATT_SIMILAR_TO
The name of a pseudo-attribute that may be used in an attribute condition for queries on User objects. |
static java.lang.String |
ATT_USER_TYPE
The name of a pseudo-attribute that may be used in an attribute condition for queries on User objects. |
static java.lang.String |
code_id
|
static java.lang.String |
SCOPING_ORG
The name of a pseudo-attribute that may be used for querying objects of any type. |
static java.lang.String |
USER_TYPE_ADMINISTRATOR
A value for the pseudo-attribute ATT_USER_TYPE that may be used in attribute conditions of User queries. |
static java.lang.String |
USER_TYPE_APPROVER
A value for the pseudo-attribute ATT_USER_TYPE that may be used in attribute conditions of User queries. |
static java.lang.String |
USER_TYPE_REMEDIATOR
A value for the pseudo-attribute ATT_USER_TYPE that may be used in attribute conditions of User queries. |
Fields inherited from class com.waveset.object.GenericObject |
ATT_ID, ATT_NAME, ATT_TYPE, ATT_VALUE, EL_ATTRIBUTE, EL_FORMREF, ELEMENT, FLATTEN_ALL, FLATTEN_NOTHING, FLATTEN_OBJECT_LISTS, SYN_MISMATCHED_NAMES, SYN_MISPLACED_DOT, SYN_MISPLACED_LBRACKET, SYN_NAMED_LIST, SYN_NO_DOT, SYN_NO_GEO, SYN_NO_INDEX, SYN_NO_LIST, SYN_NO_NAME, SYN_NO_TARGET |
Fields inherited from class com.waveset.util.AbstractXmlObject |
_trace |
Constructor Summary | |
QueryOptions()
|
|
QueryOptions(java.util.Map options)
Derive a QueryOptions object from another options map. |
Method Summary | |
void |
addCondition(AttributeCondition cond)
Add one attribute condition to the query. |
void |
addCondition(java.lang.Object attname,
AttributeCondition.Operator op,
java.lang.Object value)
Add one attribute condition to the query. |
void |
addCondition(java.lang.Object attname,
java.lang.Object value)
Add one attribute condition to the query. |
void |
addConditions(AttributeCondition[] conds)
Add a set of attribute conditions represented as an array. |
void |
addConditions(java.util.List conds)
Add a set of attribute conditions represented as a List of AttributeCondition objects. |
void |
addConditions(java.util.Map atts)
Add a set of attribute conditions represented as a Map of name/value pairs with an implicit equality comparison. |
void |
addOrderBy(java.lang.Object name)
Add one orderBy attribute. |
int |
getBlockSize()
|
static int |
getBlockSize(java.util.Map options)
|
AttributeCondition[] |
getConditions()
|
static AttributeCondition[] |
getConditions(java.util.Map options)
Extract an array of AttributeCondition objects from the options map. |
java.lang.String[] |
getEndBefore()
|
static java.lang.String[] |
getEndBefore(java.util.Map options)
Convert the value of the OP_END_BEFORE option into an array of String objects. |
int |
getMaxRows()
|
static int |
getMaxRows(java.util.Map options)
|
Attribute[] |
getOrderBy()
|
static Attribute[] |
getOrderBy(java.util.Map options)
Convert the OP_ORDER_BY option into an array of Attribute objects. |
java.util.List |
getOrderByAttributeNames()
Extract the value of OP_ORDER_BY option from the specified map. |
static java.util.List |
getOrderByAttributeNames(java.util.Map options)
Extract the value of OP_ORDER_BY option from the specified map. |
java.lang.String |
getScopingOrg()
|
static java.lang.String |
getScopingOrg(java.util.Map options)
|
java.lang.String[] |
getStartAfter()
|
static java.lang.String[] |
getStartAfter(java.util.Map options)
Convert the value of the OP_START_AFTER option into an array of String objects. |
Subject |
getSubject()
|
static Subject |
getSubject(java.util.Map options)
|
boolean |
isBuffered()
|
static boolean |
isBuffered(java.util.Map options)
|
boolean |
isNoCache()
|
static boolean |
isNoCache(java.util.Map options)
|
boolean |
isOnlyNames()
Set to return only the names and ids of items in a list result. |
static boolean |
isOnlyNames(java.util.Map options)
|
java.util.List |
normalizeConditions()
Condition list accessor for a known query options object. |
static java.util.List |
normalizeConditions(java.util.Map options)
Normalize the conditions by converting an attributes map into a list of AttributeConditions and return the list. |
void |
setBlockSize(int size)
|
void |
setBuffered(boolean b)
|
void |
setEndBefore(java.lang.Object concatKey)
Specify a value for the ObjectSource.OP_END_BEFORE option. |
void |
setMaxRows(int max)
|
void |
setNoCache(boolean b)
|
void |
setOnlyNames(boolean b)
Set to return only the names and ids of items in a list result. |
static void |
setOnlyNames(java.util.Map map,
boolean b)
|
void |
setOrderBy(java.lang.Object name)
Set the ObjectSource.OP_ORDER_BY option. |
void |
setScopingOrg(java.lang.String scopingOrg)
|
void |
setStartAfter(java.lang.Object concatKey)
Specify a value for the ObjectSource.OP_START_AFTER option. |
void |
setSubject(Subject s)
|
Methods inherited from class com.waveset.object.GenericObject |
add, addAlias, assimilate, assimilateModifications, browse, clear, clearAliases, containsKey, containsValue, dumpMap, entrySet, filter, findObject, findObject, get, getAttributes, getBoolean, getDate, getDate, getDate, getElementName, getEncrypted, getForm, getFormRef, getId, getInt, getList, getListOfStrings, getLocal, getLong, getName, getObject, getObjectCreateIfNull, getString, isEmpty, keySet, main, parseXml, parseXml, println, put, put, put, put, putAll, putLocal, remove, removeLocal, setAliases, setAttributes, setForm, setFormRef, setId, setIgnoreForm, setName, size, sort, sort, test1, test2, test3, toDisplayString, toDisplayString, toMap, toMap, toMap, toMap, toMap, toMap, toString, toXml, toXmlNoForm, toXmlNormalized, toXmlNormalized, toXmlNormalized, trace, trace, values |
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String ATT_USER_TYPE
public static final java.lang.String USER_TYPE_ADMINISTRATOR
public static final java.lang.String USER_TYPE_APPROVER
public static final java.lang.String USER_TYPE_REMEDIATOR
public static final java.lang.String ATT_PERMISSIONS
public static final java.lang.String ATT_SIMILAR_TO
public static final java.lang.String SCOPING_ORG
public static final java.lang.String ATT_CONTROLLING_ADMINS
Constructor Detail |
public QueryOptions()
public QueryOptions(java.util.Map options) throws WavesetException
Method Detail |
public void setSubject(Subject s)
public static Subject getSubject(java.util.Map options)
public Subject getSubject()
public void setMaxRows(int max)
public int getMaxRows()
public static int getMaxRows(java.util.Map options)
public void setBuffered(boolean b)
public void setBlockSize(int size)
public int getBlockSize()
public static int getBlockSize(java.util.Map options)
public void setNoCache(boolean b)
public void setOrderBy(java.lang.Object name)
public void addOrderBy(java.lang.Object name)
public java.util.List getOrderByAttributeNames()
public static java.util.List getOrderByAttributeNames(java.util.Map options)
The method is static so it may be used to process Maps that may not also be QueryOptions objects.
public Attribute[] getOrderBy()
public static Attribute[] getOrderBy(java.util.Map options)
public void setStartAfter(java.lang.Object concatKey)
ObjectSource.OP_START_AFTER
option.
If the specified value is not an instance of ArrayList,
this method will coerce it into an instance of ArrayList.
The value of OP_START_AFTER
should be an ArrayList that is one element longer
than the value of OP_ORDER_BY
.
Each element except the final element
in the value of OP_START_AFTER
corresponds positionally to an element
in the value of OP_ORDER_BY
.
The final element in the value of OP_START_AFTER
is a repository ID.
public java.lang.String[] getStartAfter()
public static java.lang.String[] getStartAfter(java.util.Map options)
public void setEndBefore(java.lang.Object concatKey)
ObjectSource.OP_END_BEFORE
option.
If the specified value is not an instance of ArrayList,
this method will coerce it into an instance of ArrayList.
The value of OP_END_BEFORE
should be an ArrayList that is one element longer
than the value of OP_ORDER_BY
.
Each element except the final element
in the value of OP_END_BEFORE
corresponds positionally to an element
in the value of OP_ORDER_BY
.
The final element in the value of OP_END_BEFORE
is a repository ID.
public java.lang.String[] getEndBefore()
public static java.lang.String[] getEndBefore(java.util.Map options)
public void addConditions(java.util.Map atts)
public void addConditions(AttributeCondition[] conds)
public void addConditions(java.util.List conds)
public void addCondition(AttributeCondition cond)
public void addCondition(java.lang.Object attname, java.lang.Object value)
public void addCondition(java.lang.Object attname, AttributeCondition.Operator op, java.lang.Object value)
public AttributeCondition[] getConditions()
public static java.util.List normalizeConditions(java.util.Map options)
public java.util.List normalizeConditions()
public static AttributeCondition[] getConditions(java.util.Map options)
public boolean isBuffered()
public static boolean isBuffered(java.util.Map options)
public boolean isNoCache()
public static boolean isNoCache(java.util.Map options)
public void setOnlyNames(boolean b)
b
- true for results with only names, no attributes or objectspublic static void setOnlyNames(java.util.Map map, boolean b)
public boolean isOnlyNames()
public static boolean isOnlyNames(java.util.Map options)
public void setScopingOrg(java.lang.String scopingOrg)
public java.lang.String getScopingOrg()
public static java.lang.String getScopingOrg(java.util.Map options)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |