com.filenet.api.property
Class PropertyFilter
- java.lang.Object
-
- com.filenet.api.property.PropertyFilter
-
- All Implemented Interfaces:
- java.io.Serializable
public class PropertyFilter extends java.lang.Object implements java.io.Serializable
Represents information, used in conjunction with one or moreFilterElement
objects, for controlling which properties of a Content Engine object (and with what level of detail) to return from the server during an object retrieval or an object refresh. Because the number and size of properties may be large for certain objects, using a property filter to retrieve a subset of the available properties can result in better performance by reducing the amount of data that is retrieved from the server.A
PropertyFilter
object has the following components:- Zero or more IncludeProperty specifications; each of which specifies, by identifier, one or more properties
to retrieve from the server. You create an IncludeProperty specification by calling one of the
addIncludeProperty
methods. Each IncludeProperty specification is encapsulated in aFilterElement
object, which specifies the properties to retrieve and optionally specifies the maxSize, maxRecursion, levelDependents, and pageSize attributes. You can also set the global defaults for these attributes using the appropriatePropertyFilter
method. You specify each property to be retrieved by its symbolic name, or alternatively by its assigned GUID, in a space-separated list. In general, you should specify properties with their symbolic names usingPropertyNames
string constants and avoid the use of GUIDs. - Zero or more IncludeType specifications; each of which specifies, by type, properties to retrieve from the
server. The property type specification is set to one of the
FilteredPropertyType
constants (for example,FilteredPropertyType.ANY_SINGLETON
, which specifies all properties of single cardinality). You create an IncludeType specification by calling one of theaddIncludeType
methods. Each IncludeType specification is encapsulated in aFilterElement
object, which specifies the type of property to retrieve and optionally specifies the maxSize, maxRecursion, levelDependents, and pageSize attributes. You can also set the global defaults for these attributes using the appropriatePropertyFilter
method. - Zero or more ExcludeProperty specifications; each of which specifies, by identifier, one or more
properties to be excluded from server retrieval. Any properties specified for exclusion will override those
properties that are specified in an IncludeProperty or IncludeType specification. You create an ExcludeProperty
specification by calling the
addExcludeProperty
method. You specify each property to be excluded by its symbolic name, or alternatively by its assigned GUID, in a space-separated list. In general, you should specify properties with their symbolic names usingPropertyNames
string constants and avoid the use of GUIDs.
In addition, a
PropertyFilter
object has attributes you can set that control how property values are retrieved. These attributes act as global defaults for thePropertyFilter
object. You can override each of these attributes for an individualFilterElement
object when you call anaddIncludeProperty
oraddIncludeType
method. For any attribute not specified for aFilterElement
object, the global attribute value for thePropertyFilter
object applies. If a global value is unspecified, a default value applies. Each of the following attributes can be set by the appropriatePropertyFilter
method:- levelDependents: A
Boolean
that specifies whether the recursion level to use when retrieving a dependent object is the same as that of the independent object to which it belongs (true
) or one level deeper (false
). Set this value via thesetLevelDependents
method. - maxRecursion: A zero-based
Integer
that specifies the maximum allowable recursion depth to use when retrieving property relationships. This attribute determines the level of depth at which property values are included. If unspecified, the default is zero. Set this value via thesetMaxRecursion
method. - maxSize: A
Long
that specifies the maximum size, in bytes, of content data that can be returned when properties that hold content data are retrieved. If the amount of content data held by retrieved properties exceeds this size, no content data is returned. If unspecified, the default is to return all content data, no matter how large. Set this value via thesetMaxSize
method. - pageSize: An
Integer
that specifies the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties. The iterator page size determines how many elements of an independent object set are retrieved during each fetch. If the page size is unspecified, by default the server uses the value of the QueryPageDefaultSize property of theServerCacheConfiguration
object (the default for this property is 500). If the page size exceeds the value of the QueryPageMaxSize property of theServerCacheConfiguration
object (the default for this property is 1000), the server uses the value of the QueryPageMaxSize property instead. Set this value via thesetPageSize(int pageSize)
orsetPageSize(Integer pageSize)
method.
Property filter precedence rules:
- Properties specified in an ExcludeProperty specification override those specified in an IncludeProperty or IncludeType specification. That is, if the same property is specified to be excluded in an ExcludeProperty specification and specified to be included in an IncludeProperty or IncludeType specification, the property will be excluded.
- If a property is specified in both an IncludeProperty and an IncludeType specification, only attributes from the IncludeProperty specification apply.
- If a property is specified more than once in an IncludeProperty specification, only the attributes from the first appearance apply.
- If a property type is specified by more than one means (for example, a
PropertyFilter
object has an IncludeType specification that specifiesFilteredPropertyType.SINGLETON_STRING
and another that specifiesFilteredPropertyType.ANY_SINGLETON
), the attributes from the most specific occurrence (in the previous example, the former specification) apply. - If a property type is specified more than once by the same means, only the attributes from the first appearance apply.
- See Also:
FilterElement
,FilteredPropertyType
, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description PropertyFilter()
-
Method Summary
Methods Modifier and Type Method and Description void
addExcludeProperty(java.lang.String value)
Adds one or more properties to be excluded during an object retrieval or object refresh.void
addIncludeProperty(FilterElement fe)
Adds one or more properties, specified in aFilterElement
object, to be included during an object retrieval or object refresh.void
addIncludeProperty(int maxRecursion, java.lang.Long maxSize, java.lang.Boolean levelDependents, java.lang.String value)
Deprecated.void
addIncludeProperty(int maxRecursion, java.lang.Long maxSize, java.lang.Boolean levelDependents, java.lang.String value, java.lang.Integer pageSize)
Creates aFilterElement
object and adds one or more properties to be included during an object retrieval or object refresh.void
addIncludeType(FilterElement fe)
Adds properties identified by type in aFilterElement
object to be included during an object retrieval or object refresh.void
addIncludeType(int maxRecursion, java.lang.Long maxSize, java.lang.Boolean levelDependents, FilteredPropertyType value)
Deprecated.void
addIncludeType(int maxRecursion, java.lang.Long maxSize, java.lang.Boolean levelDependents, FilteredPropertyType value, java.lang.Integer pageSize)
Creates aFilterElement
object and adds properties identified by type to be included during an object retrieval or object refresh.java.lang.String[]
getExcludeProperties()
Returns an array of ExcludeProperty specifications, each of which identifies the properties to be excluded during an object retrieval or object refresh.FilterElement[]
getIncludeProperties()
Returns an array ofFilterElement
objects, each of which identifies one or more properties by to be included during an object retrieval or object refresh.FilterElement[]
getIncludeTypes()
Returns an array ofFilterElement
objects, each of which identifies properties to be included by type during an object retrieval or object refresh.java.lang.Boolean
getLevelDependents()
Returns whether the recursion level that the property filter uses when retrieving a dependent object is the same as that of the independent object to which it belongs (true
) or one level deeper (false
).java.lang.Integer
getMaxRecursion()
Returns the maximum recursion depth for the property filter to use when retrieving property relationships.java.lang.Long
getMaxSize()
Returns the maximum size of content data that the property filter is allowed to retrieve.java.lang.Integer
getPageSize()
Returns the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties.void
setLevelDependents(boolean levelDependents)
Sets whether the recursion level that the property filter uses when retrieving a dependent object is the same as that of the independent object to which it belongs (true
) or one level deeper (false
).void
setLevelDependents(java.lang.Boolean levelDependents)
Sets whether the recursion level that the property filter uses when retrieving a dependent object is the same as that of the independent object to which it belongs (true
) or one level deeper (false
).void
setMaxRecursion(int maxRecursion)
Sets the maximum recursion depth for the property filter to use when retrieving property relationships.void
setMaxRecursion(java.lang.Integer maxRecursion)
Sets the maximum recursion depth for the property filter to use when retrieving property relationships.void
setMaxSize(java.lang.Long maxSize)
Sets the maximum size of content data that the property filter is allowed to retrieve.void
setPageSize(int pageSize)
Sets the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties.void
setPageSize(java.lang.Integer pageSize)
Sets the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties.java.lang.String
toString()
Returns a string describing thisPropertyFilter
object.
-
-
-
Method Detail
-
getPageSize
public java.lang.Integer getPageSize()
Returns the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties. The iterator page size determines how many elements of an independent object set are retrieved from the server during each fetch. You can set this value by calling one of thesetPageSize
methods of thisPropertyFilter
object.- Returns:
- An
Integer
specifying the iterator page size for independent object sets.
-
setPageSize
public void setPageSize(int pageSize)
Sets the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties. The iterator page size determines how many elements of an independent object set are retrieved from the server during each fetch. If the filter element of a property has a value for pageSize, the server uses the filter element's value instead of this global value. If neither the global value nor the filter element value is specified, by default the server uses the value of the QueryPageDefaultSize property of theServerCacheConfiguration
object (the default for this property is 500). If the page size exceeds the value of the QueryPageMaxSize property of theServerCacheConfiguration
object (the default for this property is 1000), the server uses the value of the QueryPageMaxSize property instead.- Parameters:
pageSize
- Anint
specifying the iterator page size for independent object sets.
-
setPageSize
public void setPageSize(java.lang.Integer pageSize)
Sets the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties. The iterator page size determines how many elements of an independent object set are retrieved from the server during each fetch. If the filter element of a property has a value for pageSize, the server uses the filter element's value instead of this global value. If neither the global value nor the filter element value is specified, by default the server uses the value of the QueryPageDefaultSize property of theServerCacheConfiguration
object (the default for this property is 500). If the page size exceeds the value of the QueryPageMaxSize property of theServerCacheConfiguration
object (the default for this property is 1000), the server uses the value of the QueryPageMaxSize property instead.- Parameters:
pageSize
- AnInteger
that specifies the iterator page size for independent object sets.
-
setMaxRecursion
public void setMaxRecursion(int maxRecursion)
Sets the maximum recursion depth for the property filter to use when retrieving property relationships. The value set is the global value for thisPropertyFilter
object. If the filter element of a property has a value for maxRecursion, the server uses the filter element's value instead of this global value. If neither the global value nor the filter element value is specified, the default is 0.- Parameters:
maxRecursion
- Anint
that specifies the maximum allowable recursion depth for property retrieval.
-
setMaxRecursion
public void setMaxRecursion(java.lang.Integer maxRecursion)
Sets the maximum recursion depth for the property filter to use when retrieving property relationships. The value set is the global value for thisPropertyFilter
object. If the filter element of a property has a value for maxRecursion, the server uses the filter element's value instead of this global value. If neither the global nor the filter element value is specified, the default is 0.- Parameters:
maxRecursion
- AnInteger
that specifies the maximum allowable recursion depth for property retrieval.
-
getMaxRecursion
public java.lang.Integer getMaxRecursion()
Returns the maximum recursion depth for the property filter to use when retrieving property relationships. The returned value is the global value for thisPropertyFilter
object. You can set this value by calling one of thesetMaxRecursion
methods of thisPropertyFilter
object.- Returns:
- An
Integer
specifying the maximum recursion depth; returns 0 if the value of the property filter's global maximum recursion level isnull
.
-
setMaxSize
public void setMaxSize(java.lang.Long maxSize)
Sets the maximum size of content data that the property filter is allowed to retrieve.- Parameters:
maxSize
- ALong
that specifies the maximum size (in bytes) of content data that can be retrieved. If this size is exceeded, no content data is retrieved. The value set is the global value for thisPropertyFilter
object. If the filter element of a property has a value for maxSize, the server uses the filter element's value instead of this global value. If neither the global value nor the filter element value is specified, by default there is no limit on the amount of content data that can be retrieved.
-
getMaxSize
public java.lang.Long getMaxSize()
Returns the maximum size of content data that the property filter is allowed to retrieve. If this size is exceeded, no content data is retrieved. The returned value is a global value for thisPropertyFilter
object. You can set this value by calling thesetMaxSize
method of thisPropertyFilter
object.- Returns:
- A
Long
specifying the maximum size (in bytes) of content data.
-
getLevelDependents
public java.lang.Boolean getLevelDependents()
Returns whether the recursion level that the property filter uses when retrieving a dependent object is the same as that of the independent object to which it belongs (true
) or one level deeper (false
). The returned value is a global value for thisPropertyFilter
object. You can set this value by calling one of thesetLevelDependents
methods of thisPropertyFilter
object.- Returns:
true
if the recursion level for a dependent object is the same as that of the independent object containing it;false
if one level deeper.
-
setLevelDependents
public void setLevelDependents(boolean levelDependents)
Sets whether the recursion level that the property filter uses when retrieving a dependent object is the same as that of the independent object to which it belongs (true
) or one level deeper (false
). The value set is the global value for thisPropertyFilter
object. If the filter element of a property has a value for levelDependents, the server uses the filter element's value instead of this global value. If neither the global value nor the filter element value is specified, the default isfalse
.- Parameters:
levelDependents
-true
if the recursion level for a dependent object is the same as that of the independent object to which it belongs;false
if one level deeper.
-
setLevelDependents
public void setLevelDependents(java.lang.Boolean levelDependents)
Sets whether the recursion level that the property filter uses when retrieving a dependent object is the same as that of the independent object to which it belongs (true
) or one level deeper (false
). The value set is the global value for thisPropertyFilter
object. If the filter element of a property has a value for levelDependents, the server uses the filter element's value instead of this global value. If neither the global value nor the filter element value is specified, the the default isfalse
.- Parameters:
levelDependents
-true
if the recursion level for a dependent object is the same as that of the independent object to which it belongs;false
if one level deeper.
-
addIncludeProperty
public void addIncludeProperty(FilterElement fe)
Adds one or more properties, specified in aFilterElement
object, to be included during an object retrieval or object refresh.- Parameters:
fe
- AFilterElement
object specifying the properties to include.
-
addIncludeProperty
public void addIncludeProperty(int maxRecursion, java.lang.Long maxSize, java.lang.Boolean levelDependents, java.lang.String value, java.lang.Integer pageSize)
Creates aFilterElement
object and adds one or more properties to be included during an object retrieval or object refresh.- Parameters:
maxRecursion
- An integer that specifies the maximum allowable recursion depth for property retrieval. This value overrides the global value set by thisPropertyFilter
object.maxSize
- ALong
that specifies the maximum size of content data that can be retrieved. This value overrides the global value set by thisPropertyFilter
object.levelDependents
-true
if the recursion level for a dependent object is the same as that of the independent object to which it belongs;false
if one level deeper. This value overrides the global value set by thisPropertyFilter
object.value
- AString
that specifies a space-separated list of the symbolic names (preferably usingPropertyNames
constants) of the properties to include.pageSize
- AnInteger
that specifies the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties. The iterator page size determines how many elements of an independent object set are retrieved from the server during each fetch. This value overrides the global value set by thisPropertyFilter
object.
-
addIncludeProperty
public void addIncludeProperty(int maxRecursion, java.lang.Long maxSize, java.lang.Boolean levelDependents, java.lang.String value)
Deprecated.Creates aFilterElement
object and adds one or more properties to be included during an object retrieval or object refresh.- Parameters:
maxRecursion
- An integer that specifies the maximum allowable recursion depth for property retrieval. This value overrides the global value set by thisPropertyFilter
object.maxSize
- ALong
that specifies the maximum size of content data that can be retrieved. This value overrides the global value set by thisPropertyFilter
object.levelDependents
-true
if the recursion level for a dependent object is the same as that of the independent object to which it belongs;false
if one level deeper. This value overrides the global value set by thisPropertyFilter
object.value
- AString
that specifies a space-separated list of the symbolic names (preferably usingPropertyNames
constants) of the properties to include.
-
getIncludeProperties
public FilterElement[] getIncludeProperties()
Returns an array ofFilterElement
objects, each of which identifies one or more properties by to be included during an object retrieval or object refresh.- Returns:
- An array of
FilterElement
objects. If thisPropertyFilter
object does not have any IncludeProperty specifications, this method returns an empty array.
-
addExcludeProperty
public void addExcludeProperty(java.lang.String value)
Adds one or more properties to be excluded during an object retrieval or object refresh. Any properties specified for exclusion will override those properties that are specified in an IncludeProperty or IncludeType specification.- Parameters:
value
- AString
that specifies a space-separated list of the symbolic names (preferably usingPropertyNames
constants) of the properties to exclude.
-
getExcludeProperties
public java.lang.String[] getExcludeProperties()
Returns an array of ExcludeProperty specifications, each of which identifies the properties to be excluded during an object retrieval or object refresh. Any properties specified for exclusion will override those properties that are specified in an IncludeProperty or IncludeType specification.- Returns:
- A
String
array specifying the properties to be excluded. If thisPropertyFilter
object does not have any ExcludeProperty specifications defined, this method returns an empty array.
-
addIncludeType
public void addIncludeType(FilterElement fe)
Adds properties identified by type in aFilterElement
object to be included during an object retrieval or object refresh. The property type can be specified in theFilterElement
object by a singleFilteredPropertyType
constant or a space-separated list of type specifiers.- Parameters:
fe
- AFilterElement
object specifying the type of properties to include.
-
addIncludeType
public void addIncludeType(int maxRecursion, java.lang.Long maxSize, java.lang.Boolean levelDependents, FilteredPropertyType value, java.lang.Integer pageSize)
Creates aFilterElement
object and adds properties identified by type to be included during an object retrieval or object refresh.- Parameters:
maxRecursion
- Anint
that specifies the maximum allowable recursion depth for property retrieval. This value overrides the global value set by thisPropertyFilter
object.maxSize
- ALong
that specifies the maximum size of content data that can be retrieved. This value overrides the global value set by thisPropertyFilter
object.levelDependents
-true
if the recursion level for a dependent object is the same as that of the independent object to which it belongs;false
if one level deeper. This value overrides the global value set by thisPropertyFilter
object.value
- AFilteredPropertyType
constant specifying the type of the properties to include.pageSize
- AnInteger
that specifies the iterator page size for independent object sets returned byPropertyIndependentObjectSet
properties. The iterator page size determines how many elements of an independent object set are retrieved from the server during each fetch. This value overrides the global value set by thisPropertyFilter
object.
-
addIncludeType
public void addIncludeType(int maxRecursion, java.lang.Long maxSize, java.lang.Boolean levelDependents, FilteredPropertyType value)
Deprecated.Creates aFilterElement
object and adds properties identified by type to be included during an object retrieval or object refresh.- Parameters:
maxRecursion
- Anint
that specifies the maximum allowable recursion depth for property retrieval. This value overrides the global value set by thisPropertyFilter
object.maxSize
- ALong
that specifies the maximum size of content data that can be retrieved. This value overrides the global value set by thisPropertyFilter
object.levelDependents
-true
if the recursion level for a dependent object is the same as that of the independent object to which it belongs;false
if one level deeper. This value overrides the global value set by thisPropertyFilter
object.value
- AFilteredPropertyType
constant specifying the type of the properties to include.
-
getIncludeTypes
public FilterElement[] getIncludeTypes()
Returns an array ofFilterElement
objects, each of which identifies properties to be included by type during an object retrieval or object refresh.- Returns:
- An array of
FilterElement
objects. If thisPropertyFilter
object does not have any IncludeType specifications, this method returns an empty array.
-
toString
public java.lang.String toString()
Returns a string describing thisPropertyFilter
object. The string includes the object's class name and its maxRecursion, maxSize, pageSize, and levelDependents attributes. In addition, the string includes the object's list of included properties, list of included property types, and list of excluded properties.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A
String
that represents thisPropertyFilter
object.
-
-