org.broadleafcommerce.openadmin.client.dto
Class FilterAndSortCriteria

java.lang.Object
  extended by org.broadleafcommerce.openadmin.client.dto.FilterAndSortCriteria
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable, Serializable

public class FilterAndSortCriteria
extends Object
implements com.google.gwt.user.client.rpc.IsSerializable, Serializable

Basic client-side persistent entity criteria representation for a single property of the target persistent entity.

This class is essentially an analogy of server-side property criteria regarding the filtering and sorting functionality.

Back on the server side, persistent entity property mappings are used to resolve:

Note that the propertyId of each FilterAndSortCriteria instance must be unique within the CriteriaTransferObject.

Author:
vojtech.szocs
See Also:
CriteriaTransferObject, Serialized Form

Nested Class Summary
protected static class FilterAndSortCriteria.SortType
           
 
Field Summary
protected  List<String> filterValues
           
protected  Boolean ignoreCase
           
protected  String propertyId
           
protected  Boolean sortAscending
          Deprecated. use sortType instead
protected  FilterAndSortCriteria.SortType sortType
           
 
Constructor Summary
FilterAndSortCriteria()
          Creates a new persistent entity criteria (for deserialization purposes only).
FilterAndSortCriteria(String propertyId)
          Creates a new persistent entity criteria.
 
Method Summary
 void clearFilterValues()
          Clears any filter value(s) set previously to this criteria.
 String[] getFilterValues()
           
 Boolean getIgnoreCase()
           
 String getPropertyId()
           
 Boolean getSortAscending()
           
 FilterAndSortCriteria.SortType getSortType()
           
 void setFilterValue(String value)
          Sets a single filter value to this criteria, replacing any filter value(s) set previously.
 void setFilterValues(List<String> filterValues)
           
 void setFilterValues(String... values)
          Sets multiple filter values to this criteria, replacing any filter value(s) set previously.
 void setIgnoreCase(Boolean ignoreCase)
           
 void setPropertyId(String propertyId)
           
 void setSortAscending(Boolean sortAscending)
          Deprecated. 
 void setSortType(FilterAndSortCriteria.SortType sortType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyId

protected String propertyId

filterValues

protected List<String> filterValues

ignoreCase

protected Boolean ignoreCase

sortType

protected FilterAndSortCriteria.SortType sortType

sortAscending

@Deprecated
protected Boolean sortAscending
Deprecated. use sortType instead
Constructor Detail

FilterAndSortCriteria

public FilterAndSortCriteria()
Creates a new persistent entity criteria (for deserialization purposes only).


FilterAndSortCriteria

public FilterAndSortCriteria(String propertyId)
Creates a new persistent entity criteria.

Parameters:
propertyId - Symbolic persistent entity property identifier.
Method Detail

getPropertyId

public String getPropertyId()
Returns:
Symbolic persistent entity property identifier.

setPropertyId

public void setPropertyId(String propertyId)
Parameters:
propertyId - the propertyId to set

getFilterValues

public String[] getFilterValues()
Returns:
Array of string-based filter values.

clearFilterValues

public void clearFilterValues()
Clears any filter value(s) set previously to this criteria.


setFilterValue

public void setFilterValue(String value)
Sets a single filter value to this criteria, replacing any filter value(s) set previously.

Parameters:
value - String-based filter value.

setFilterValues

public void setFilterValues(String... values)
Sets multiple filter values to this criteria, replacing any filter value(s) set previously.

Parameters:
values - String-based filter values.

setFilterValues

public void setFilterValues(List<String> filterValues)
Parameters:
filterValues - the filterValues to set

getSortAscending

public Boolean getSortAscending()
Returns:
true for ascending, false for descending sort order or null to disable the sorting functionality.

setSortAscending

@Deprecated
public void setSortAscending(Boolean sortAscending)
Deprecated. 


getSortType

public FilterAndSortCriteria.SortType getSortType()
Returns:
the sortType

setSortType

public void setSortType(FilterAndSortCriteria.SortType sortType)
Parameters:
sortType - the sortType to set

getIgnoreCase

public Boolean getIgnoreCase()
Returns:
true for case-insensitive sorting, false for case-sensitive sorting (applicable only when sortAscending is not null).

setIgnoreCase

public void setIgnoreCase(Boolean ignoreCase)
Parameters:
ignoreCase - true for case-insensitive sorting, false for case-sensitive sorting (applicable only when sortAscending is not null).


Copyright © 2013. All Rights Reserved.