com.endeca.portal.data.functions
Class SortConfig
java.lang.Object
com.endeca.portal.data.functions.QueryFunction
com.endeca.portal.data.functions.QueryConfig
com.endeca.portal.data.functions.SortConfig
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class SortConfig
- extends QueryConfig
Allow a sort to be applied to records returned from an executed QueryState.
If being used with a discovery service data source, this config's id property
should be equal to the id of the ResultsConfig it should apply to. By default,
it will apply to the default ResultsConfig.
- See Also:
- Serialized Form
Fields inherited from class com.endeca.portal.data.functions.QueryConfig |
id |
Constructor Summary |
protected |
SortConfig()
|
|
SortConfig(java.lang.String property)
|
|
SortConfig(java.lang.String property,
boolean ascending)
|
|
SortConfig(java.lang.String ownerId,
java.lang.String property)
|
|
SortConfig(java.lang.String ownerId,
java.lang.String property,
boolean ascending)
|
Method Summary |
void |
applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
Apply this function to a Request. |
void |
applyToENEQuery(com.endeca.navigation.ENEQuery query)
Apply this function to an ENEQuery. |
java.util.List<java.lang.reflect.Method> |
getGetters()
Return the list of property getters on this function. |
java.lang.String |
getOwnerId()
|
java.lang.String |
getProperty()
|
java.util.List<java.lang.reflect.Method> |
getSetters()
Return the list of property setters on this function. |
boolean |
isAscending()
|
void |
setAscending(boolean ascending)
|
void |
setAscending(java.lang.String ascending)
|
void |
setOwnerId(java.lang.String ownerId)
|
void |
setProperty(java.lang.String property)
|
java.lang.String |
toString()
This class' toString is abstract: all concrete subclasses are expected
to provide an implementation. toString is used in comparing QueryFunction
instances for equality, so if you implement a QueryFunction subclass
it is important that your toString implementation be consistent and
deterministic. |
Methods inherited from class com.endeca.portal.data.functions.QueryFunction |
clone, equals, equals, getInstance, getInstance, getName, getOperator, hashCode, init, setName, setOperator, setOperator, toJSON, toXML |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
SortConfig
protected SortConfig()
SortConfig
public SortConfig(java.lang.String property)
SortConfig
public SortConfig(java.lang.String ownerId,
java.lang.String property)
SortConfig
public SortConfig(java.lang.String property,
boolean ascending)
SortConfig
public SortConfig(java.lang.String ownerId,
java.lang.String property,
boolean ascending)
getProperty
public java.lang.String getProperty()
setProperty
public void setProperty(java.lang.String property)
isAscending
public boolean isAscending()
setAscending
public void setAscending(boolean ascending)
setAscending
public void setAscending(java.lang.String ascending)
getOwnerId
public java.lang.String getOwnerId()
setOwnerId
public void setOwnerId(java.lang.String ownerId)
getSetters
public java.util.List<java.lang.reflect.Method> getSetters()
- Description copied from class:
QueryFunction
- Return the list of property setters on this function. Must be implemented
by subclass. Required for correct JSON serialization/deserialization
support.
For most subclasses, implementing this method should be simple, as long as
your setter methods follow standard Java naming conventions (e.g.
"setPropertyName(PropertyType)"). All you should need to write is:
private static List setters = Reflection.getSetters(MyFunctionClass.class);
\@Override
public List getSetters() {
return setters;
}
- Specified by:
getSetters
in class QueryFunction
- Returns:
- the list of setters
getGetters
public java.util.List<java.lang.reflect.Method> getGetters()
- Description copied from class:
QueryFunction
- Return the list of property getters on this function. Must be implemented
by subclass. Required for correct JSON serialization/deserialization
support.
For most subclasses, implementing this method should be simple, as long as
your getter methods follow standard Java naming conventions (e.g.
"getPropertyName()"). All you should need to write is:
private static List getters = Reflection.getGetters(MyFunctionClass.class);
\@Override
public List getGetters() {
return getters;
}
- Specified by:
getGetters
in class QueryFunction
- Returns:
- the list of getters
applyToENEQuery
public void applyToENEQuery(com.endeca.navigation.ENEQuery query)
- Description copied from class:
QueryFunction
- Apply this function to an ENEQuery. Must be implemented by subclass.
- Specified by:
applyToENEQuery
in class QueryFunction
applyToDiscoveryServiceQuery
public void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
throws QueryFunctionUnsupportedException
- Description copied from class:
QueryFunction
- Apply this function to a Request. Must be implemented by subclass.
- Specified by:
applyToDiscoveryServiceQuery
in class QueryFunction
- Throws:
QueryFunctionUnsupportedException
toString
public java.lang.String toString()
- Description copied from class:
QueryFunction
- This class' toString is abstract: all concrete subclasses are expected
to provide an implementation. toString is used in comparing QueryFunction
instances for equality, so if you implement a QueryFunction subclass
it is important that your toString implementation be consistent and
deterministic.
- Specified by:
toString
in class QueryFunction