|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A ReadableMetadataObjects
collection represents a collection of
ReadableMetadataObject
objects.
filterByProperty
and findByProperty
. All forms of these methods take as parameters a
property name, a relational operator, and a value. (The polymorphism comes from
the different data types for the value
parameter). Using the
relational operator, the methods compare an object's value for a property to
the given value.
The filterByProperty
methods return a collection that contains
references to all matching objects from the original collection. On the other
hand, the findByProperty
methods stop their comparison upon
finding the first match, and so always return a single ReadableMetadataObject
,
which might be null
.
Not all relational operators apply for all the polymorphic forms. Any restrictions
or caveats are noted in the descriptions of the specific methods. Note that a
null
property value is less than any non-null
parameter
value, and a non-null
property value is greater than any null
parameter value. To find
objects for which the value "is null" or "is not null", choose one of the
polymorphic forms in which the value is an Object and pass in null
for the value.
The ReadableMetadataObjects
interface also includes two forms
of the orderByProperty
method, which sorts the collection by
the given property.
Field Summary | |
static int |
IS_EQUAL
Relational operator for use with filterByProperty() or findByProperty() . |
static int |
IS_GREATER
Relational operator for use with filterByProperty() or findByProperty() . |
static int |
IS_GREATER_OR_EQUAL
Relational operator for use with filterByProperty() or findByProperty() . |
static int |
IS_LESS
Relational operator for use with filterByProperty() or findByProperty() . |
static int |
IS_LESS_OR_EQUAL
Relational operator for use with filterByProperty() or findByProperty() . |
static int |
IS_NOT_EQUAL
Relational operator for use with filterByProperty() or findByProperty() . |
Method Summary | |
ReadableMetadataObjects |
filterByProperty(java.lang.String propertyName,
int op,
boolean value)
Returns a collection of matching objects for the given property, relational operator, and boolean value. |
ReadableMetadataObjects |
filterByProperty(java.lang.String propertyName,
int op,
byte[] value)
Returns a collection of matching objects for the given property, relational operator, and byte array of binary values. |
ReadableMetadataObjects |
filterByProperty(java.lang.String propertyName,
int op,
java.util.Date value)
Returns a collection of matching objects for the given property, relational operator, and Date value.
|
ReadableMetadataObjects |
filterByProperty(java.lang.String propertyName,
int op,
double value)
Returns a collection of matching objects for the given property, relational operator, and double value. |
ReadableMetadataObjects |
filterByProperty(java.lang.String propertyName,
int op,
int value)
Returns a collection of matching objects for the given property, relational operator, and integer value. |
ReadableMetadataObjects |
filterByProperty(java.lang.String propertyName,
int op,
ReadableMetadataObject value)
Not Implemented in CS Java Connector v3.0. |
ReadableMetadataObjects |
filterByProperty(java.lang.String propertyName,
int op,
java.lang.String value)
Returns a collection of matching objects for the given property, relational operator, and String value. |
ReadableMetadataObject |
findByProperty(java.lang.String propertyName,
int op,
boolean value)
Returns, at most, one matching object for the given property, relational operator, and boolean value. |
ReadableMetadataObject |
findByProperty(java.lang.String propertyName,
int op,
byte[] value)
Returns, at most, one matching object for the given property, relational operator, and byte array of binary values. |
ReadableMetadataObject |
findByProperty(java.lang.String propertyName,
int op,
java.util.Date value)
Returns, at most, one matching object for the given property, relational operator, and Date value.
|
ReadableMetadataObject |
findByProperty(java.lang.String propertyName,
int op,
double value)
Returns, at most, one matching object for the given property, relational operator, and double value. |
ReadableMetadataObject |
findByProperty(java.lang.String propertyName,
int op,
int value)
Returns, at most, one matching object for the given property, relational operator, and integer value. |
ReadableMetadataObject |
findByProperty(java.lang.String propertyName,
int op,
ReadableMetadataObject value)
Not Implemented in CS Java Connector v3.0. |
ReadableMetadataObject |
findByProperty(java.lang.String propertyName,
int op,
java.lang.String value)
Returns, at most, one matching object for the given property, relational operator, and String value. |
void |
orderByProperty(java.lang.String propertyName)
Sorts this ReadableMetadataObjects collection by the given
property. |
void |
orderByProperty(java.lang.String propertyName,
java.util.Locale loc)
Sorts this ReadableMetadataObjects collection by the given
String-valued property for the specified locale. |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Field Detail |
public static final int IS_EQUAL
filterByProperty()
or findByProperty()
.
public static final int IS_NOT_EQUAL
filterByProperty()
or findByProperty()
.
public static final int IS_GREATER
filterByProperty()
or findByProperty()
.
public static final int IS_GREATER_OR_EQUAL
filterByProperty()
or findByProperty()
.
public static final int IS_LESS
filterByProperty()
or findByProperty()
.
public static final int IS_LESS_OR_EQUAL
filterByProperty()
or findByProperty()
.
Method Detail |
public ReadableMetadataObjects filterByProperty(java.lang.String propertyName, int op, byte[] value) throws PropertyNotFoundException
byte
array of binary values. The comparisons are lexical
byte-by-byte comparisons and do not use locale-based collation rules.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- A byte
array of binary values to which
objects' property values are compared.
ReadableMetadataObjects
collection. The elements of the returned
collection are objects that match the filtering criteria. If no matches
are found, returns an empty collection.
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObjects filterByProperty(java.lang.String propertyName, int op, boolean value) throws PropertyNotFoundException
boolean
value. To test for a null
value, specify false
in the value
parameter.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
You can use only IS_EQUAL
and
IS_NOT_EQUAL
with this variant of the method.
value
- The boolean
value to which objects' property values are compared.
Specify false
for a null
value.
ReadableMetadataObjects
collection. The elements of the returned
collection are objects that match the filtering criteria. If no matches
are found, returns an empty collection.
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObjects filterByProperty(java.lang.String propertyName, int op, java.util.Date value) throws PropertyNotFoundException
Date
value.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- The Date
value to which objects' property values are compared.
ReadableMetadataObjects
collection. The elements of the returned
collection are objects that match the filtering criteria. If no matches
are found, returns an empty collection.
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObjects filterByProperty(java.lang.String propertyName, int op, double value) throws PropertyNotFoundException
double
value. To test for
a null
value, specify Double.NaN
in the
value
parameter.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- The double
value to which objects' property values are compared.
Specify Double.NaN
for a null
value.
ReadableMetadataObjects
collection. The elements of the returned
collection are objects that match the filtering criteria. If no matches
are found, returns an empty collection.
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObjects filterByProperty(java.lang.String propertyName, int op, int value) throws PropertyNotFoundException
null
value,
specify Integer.MIN_VALUE
in the value
parameter.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- The int
value to which objects' property values are compared.
Specify Integer.MIN_VALUE
for a null
value.
ReadableMetadataObjects
collection. The elements of the returned
collection are objects that match the filtering criteria. If no matches
are found, returns an empty collection.
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObjects filterByProperty(java.lang.String propertyName, int op, java.lang.String value) throws PropertyNotFoundException
String
value. The String comparisons
are lexical comparisons done
via the String.compareTo
method. These comparisons do not use locale-based
collation rules.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- The String
value to which objects' property values are compared.
ReadableMetadataObjects
collection. The elements of the returned
collection are objects that match the filtering criteria. If no matches
are found, returns an empty collection.
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObjects filterByProperty(java.lang.String propertyName, int op, ReadableMetadataObject value) throws PropertyNotFoundException
Not Implemented in CS Java Connector v3.0.
Returns a collection of matching objects for the given property, relational operator, andReadableMetadataObject
value. To
test for a null value, specify a null cast to a ReadableMetadataObject
in the value
parameter.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this
interface. You can use only IS_EQUAL
and
IS_NOT_EQUAL
with this variant of the method.
value
- The ReadableMetadataObject
value to which
objects' property values are compared.
ReadableMetadataObjects
collection. The elements
of the returned collection are objects that match the filtering
criteria. If no matches are found, returns an empty collection.
PropertyNotFoundException
- Thrown when one or more of the objects
in the collection do not have a property of the given name.public ReadableMetadataObject findByProperty(java.lang.String propertyName, int op, byte[] value) throws PropertyNotFoundException
byte
array of binary values. The comparisons
are lexical byte-by-byte comparisons and do not use locale-based
collation rules.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined
in this interface.
value
- A byte
array of binary values to which objects'
property values are compared.
null
if no
matches are found).
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObject findByProperty(java.lang.String propertyName, int op, boolean value) throws PropertyNotFoundException
boolean
value. To test for a null
value, specify false
in the value
parameter.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
You can use only IS_EQUAL
and
IS_NOT_EQUAL
with this variant of the method.
value
- The boolean
value to which objects' property values are compared.
Specify false
for a null
value.
null
if no matches are found).
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObject findByProperty(java.lang.String propertyName, int op, java.util.Date value) throws PropertyNotFoundException
Date
value.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- The Date
value to which objects' property values are compared.
null
if no matches are found).
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObject findByProperty(java.lang.String propertyName, int op, double value) throws PropertyNotFoundException
double
value. To test for a null
value, specify Double.NaN
in the value
parameter.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- The double
value to which objects' property values are compared.
Specify Double.NaN
for a null
value.
null
if no matches are found).
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObject findByProperty(java.lang.String propertyName, int op, int value) throws PropertyNotFoundException
null
value,
specify Integer.MIN_VALUE
in the value
parameter.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- The int
value to which objects' property values are compared.
Specify Integer.MIN_VALUE
for a null
value.
null
if no matches are found).
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObject findByProperty(java.lang.String propertyName, int op, java.lang.String value) throws PropertyNotFoundException
String
value. The String comparisons are lexical comparisons done
via the String.compareTo
method. These comparisons do not use locale-based
collation rules.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this interface.
value
- The String
value to which objects' property values are compared.
null
if no matches are found).
PropertyNotFoundException
- Thrown when the objects in the collection do not have a property of
the given name.public ReadableMetadataObject findByProperty(java.lang.String propertyName, int op, ReadableMetadataObject value) throws PropertyNotFoundException
Not Implemented in CS Java Connector v3.0.
Returns, at most, one matching object for the given property, relational operator, andReadableMetadataObject
value. To test for a null
value, specify a null cast to a ReadableMetadataObject
in the
value
parameter.
propertyName
- A String
that is the symbolic name of the property to
be examined. (The Property
interface has constants for well-known properties.)
op
- A relational operator selected from among those defined in this
interface. You can use only IS_EQUAL
and
IS_NOT_EQUAL
with this variant of the method.
value
- The ReadableMetadataObject
value to which
objects' property values are compared.
null
if no
matches are found).
PropertyNotFoundException
- Thrown when one or more of the objects
in the collection do not have a property of the given name.public void orderByProperty(java.lang.String propertyName) throws PropertyNotFoundException
ReadableMetadataObjects
collection by the given
property. Collation is in ascending order based on the value of the
property. This method uses the default locale for this instance of the
Java Virtual Machine. For locale-sensitive sorting on String-valued
properties, use the
orderByProperty(propertyName, loc)
form of this method. When specifying the symbolic name of the property,
you can use constants available in the
Property
interface.
For example, the following code fragment retrieves a collection of documents
filed in a folder, then sorts them by their DocumentTitle property:
Folder someFolder = (Folder) objectStore.getObject(BaseObject.TYPE_FOLDER,"/Some Folder");
int[] filter = {BaseObject.TYPE_DOCUMENT};
ReadableMetadataObjects someDocs = (ReadableMetadataObjects) someFolder.getContainees(filter);
someDocs.orderByProperty("DocumentTitle");
Iterator iter = someDocs.iterator();
while(iter.hasNext())
{
ReadableMetadataObject d = (ReadableMetadataObject) iter.next();
System.out.println("Title is: " +
d.getPropertyStringValue("DocumentTitle"));
}
propertyName
- A String
that specifies the symbolic name of the
property used to determine the order of the collection.
(The Property
interface has constants for well-known properties.)
PropertyNotFoundException
- Thrown when an object in the collection
does not have a property of the given name.public void orderByProperty(java.lang.String propertyName, java.util.Locale loc) throws PropertyNotFoundException
ReadableMetadataObjects
collection by the given
String-valued property for the specified locale. Collation is in ascending
order based on the value of the property. This method does not throw an
exception if the specified property is not String-valued, but the loc
parameter is ignored and the default locale for this instance of the
Java Virtual Machine is used instead. When specifying the symbolic name
of the property, you can use constants available in the
Property
interface.
propertyName
- A String
that specifies the symbolic name of the
property used to determine the order of the collection.
(The Property
interface has constants for well-known properties.)
loc
- A java.util.Locale
object that specifies the
locale to use. Ignored if propertyName
does not
specify a String-valued property.
PropertyNotFoundException
- Thrown when an object in the collection
does not have a property of the given name.
|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |