com.adobe.idp.um.api.infomodel
Class GenericSearchFilter

java.lang.Object
  extended by com.adobe.idp.um.api.infomodel.GenericSearchFilter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GroupMembershipSearchFilter, PermissionSearchFilter, PrincipalSearchFilter, ResourceTypeSearchFilter, RoleMembershipSearchFilter, RoleSearchFilter

public abstract class GenericSearchFilter
extends java.lang.Object
implements java.io.Serializable

Generic search filter class.

See Also:
Serialized Form

Field Summary
static int SEARCHTYPE_EQUALS
           
static int SEARCHTYPE_GREATER
           
static int SEARCHTYPE_GREATER_EQUALS
           
static int SEARCHTYPE_LESS
           
static int SEARCHTYPE_LESS_EQUALS
           
static int SEARCHTYPE_LIKE
           
static int SEARCHTYPE_LIKE_ENDS_WITH
           
static int SEARCHTYPE_LIKE_STARTS_WITH
           
 
Constructor Summary
GenericSearchFilter()
          Default constructor.
 
Method Summary
 int getResultsMax()
          Retrieves the maximum number of results.
 int getResultsOffset()
          Retrieves the offset index.
 java.util.Iterator getSearches()
          For internal use only.
 int getSearchType(java.lang.Object searchKey)
          For internal use only.
 java.lang.Object getSearchVal(java.lang.Object searchKey)
          For internal use only.
 java.lang.Object getSortField()
          Retrieves the sorting field.
 boolean isMatchExactCriteria()
           
 boolean isSearch(java.lang.Object searchKey)
          For internal use only.
 boolean isSortAscending()
          Determines whether the sorting results will occur in ascending order.
 void setMatchExactCriteria(boolean matchExactCriteria)
          Setting this flag to true would result in an exact search returning results that exactly match the search criteria.
 void setResultsMax(int resultsMax)
          Sets the total number of desired results.
 void setResultsOffset(int resultsOffset)
          Sets the offset index.
 void setSort(java.lang.Object sortField, boolean sortAscending)
          Sets the sort order of the returned results.
 void setSortAscending(boolean sortAscending)
          Sets the sort order of the returned results.
 void setSortField(java.lang.Object sortField)
          Set the field name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEARCHTYPE_LIKE_STARTS_WITH

public static final int SEARCHTYPE_LIKE_STARTS_WITH

SEARCHTYPE_LIKE

public static final int SEARCHTYPE_LIKE

SEARCHTYPE_LIKE_ENDS_WITH

public static final int SEARCHTYPE_LIKE_ENDS_WITH

SEARCHTYPE_EQUALS

public static final int SEARCHTYPE_EQUALS

SEARCHTYPE_GREATER_EQUALS

public static final int SEARCHTYPE_GREATER_EQUALS

SEARCHTYPE_LESS_EQUALS

public static final int SEARCHTYPE_LESS_EQUALS

SEARCHTYPE_GREATER

public static final int SEARCHTYPE_GREATER

SEARCHTYPE_LESS

public static final int SEARCHTYPE_LESS
Constructor Detail

GenericSearchFilter

public GenericSearchFilter()
Default constructor. By default, this filter will limit results to 10 instances.

Method Detail

getResultsMax

public int getResultsMax()
Retrieves the maximum number of results.

Returns:
The maximum number of results.

getResultsOffset

public int getResultsOffset()
Retrieves the offset index.

Returns:
The offset index.

setResultsMax

public void setResultsMax(int resultsMax)
Sets the total number of desired results. This is likely to be limited by the database, so you are advised to use values from 1 to 1000. The default value is 10.

Parameters:
resultsMax -

setResultsOffset

public void setResultsOffset(int resultsOffset)
Sets the offset index. In a Result Set the results would be returned skipping number of records set by offset. This method is used for pagination in the user interface.

Parameters:
resultsOffset -

setSort

public void setSort(java.lang.Object sortField,
                    boolean sortAscending)
Sets the sort order of the returned results.

Parameters:
sortField - A constant object. See, for example, SORT_* in PrincipalSearchFilter.
sortAscending - Determines whether the sorting results will occur in ascending order.

isSortAscending

public boolean isSortAscending()
Determines whether the sorting results will occur in ascending order.

Returns:
true if the sorting results will occur in ascending order, false otherwise.

setSortField

public void setSortField(java.lang.Object sortField)
Set the field name. It should be one of the SORT_* in PrincipalSearchFilter

Parameters:
sortField - A constant object. See, for example, SORT_* in PrincipalSearchFilter.

setSortAscending

public void setSortAscending(boolean sortAscending)
Sets the sort order of the returned results.

Parameters:
sortAscending - Determines whether the sorting results will occur in ascending order.

getSortField

public java.lang.Object getSortField()
Retrieves the sorting field.

Returns:
The sorting field.

isSearch

public boolean isSearch(java.lang.Object searchKey)
For internal use only.


getSearchVal

public java.lang.Object getSearchVal(java.lang.Object searchKey)
For internal use only.


getSearchType

public int getSearchType(java.lang.Object searchKey)
For internal use only.


getSearches

public java.util.Iterator getSearches()
For internal use only.


setMatchExactCriteria

public void setMatchExactCriteria(boolean matchExactCriteria)
Setting this flag to true would result in an exact search returning results that exactly match the search criteria. This flag should be set before setting any criteria, otherwise it will behave as wild-card search for attributes set before setting this flag.


isMatchExactCriteria

public boolean isMatchExactCriteria()