Package com.redwood.scheduler.api.model
Interface ObjectSearch
-
- All Superinterfaces:
BusinessKeyObject
,JobDefinitionRelatedObject
,ObjectSearchComp
,Readable
,Root
,SchedulerEntity
,SchedulerEntityComp
public interface ObjectSearch extends ObjectSearchComp, JobDefinitionRelatedObject, Readable
Object Search definition. A special JobDefinition for storing and retrieving Object Search criteria.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "ObjectSearch" objects.static 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 QueryObjectType<ObjectSearch>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
COPYRIGHT_MESSAGE_BKO, ID_BKO
-
Fields inherited from interface com.redwood.scheduler.api.model.Readable
COPYRIGHT_MESSAGE_E, ID_E
-
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 ObjectSearchCondition
addCondition()
Add a new condition with the appropriate label set.ObjectSearchCondition
createObjectSearchCondition()
Create a newObjectSearchCondition
linked to this object.String
getCalculatedCombineRule()
Get the value for the combine rule.ObjectSearchCombineRule
getCombineRule()
Get the value for CombineRule.Long
getConditionCount()
Get the number of conditionsString
getCustomCombineRule()
Get the value for CustomCombineRule.ObjectSearchCondition
getObjectSearchConditionByLabel(String label)
Get the ObjectSearchCondition by ConditionIndex.RWIterable<ObjectSearchCondition>
getObjectSearchConditions()
Get anRWIterable
over a collection ofObjectSearchConditions
, the collection will be ordered by Label.ObjectSearchResultType
getResultType()
Get the value for ResultType.Long
getRowLimit()
Get the value for RowLimit.ObjectSearchSortRule
getSortRule()
Get the value for SortRule.String
getTitleKey()
Get the translation key for the Object Search.boolean
removeCondition(ObjectSearchCondition condition)
Remove a condition from this ObjectSearch and update the labels appropriately.void
setCombineRule(ObjectSearchCombineRule newCombineRule)
Set the value for CombineRule.void
setCustomCombineRule(String newCustomCombineRule)
Set the value for CustomCombineRule.void
setResultType(ObjectSearchResultType newResultType)
Set the value for ResultType.void
setRowLimit(Long newRowLimit)
Set the value for RowLimit.void
setSortRule(ObjectSearchSortRule newSortRule)
Set the value for SortRule.-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.JobDefinitionRelatedObject
getJobDefinition, setJobDefinition
-
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 "ObjectSearch" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<ObjectSearch> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
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
-
getCombineRule
ObjectSearchCombineRule getCombineRule()
Get the value for CombineRule. (The rule for combining the object search conditions) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getCustomCombineRule
String getCustomCombineRule()
Get the value for CustomCombineRule. (The custom expression for combining the object search conditions.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getResultType
ObjectSearchResultType getResultType()
Get the value for ResultType. (The type of result to display for the search) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRowLimit
Long getRowLimit()
Get the value for RowLimit. (The maximum number of results to be displayed when ObjectSearchResultType is Limit)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getSortRule
ObjectSearchSortRule getSortRule()
Get the value for SortRule. (The rule for sorting the search results) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setCombineRule
void setCombineRule(ObjectSearchCombineRule newCombineRule)
Set the value for CombineRule. (The rule for combining the object search conditions) This value is mandatory.- Parameters:
newCombineRule
- the new value for CombineRule. If this isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setCustomCombineRule
void setCustomCombineRule(String newCustomCombineRule)
Set the value for CustomCombineRule. (The custom expression for combining the object search conditions.) This value is mandatory.- Parameters:
newCustomCombineRule
- the new value for CustomCombineRule. If this isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setResultType
void setResultType(ObjectSearchResultType newResultType)
Set the value for ResultType. (The type of result to display for the search) This value is mandatory.- Parameters:
newResultType
- the new value for ResultType. If this isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRowLimit
void setRowLimit(Long newRowLimit)
Set the value for RowLimit. (The maximum number of results to be displayed when ObjectSearchResultType is Limit) This value is optional.- Parameters:
newRowLimit
- the new value for RowLimit.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setSortRule
void setSortRule(ObjectSearchSortRule newSortRule)
Set the value for SortRule. (The rule for sorting the search results) This value is mandatory.- Parameters:
newSortRule
- the new value for SortRule. If this isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
addCondition
ObjectSearchCondition addCondition()
Add a new condition with the appropriate label set. This should be used rather than createObjectSearchCondition as it establishes the correct labels- Returns:
- The newly created ObjectSearchCondition
-
removeCondition
boolean removeCondition(ObjectSearchCondition condition)
Remove a condition from this ObjectSearch and update the labels appropriately. This should be used rather than ObjectSearchCondition.deleteObject() directly as it establishes the correct labels- Parameters:
condition
- The condition to be deleted- Returns:
- If the condition was successfully removed.
-
getConditionCount
Long getConditionCount()
Get the number of conditions- Returns:
- The number of conditions
-
getCalculatedCombineRule
String getCalculatedCombineRule()
Get the value for the combine rule. This returns the custom combine rule if the CombineRule is set to custom, otherwise it calculates the rule for the And and Or cases.- Returns:
- The calculated combine rule
-
getTitleKey
String getTitleKey()
Get the translation key for the Object Search.- Returns:
- The title translation key for the Object Search
-
getObjectSearchConditions
RWIterable<ObjectSearchCondition> getObjectSearchConditions()
Get anRWIterable
over a collection ofObjectSearchConditions
, the collection will be ordered by Label. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. The conditions for an Object Search.- Specified by:
getObjectSearchConditions
in interfaceObjectSearchComp
- Returns:
- An
RWIterable
over a collection ofObjectSearchCondition
objects , the collection will be ordered by Label.
-
createObjectSearchCondition
ObjectSearchCondition createObjectSearchCondition()
Create a newObjectSearchCondition
linked to this object.- Returns:
- a new
ObjectSearchCondition
.
-
getObjectSearchConditionByLabel
ObjectSearchCondition getObjectSearchConditionByLabel(String label)
Get the ObjectSearchCondition by ConditionIndex.- Parameters:
label
-- Returns:
- the ObjectSearchCondition, or
null
if it could not be found
-
-