org.kuali.rice.krad.datadictionary
Class SortDefinition

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
          extended by org.kuali.rice.krad.datadictionary.SortDefinition
All Implemented Interfaces:
Serializable, DataDictionaryDefinition, DictionaryBean, org.springframework.beans.factory.InitializingBean

public class SortDefinition
extends DataDictionaryDefinitionBase

The defaultSort element specifies the sequence in which the lookup search results should be displayed

It contains an ascending/descending indicator and a list of attribute names. JSTL: defaultSort is a Map with the following keys: sortAscending (boolean String) and sortAttributes (Map). By the time JSTL export occurs, the optional attributeName from the defaultSort tag will have been converted into the first contained sortAttribute.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
protected  List<String> attributeNames
           
protected  boolean sortAscending
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
id
 
Constructor Summary
SortDefinition()
           
 
Method Summary
 void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass)
          Directly validate simple fields
 List<String> getAttributeNames()
           
 boolean getSortAscending()
          Indicates that the items must be sorted in ascending order
 void setAttributeName(String attributeName)
          The sortAttribute element defines one part of the sort key.
 void setAttributeNames(List<String> attributeNames)
          The sortAttributes element allows a multiple-part sort key to be defined JSTL: sortAttributes is a Map which is accessed using a key of "sortAttributes".
 void setSortAscending(boolean sortAscending)
          Setter for the flag to indicate ascending sorting of items
 String toString()
           
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
afterPropertiesSet, getId, setId
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, copyProperties, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 

Field Detail

sortAscending

protected boolean sortAscending

attributeNames

protected List<String> attributeNames
Constructor Detail

SortDefinition

public SortDefinition()
Method Detail

setAttributeName

public void setAttributeName(String attributeName)
The sortAttribute element defines one part of the sort key. The full sort key is comprised of the sortAttribute's in the order in which they have been defined. DD: See SortAttributesDefinition.java. JSTL: sortAttribute is a Map which is accessed using a key of the attributeName of the sortAttribute. It contains a single entry with the following key: "attributeName" The associated value is the attributeName of the sortAttribute. See LookupMapBuilder.java

Throws:
IllegalArgumentException - if the given attributeName is blank

getAttributeNames

public List<String> getAttributeNames()
Returns:
the List of associated attribute names as Strings

getSortAscending

public boolean getSortAscending()
Indicates that the items must be sorted in ascending order

Returns:
true if items should sort in ascending order

setSortAscending

public void setSortAscending(boolean sortAscending)
Setter for the flag to indicate ascending sorting of items

Parameters:
sortAscending -

completeValidation

public void completeValidation(Class rootBusinessObjectClass,
                               Class otherBusinessObjectClass)
Directly validate simple fields

Parameters:
rootBusinessObjectClass - Class of the BusinessObjectEntry which ultimately contains this definition
otherBusinessObjectClass - other stuff required to complete validation
See Also:
DataDictionaryDefinition.completeValidation(Class, Class)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

setAttributeNames

public void setAttributeNames(List<String> attributeNames)
The sortAttributes element allows a multiple-part sort key to be defined JSTL: sortAttributes is a Map which is accessed using a key of "sortAttributes". This map contains an entry for sort attribute. The key is: attributeName of a sort field. The associated value is a sortAttribute ExportMap.



Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.