|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.toplink.queryframework.QueryByExamplePolicy
Purpose: This policy defines the configuration options for a Query By Example query.
Description: Allow for the a set of values to be ignored, a set of attributes to always include, and special operators to be used for different types.
Field Summary |
Type | Field |
---|---|
java.util.Hashtable |
attributesToAlwaysInclude
|
boolean |
shouldUseEqualityForNulls
|
java.util.Hashtable |
specialOperations
|
java.util.Hashtable |
valuesToExclude
|
Constructor Summary |
QueryByExamplePolicy()
PUBLIC: construct a QueryByExamplePolicy, and put the default values to be excluded, (that includes 0, false, empty String, etc). |
Method Summary |
Type | Method |
---|---|
void |
addSpecialOperation(java.lang.Class theClass,
java.lang.String operation)
PUBLIC: QueryByExamplePolicy allows for specail operations to be used for comparisons in addition to equality. |
void |
alwaysIncludeAttribute(java.lang.Class exampleClass,
java.lang.String attributeName)
PUBLIC: if an attributeValue is null, or if it's value is to be excluded (for example if an int equals to 0, or a String is the empty string), it will automatically be ignored and not included in the query, unless the attribute is in the alwaysIncludedAttribute list. |
void |
excludeDefaultPrimitiveValues()
PUBLIC: This method adds the default values to be excluded to the list. |
void |
excludeValue(boolean value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
void |
excludeValue(byte value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
void |
excludeValue(char value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
void |
excludeValue(double value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
void |
excludeValue(float value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
void |
excludeValue(int value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
void |
excludeValue(long value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
void |
excludeValue(java.lang.Object value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
void |
excludeValue(short value)
PUBLIC: Using this method, it is possible to always ignore an attribute pair, when the value is equal to the value specified. |
java.util.Hashtable |
getAttributesToAlwaysInclude()
PUBLIC: This method returns the Hashtable that lists all the attributes that are to be included at all times. |
java.util.Hashtable |
getSpecialOperations()
PUBLIC: This returns the Hashtable that lists the specail operations. |
java.util.Hashtable |
getValuesToExclude()
PUBLIC: This returns the Hashtable that lists the values to be excluded. |
void |
includeAllValues()
PUBLIC: This method empties the list of values to be excluced. |
void |
removeFromValuesToExclude(java.lang.Object value)
PUBLIC: Removes the value from the list of values to be ignored automatically. |
void |
setShouldUseEqualityForNulls(boolean shouldUseEqualityForNulls)
PUBLIC: If an attribute value is null (and it's attribute name belongs to the attributes to always be included) there are two operations that could be used. |
boolean |
shouldUseEqualityForNulls()
PUBLIC: Returns if isNull is used for nulls or notNull. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.util.Hashtable valuesToExclude
public java.util.Hashtable attributesToAlwaysInclude
public java.util.Hashtable specialOperations
public boolean shouldUseEqualityForNulls
Constructor Detail |
public QueryByExamplePolicy()
Method Detail |
public void addSpecialOperation(java.lang.Class theClass, java.lang.String operation)
public void alwaysIncludeAttribute(java.lang.Class exampleClass, java.lang.String attributeName)
public void excludeDefaultPrimitiveValues()
public void excludeValue(byte value)
public void excludeValue(char value)
public void excludeValue(double value)
public void excludeValue(float value)
public void excludeValue(int value)
public void excludeValue(long value)
public void excludeValue(java.lang.Object value)
public void excludeValue(short value)
public void excludeValue(boolean value)
public java.util.Hashtable getAttributesToAlwaysInclude()
public java.util.Hashtable getSpecialOperations()
public java.util.Hashtable getValuesToExclude()
public void includeAllValues()
public void removeFromValuesToExclude(java.lang.Object value)
public void setShouldUseEqualityForNulls(boolean shouldUseEqualityForNulls)
public boolean shouldUseEqualityForNulls()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |