Package com.redwood.scheduler.api.model
Interface QueryCondition
-
- All Superinterfaces:
BusinessKeyObject
,NamedRootObject
,NamedRootObjectComp
,QueryConditionComp
,Root
,SchedulerEntity
,SchedulerEntityComp
public interface QueryCondition extends QueryConditionComp, NamedRootObject, BusinessKeyObject
Condition that can be used to to filter objects. A condition describes what field on a object can be filtered on, and the QueryConditionType is then used to create the Where part.
-
-
Field Summary
Fields Modifier and Type Field Description static String
AFTER
The comparison is a > then comparisonstatic String
BEFORE
The comparison is a < then comparisonstatic String
BETWEEN
The comparison is a between comparison, and requires 2 valuesstatic String
CASESENSITIVE
The search value must be casesensitivestatic String
CONTAINS
Stringcompare must be contained in the fieldstatic String
DATE
The date in the fieldvalue is a real datestatic String
DEFVALUE1
Default condition value1static String
DEFVALUE2
Default condition value2static String
EQUALS
Stringcompare must be exact matchstatic String
ESCAPE_CHARACTER
Escape character that can be used in queries to escape the wildcard characters '_' and "%'.static String
EXPRESSION
The compare will be based on an evaluated expression.static String
HIDDENVALUES
The values can not be changed by the userstatic String
MUST_USE_SUBSELECT
Use a subselect for the in comparison instead of putting it in an inner join.static String
NOT
The comparison is a NOT comparisonstatic String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "QueryCondition" objects.static String
OFFSET
The date in the fieldvalue must be used as a date offset to nowstatic String
PATH
Used to indicate the path that must be taken to get to the comparable fieldstatic String
SEC_RANK_ALL
This rank is made of the following privileges:static String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
STARTSWITH
The search value must be at the start of the fieldstatic QueryObjectType<QueryCondition>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description QueryConditionValue
createQueryConditionValue(QueryFilter newQueryFilter)
Create a newQueryConditionValue
linked to this object.String
getConditionText()
Get the value for ConditionText.Long
getDisplayOrder()
Get the value for DisplayOrder.ObjectDefinition
getObjectDefinition()
Get the ObjectDefinition.ObjectFieldDefinition
getObjectFieldDefinition()
Get the ObjectFieldDefinition.QueryConditionValue
getQueryConditionValueByQueryFilterInclude(QueryFilter queryFilter, QueryConditionValueInclude include)
Get the QueryConditionValue by QueryCondVal.RWIterable<QueryConditionValue>
getQueryConditionValues()
Get anRWIterable
over an ordered collection ofQueryConditionValues
.QueryConditionType
getType()
Get the value for Type.String
getTypeValue()
Get the value for TypeValue.boolean
isValue1Mandatory()
Get the value for Value1Mandatory.boolean
isValue2Mandatory()
Get the value for Value2Mandatory.void
setConditionText(String newConditionText)
Set the value for ConditionText.void
setDisplayOrder(Long newDisplayOrder)
Set the value for DisplayOrder.void
setObjectDefinition(ObjectDefinition newObjectDefinition)
Set the value for ObjectDefinition.void
setObjectFieldDefinition(ObjectFieldDefinition newObjectFieldDefinition)
Set the value for ObjectFieldDefinition.void
setType(QueryConditionType newType)
Set the value for Type.void
setTypeValue(String newTypeValue)
Set the value for TypeValue.-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.NamedRootObject
createObjectReference, getComment, getDescription, getLinkedObjectReferenceByLinkedObject, getLinkedObjectReferenceByName, getLinkedObjectReferences, getName, getSearchName, getSourceObjectReferences, isHidden, setComment, setDescription, setName
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "QueryCondition" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<QueryCondition> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
NOT
static final String NOT
The comparison is a NOT comparison- See Also:
- Constant Field Values
-
BEFORE
static final String BEFORE
The comparison is a < then comparison- See Also:
- Constant Field Values
-
AFTER
static final String AFTER
The comparison is a > then comparison- See Also:
- Constant Field Values
-
BETWEEN
static final String BETWEEN
The comparison is a between comparison, and requires 2 values- See Also:
- Constant Field Values
-
DATE
static final String DATE
The date in the fieldvalue is a real date- See Also:
- Constant Field Values
-
OFFSET
static final String OFFSET
The date in the fieldvalue must be used as a date offset to now- See Also:
- Constant Field Values
-
PATH
static final String PATH
Used to indicate the path that must be taken to get to the comparable field- See Also:
- Constant Field Values
-
STARTSWITH
static final String STARTSWITH
The search value must be at the start of the field- See Also:
- Constant Field Values
-
CONTAINS
static final String CONTAINS
Stringcompare must be contained in the field- See Also:
- Constant Field Values
-
EQUALS
static final String EQUALS
Stringcompare must be exact match- See Also:
- Constant Field Values
-
CASESENSITIVE
static final String CASESENSITIVE
The search value must be casesensitive- See Also:
- Constant Field Values
-
DEFVALUE1
static final String DEFVALUE1
Default condition value1- See Also:
- Constant Field Values
-
DEFVALUE2
static final String DEFVALUE2
Default condition value2- See Also:
- Constant Field Values
-
HIDDENVALUES
static final String HIDDENVALUES
The values can not be changed by the user- See Also:
- Constant Field Values
-
EXPRESSION
static final String EXPRESSION
The compare will be based on an evaluated expression.- See Also:
- Constant Field Values
-
ESCAPE_CHARACTER
static final String ESCAPE_CHARACTER
Escape character that can be used in queries to escape the wildcard characters '_' and "%'.- See Also:
- Constant Field Values
-
MUST_USE_SUBSELECT
static final String MUST_USE_SUBSELECT
Use a subselect for the in comparison instead of putting it in an inner join. NOTE: MUST_USE_SUBSELECT CURRENTLY ONLY WORKS FOR Job.OwnerSubject QUERY CONDITION. AFTER BUG 31619 HAS BEEN FIXED, IT CAN BE APPLIED TO OTHER SITUATIONS.- See Also:
- Constant Field Values
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges:- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
QueryConditionType getType()
Get the value for Type. (QueryConditiontype for this QueryCondition. The QueryConditionType determines the actual where clause.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getTypeValue
String getTypeValue()
Get the value for TypeValue. (Some queryConditionTypes can need additional information. This information is stored in this field. See the QueryConditionType enumeration for more information about which type needs what information)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getConditionText
String getConditionText()
Get the value for ConditionText. (Human readable text for the user that describes the condition.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDisplayOrder
Long getDisplayOrder()
Get the value for DisplayOrder. (Order in which the sentence should be shown in the sentence list. If the order is -1, it is not shown.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
isValue1Mandatory
boolean isValue1Mandatory()
Get the value for Value1Mandatory. (True if value1 on the QueryConditionValue is mandatory.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
isValue2Mandatory
boolean isValue2Mandatory()
Get the value for Value2Mandatory. (True if value2 on the QueryConditionValue is mandatory.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setType
void setType(QueryConditionType newType)
Set the value for Type. (QueryConditiontype for this QueryCondition. The QueryConditionType determines the actual where clause.) This value is mandatory.- Parameters:
newType
- the new value for Type. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setTypeValue
void setTypeValue(String newTypeValue)
Set the value for TypeValue. (Some queryConditionTypes can need additional information. This information is stored in this field. See the QueryConditionType enumeration for more information about which type needs what information) This value is optional.- Parameters:
newTypeValue
- the new value for TypeValue.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setConditionText
void setConditionText(String newConditionText)
Set the value for ConditionText. (Human readable text for the user that describes the condition.) This value is mandatory.- Parameters:
newConditionText
- the new value for ConditionText. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setDisplayOrder
void setDisplayOrder(Long newDisplayOrder)
Set the value for DisplayOrder. (Order in which the sentence should be shown in the sentence list. If the order is -1, it is not shown.) This value is mandatory.- Parameters:
newDisplayOrder
- the new value for DisplayOrder. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getObjectDefinition
ObjectDefinition getObjectDefinition()
Get the ObjectDefinition.- Returns:
- ObjectDefinition
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getObjectFieldDefinition
ObjectFieldDefinition getObjectFieldDefinition()
Get the ObjectFieldDefinition.- Returns:
- ObjectFieldDefinition
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
setObjectDefinition
void setObjectDefinition(ObjectDefinition newObjectDefinition)
Set the value for ObjectDefinition. This value is mandatory.- Parameters:
newObjectDefinition
- is the object to set ObjectDefinition to. If this isnull
, then the object cannot be persisted.
-
setObjectFieldDefinition
void setObjectFieldDefinition(ObjectFieldDefinition newObjectFieldDefinition)
Set the value for ObjectFieldDefinition. This value is optional.- Parameters:
newObjectFieldDefinition
- is the object to set ObjectFieldDefinition to.
-
getQueryConditionValues
RWIterable<QueryConditionValue> getQueryConditionValues()
Get anRWIterable
over an ordered collection ofQueryConditionValues
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
.- Specified by:
getQueryConditionValues
in interfaceQueryConditionComp
- Returns:
- An
RWIterable
over an ordered collection ofQueryConditionValue
objects .
-
createQueryConditionValue
QueryConditionValue createQueryConditionValue(QueryFilter newQueryFilter)
Create a newQueryConditionValue
linked to this object.- Parameters:
newQueryFilter
- The other parent of theQueryConditionValueQueryFilter
association.- Returns:
- a new
QueryConditionValue
.
-
getQueryConditionValueByQueryFilterInclude
QueryConditionValue getQueryConditionValueByQueryFilterInclude(QueryFilter queryFilter, QueryConditionValueInclude include)
Get the QueryConditionValue by QueryCondVal.- Parameters:
queryFilter
-include
-- Returns:
- the QueryConditionValue, or
null
if it could not be found
-
-