Package com.redwood.scheduler.api.model
Interface QueryFilter
-
- All Superinterfaces:
BusinessKeyObject
,HasOwner
,NamedRootObject
,NamedRootObjectComp
,QueryFilterComp
,Readable
,Root
,SchedulerEntity
,SchedulerEntityComp
public interface QueryFilter extends QueryFilterComp, NamedRootObject, HasOwner, BusinessKeyObject, Readable
The queryFilter is used to create a filter for the ObjectType it refers to.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "QueryFilter" objects.static String
SEC_PRIV_CREATE
This privilege can be granted at a group level.static String
SEC_PRIV_DELETE
This privilege can be granted at a group level.static String
SEC_PRIV_EDIT
This privilege can be granted at a group level.static String
SEC_PRIV_VIEW
This privilege can be granted at a group level.static String
SEC_RANK_ALL
This rank is made of the following privileges: create , view , edit , deletestatic String
SEC_RANK_CREATE
This rank is made of the following privileges: createstatic String
SEC_RANK_DELETE
This rank is made of the following privileges: create , view , deletestatic String
SEC_RANK_EDIT
This rank is made of the following privileges: create , view , editstatic String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
SEC_RANK_VIEW
This rank is made of the following privileges: viewstatic QueryObjectType<QueryFilter>
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.HasOwner
OWNER_SUBJECT_FIELD
-
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 RequiredPermission
checkCreatePrivilege()
Check whether or not the create action can be performed on this object.RequiredPermission
checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.RequiredPermission
checkEditPrivilege()
Check whether or not the edit action can be performed on this object.RequiredPermission
checkViewPrivilege()
Check whether or not the view action can be performed on this object.ObjectTag
createObjectTag(ObjectTagDefinition objectTagDefinition)
Create a new ObjectTag for this PartitionableObject based on given ObjectTagDefinition.QueryConditionValue
createQueryConditionValue(QueryCondition newQueryCondition)
Create a newQueryConditionValue
linked to this object.Long
getDisplayOrder()
Get the value for DisplayOrder.QueryConditionValueCombiner
getExcludeCombiner()
Get the value for ExcludeCombiner.QueryConditionValueCombiner
getIncludeCombiner()
Get the value for IncludeCombiner.ObjectDefinition
getObjectDefinition()
Get the ObjectDefinition.ObjectTag
getObjectTagByObjectTagDefinition(ObjectTagDefinition objectTagDefinition)
Get the ObjectTag for given ObjectTagDefinition that is associated with this QueryFilter.RWIterable<ObjectTag>
getObjectTags()
Returns an RWIterable with the ObjectTags for this object.Subject
getOwnerSubject()
Get the OwnerSubject.Application
getParentApplication()
Get the ParentApplication.QueryConditionValue
getQueryConditionValueByQueryConditionInclude(QueryCondition queryCondition, QueryConditionValueInclude include)
Get the QueryConditionValue by QueryCondVal.RWIterable<QueryConditionValue>
getQueryConditionValues()
Get anRWIterable
over an ordered collection ofQueryConditionValues
.boolean
isAndExpressions()
Get the value for AndExpressions.boolean
isMonitorOnDashboard()
Get the value for MonitorOnDashboard.void
setAndExpressions(boolean newAndExpressions)
Set the value for AndExpressions.void
setDisplayOrder(Long newDisplayOrder)
Set the value for DisplayOrder.void
setExcludeCombiner(QueryConditionValueCombiner newExcludeCombiner)
Set the value for ExcludeCombiner.void
setIncludeCombiner(QueryConditionValueCombiner newIncludeCombiner)
Set the value for IncludeCombiner.void
setMonitorOnDashboard(boolean newMonitorOnDashboard)
Set the value for MonitorOnDashboard.void
setObjectDefinition(ObjectDefinition newObjectDefinition)
Set the value for ObjectDefinition.void
setOwnerSubject(Subject newOwnerSubject)
Set the value for OwnerSubject.void
setParentApplication(Application newParentApplication)
Set the value for ParentApplication.-
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 "QueryFilter" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<QueryFilter> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
SEC_PRIV_CREATE
static final String SEC_PRIV_CREATE
This privilege can be granted at a group level.- See Also:
- Constant Field Values
-
SEC_PRIV_VIEW
static final String SEC_PRIV_VIEW
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_EDIT
static final String SEC_PRIV_EDIT
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_DELETE
static final String SEC_PRIV_DELETE
This privilege can be granted at a group level. This privilege can be granted at an instance level.- 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_CREATE
static final String SEC_RANK_CREATE
This rank is made of the following privileges: create- See Also:
- Constant Field Values
-
SEC_RANK_VIEW
static final String SEC_RANK_VIEW
This rank is made of the following privileges: view- See Also:
- Constant Field Values
-
SEC_RANK_EDIT
static final String SEC_RANK_EDIT
This rank is made of the following privileges: create , view , edit- See Also:
- Constant Field Values
-
SEC_RANK_DELETE
static final String SEC_RANK_DELETE
This rank is made of the following privileges: create , view , delete- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: create , view , edit , delete- See Also:
- Constant Field Values
-
-
Method Detail
-
isAndExpressions
boolean isAndExpressions()
Get the value for AndExpressions. ( Should all the QueryExpressions this QueryFilter has be concatenated with And (true) or Or (false). Use IncludeCombiner/ExcludeCombiner to set the operator for either the include or exclude expression. )- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getIncludeCombiner
QueryConditionValueCombiner getIncludeCombiner()
Get the value for IncludeCombiner. (Combine operator for the include expressions of this QueryFilter.) 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.
-
getExcludeCombiner
QueryConditionValueCombiner getExcludeCombiner()
Get the value for ExcludeCombiner. (Combine operator for the exclude expressions of this QueryFilter. When the value is omitted 'And' will be used.)- Returns:
- the field
- Throws:
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 filters should be shown in the filterlist. 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:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
isMonitorOnDashboard
boolean isMonitorOnDashboard()
Get the value for MonitorOnDashboard. (Should the query filter be monitored on the dashboard? This is a calculated field, stored in an object tag, and may be deleted in the future.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setAndExpressions
void setAndExpressions(boolean newAndExpressions)
Set the value for AndExpressions. ( Should all the QueryExpressions this QueryFilter has be concatenated with And (true) or Or (false). Use IncludeCombiner/ExcludeCombiner to set the operator for either the include or exclude expression. )- Parameters:
newAndExpressions
- the new value for AndExpressions.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setIncludeCombiner
void setIncludeCombiner(QueryConditionValueCombiner newIncludeCombiner)
Set the value for IncludeCombiner. (Combine operator for the include expressions of this QueryFilter.) This value is mandatory.- Parameters:
newIncludeCombiner
- the new value for IncludeCombiner. 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.
-
setExcludeCombiner
void setExcludeCombiner(QueryConditionValueCombiner newExcludeCombiner)
Set the value for ExcludeCombiner. (Combine operator for the exclude expressions of this QueryFilter. When the value is omitted 'And' will be used.) This value is optional.- Parameters:
newExcludeCombiner
- the new value for ExcludeCombiner.- Throws:
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 filters should be shown in the filterlist. 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:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMonitorOnDashboard
void setMonitorOnDashboard(boolean newMonitorOnDashboard)
Set the value for MonitorOnDashboard. (Should the query filter be monitored on the dashboard? This is a calculated field, stored in an object tag, and may be deleted in the future.)- Parameters:
newMonitorOnDashboard
- the new value for MonitorOnDashboard.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
createObjectTag
ObjectTag createObjectTag(ObjectTagDefinition objectTagDefinition)
Create a new ObjectTag for this PartitionableObject based on given ObjectTagDefinition.- Parameters:
objectTagDefinition
- The ObjectTagDefinition the ObjectTag is based on.- Returns:
- Return the newly created ObjectTag
-
getObjectTags
RWIterable<ObjectTag> getObjectTags()
Returns an RWIterable with the ObjectTags for this object.- Specified by:
getObjectTags
in interfaceQueryFilterComp
- Returns:
- RWIterable with ObjectTag instances when present, an empty RWIterable otherwise.
-
getObjectTagByObjectTagDefinition
ObjectTag getObjectTagByObjectTagDefinition(ObjectTagDefinition objectTagDefinition)
Get the ObjectTag for given ObjectTagDefinition that is associated with this QueryFilter. Will return the ObjectTag when present, null otherwise.- Parameters:
objectTagDefinition
- The ObjectTagDefinition.- Returns:
- The ObjectTag associated to the QueryFilter if found, null otherwise.
-
getParentApplication
Application getParentApplication()
Get the ParentApplication.- Returns:
- ParentApplication
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getObjectDefinition
ObjectDefinition getObjectDefinition()
Get the ObjectDefinition.- Returns:
- ObjectDefinition
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getOwnerSubject
Subject getOwnerSubject()
Get the OwnerSubject.- Specified by:
getOwnerSubject
in interfaceHasOwner
- Returns:
- OwnerSubject
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
setParentApplication
void setParentApplication(Application newParentApplication)
Set the value for ParentApplication. This value is optional.- Parameters:
newParentApplication
- is the object to set ParentApplication to. An application can be used group QueryFilter objects.
-
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.
-
setOwnerSubject
void setOwnerSubject(Subject newOwnerSubject)
Set the value for OwnerSubject. This value is optional.- Parameters:
newOwnerSubject
- is the object to set OwnerSubject to. Who Created this Filter
-
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 interfaceQueryFilterComp
- Returns:
- An
RWIterable
over an ordered collection ofQueryConditionValue
objects .
-
createQueryConditionValue
QueryConditionValue createQueryConditionValue(QueryCondition newQueryCondition)
Create a newQueryConditionValue
linked to this object.- Parameters:
newQueryCondition
- The other parent of theQueryConditionValueQueryCondition
association.- Returns:
- a new
QueryConditionValue
.
-
getQueryConditionValueByQueryConditionInclude
QueryConditionValue getQueryConditionValueByQueryConditionInclude(QueryCondition queryCondition, QueryConditionValueInclude include)
Get the QueryConditionValue by QueryCondVal.- Parameters:
queryCondition
-include
-- Returns:
- the QueryConditionValue, or
null
if it could not be found
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkViewPrivilege
RequiredPermission checkViewPrivilege()
Check whether or not the view action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkEditPrivilege
RequiredPermission checkEditPrivilege()
Check whether or not the edit action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkDeletePrivilege
RequiredPermission checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-