|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.information.FilterComponent
public class FilterComponent
The FilterComponent is used to build a filter to use to search a repository. It may have a key, value, relational operator, subcomponents, and aggregation operator. These pieces are put together by the Filter class to build a string to represent the filter in several different repository-specific formats.
The relation operations are used to test values against key names. The aggregation operation is used to join the pieces of the component.
Field Summary | |
---|---|
static int |
ALL_OF
All subcomponents of this component must be true for this component to be true. |
static int |
ANY_OF
If any of the subcomponents of this component are true, this component is true. |
static int |
CONTAINS
For this component to test true, the entity should have a key with a value that contains the value in this component. |
static int |
DAVSERVERNOTTEST
For this component to test true, the test must fail on the server |
static int |
DAVSERVERTEST
For this component to test true, the test must pass on the server |
static int |
ENDSWITH
For this component to test true, the entity should have a key with a value that ends with the value in this component. |
static int |
EQUALS
For this component to test true, the entity should have a key with a value that equals the value in this component. |
static int |
FULLTEXT
For this component to test true, the entity should contain the value specified in this component (full text search). |
static int |
GT
For this component to test true, the entity should have a key with a value that is greater than the value in this component. |
static int |
GTE
For this component to test true, the entity should have a key with a value that is greater than or equal to the value in this component. |
static int |
LT
For this component to test true, the entity should have a key with a value that is less than the value in this component. |
static int |
LTE
For this component to test true, the entity should have a key with a value that is less than or equal to the value in this component. |
static int |
NE
For this component to test true, the entity value specified should be not equal to the value provided. |
static int |
STARTSWITH
For this component to test true, the entity should have a key with a value that starts with the value in this component. |
Constructor Summary | |
---|---|
FilterComponent()
Default constructor. |
|
FilterComponent(java.lang.String key,
int relation,
java.lang.String value)
Create a new component with a key, a relation and a value. |
Method Summary | |
---|---|
void |
addAssociationPathComponent(com.sas.services.information.AssociationPathComponent newComponent)
Add an association path component to this component. |
void |
addAssociationPathComponent(com.sas.services.information.AssociationPathComponent newComponent,
int aggregation)
Add an association path component to this component. |
void |
addComponent(FilterComponent newComponent)
Add a subcomponent to this component. |
boolean |
containsAssociationPathComponents()
Does this filter component contain any association path filters |
boolean |
containsComponents()
Does this filter component contain any sub components |
int |
getAggregation()
Get the aggregation operator to use to test this component. |
java.util.Iterator<com.sas.services.information.AssociationPathComponent> |
getAssociationPathComponents()
Returns an iterator of the association path components of this component |
java.util.Iterator |
getComponents()
Return an iterator of the subcomponents of this component. |
java.lang.String |
getKey()
Get the attribute name to test for this component. |
int |
getRelation()
Get the type of relation to check. |
java.lang.String |
getValue()
Get the value to look for. |
void |
setAggregation(int aggregator)
Set the type of aggregation to use to test this component and its subscomponents. |
void |
setFilter(java.lang.String key,
int relation,
java.lang.String value)
Set the filter component elements. |
Field Detail |
---|
public static final int ALL_OF
public static final int ANY_OF
public static final int EQUALS
public static final int CONTAINS
public static final int STARTSWITH
public static final int ENDSWITH
public static final int DAVSERVERTEST
public static final int DAVSERVERNOTTEST
public static final int LT
public static final int LTE
public static final int GT
public static final int GTE
public static final int FULLTEXT
public static final int NE
Constructor Detail |
---|
public FilterComponent()
public FilterComponent(java.lang.String key, int relation, java.lang.String value)
key
- The attribute name to test against.relation
- The relationship test to make.value
- The value to test entities against.Method Detail |
---|
public void setFilter(java.lang.String key, int relation, java.lang.String value)
key
- The attribute name to test against.relation
- The relationship test to make.value
- The value to test entities against.public java.lang.String getKey()
public java.lang.String getValue()
public int getRelation()
public void addComponent(FilterComponent newComponent)
newComponent
- A new subcomponent to add to this component
to make complex search filters.public java.util.Iterator getComponents()
public boolean containsComponents()
public void addAssociationPathComponent(com.sas.services.information.AssociationPathComponent newComponent)
Multiple association paths are supported. Adding multiple components will "AND" the filters together.
newComponent
- a new association path subcomponent to add to this component.public void addAssociationPathComponent(com.sas.services.information.AssociationPathComponent newComponent, int aggregation)
By default, all association paths are concatenated together with the "AND" operator. Users
may choose to override this by setting the aggregation
parameter.
newComponent
- a new association path subcomponent to add to this component.aggregation
- the aggregation operator to use for this association path (ALL_OF, ANY_OF).public java.util.Iterator<com.sas.services.information.AssociationPathComponent> getAssociationPathComponents()
public boolean containsAssociationPathComponents()
public void setAggregation(int aggregator)
aggregator
- The aggregation operator to use (ALL_OF, ANY_OF).public int getAggregation()
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |