org.palo.api.subsets.filter.settings
Class SortingFilterSetting

java.lang.Object
  extended by org.palo.api.subsets.filter.settings.AbstractFilterSettings
      extended by org.palo.api.subsets.filter.settings.SortingFilterSetting
All Implemented Interfaces:
FilterSetting

public class SortingFilterSetting
extends AbstractFilterSettings

SortingFilterSetting

Manages the settings for the SortingFilter.

Version:
$Id: SortingFilterSetting.html,v 1.5 2009/07/09 11:01:46 ArndHouben Exp $

Field Summary
static int HIERARCHICAL_MODE_DISABLED
           
static int HIERARCHICAL_MODE_HIDE_CHILDREN
           
static int HIERARCHICAL_MODE_SHOW_CHILDREN
           
static int ORDER_MODE_REVERSE_DISABLED
           
static int ORDER_MODE_REVERSE_PER_LEVEL
           
static int ORDER_MODE_REVERSE_TOTAL
           
static int SORT_CRITERIA_ALIAS
           
static int SORT_CRITERIA_DATA
           
static int SORT_CRITERIA_DEFINITION
           
static int SORT_CRITERIA_LEXICAL
           
static int SORT_TYPE_CONSOLIDATIONS_ONLY
           
static int SORT_TYPE_DISABLED
           
static int SORT_TYPE_LEAFS_ONLY
           
 
Constructor Summary
SortingFilterSetting()
           
 
Method Summary
 void adapt(FilterSetting from)
          Adapt the filter setting from the given filter setting.
 void bind(Subset2 subset)
          Binds this filter settings instance to the given Subset2 NOTE: PLEASE DON'T USE!
 boolean doHierarchy()
          Checks if a hierarchy should be created
 boolean doReverseOrder()
          Checks if the reverse order mode is active
 boolean doSortByAttribute()
          Checks if the sort by attribute mode is active
 boolean doSortByType()
          Checks if the sort by type mode is active
 boolean doSortPerLevel()
          Checks if the sort per level mode is active
 IntegerParameter getHierarchicalMode()
          Returns the hierarchical mode
 IntegerParameter getOrderMode()
          Returns the reverse order mode
 IntegerParameter getShowDuplicates()
          Returns whether duplicate Elements should be shown or not, i.e.
 StringParameter getSortAttribute()
          Returns the attribute identifier to sort after
 IntegerParameter getSortCriteria()
          Returns the currently set sorting criteria, i.e. one of the predefined sort criteria constants
 IntegerParameter getSortLevel()
          Returns the level at which the elements should be sorted
 StringParameter getSortLevelElement()
          Deprecated. use getSortLevel()
 IntegerParameter getSortTypeMode()
          Returns the sort by type mode
 void reset()
          Resets the filter setting to its defaults.
 void setHierarchicalMode(int hierarchicalMode)
          Sets the hierarchical mode.
 void setHierarchicalMode(IntegerParameter hierarchicalMode)
          Sets the hierarchical mode.
 void setOrderMode(int orderMode)
          Sets the reverse order mode.
 void setOrderMode(IntegerParameter orderMode)
          Sets the reverse order mode, i.e. the parameter value should be one of the predefined order mode constants.
 void setShowDuplicates(int showDuplicates)
          Specifies whether duplicate Elements should be shown or not.
 void setShowDuplicates(IntegerParameter showDuplicates)
          Specifies whether duplicate Elements should be shown or not.
 void setSortAttribute(java.lang.String attributeId)
          Sets the attribute id to sort after
 void setSortAttribute(StringParameter sortAttribute)
          Sets the identifier of attribute to sort after, i.e. the parameter value should contain the id of the attribute.
 void setSortCriteria(int sortCriteria)
          Sets the sorting criteria, i.e. one of the predefined sort criteria constants.
 void setSortCriteria(IntegerParameter sortCriteria)
          Sets the sorting criteria, i.e. the parameter value should be one of the predefined sort criteria constants.
 void setSortLevel(int level)
          Sets the level to sort the elements at
 void setSortLevel(IntegerParameter sortLevel)
          Sets the level to sort the elements at as IntegerParameter
 void setSortLevelElement(java.lang.String sortLevelElementId)
          Deprecated. please use setSortLevel(int)
 void setSortLevelElement(StringParameter sortLevelElement)
          Deprecated. please use setSortLevel(IntegerParameter)
 void setSortTypeMode(int sortTypeMode)
          Sets the sort by type mode.
 void setSortTypeMode(IntegerParameter sortTypeMode)
          Sets the sort by type mode, i.e. the parameter value should be one of the predefined sort by type mode constants.
 void unbind()
          Releases this filter settings instance from a previously binded Subset2 NOTE: PLEASE DON'T USE!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIERARCHICAL_MODE_DISABLED

public static final int HIERARCHICAL_MODE_DISABLED
See Also:
Constant Field Values

HIERARCHICAL_MODE_SHOW_CHILDREN

public static final int HIERARCHICAL_MODE_SHOW_CHILDREN
See Also:
Constant Field Values

HIERARCHICAL_MODE_HIDE_CHILDREN

public static final int HIERARCHICAL_MODE_HIDE_CHILDREN
See Also:
Constant Field Values

SORT_TYPE_DISABLED

public static final int SORT_TYPE_DISABLED
See Also:
Constant Field Values

SORT_TYPE_LEAFS_ONLY

public static final int SORT_TYPE_LEAFS_ONLY
See Also:
Constant Field Values

SORT_TYPE_CONSOLIDATIONS_ONLY

public static final int SORT_TYPE_CONSOLIDATIONS_ONLY
See Also:
Constant Field Values

ORDER_MODE_REVERSE_DISABLED

public static final int ORDER_MODE_REVERSE_DISABLED
See Also:
Constant Field Values

ORDER_MODE_REVERSE_TOTAL

public static final int ORDER_MODE_REVERSE_TOTAL
See Also:
Constant Field Values

ORDER_MODE_REVERSE_PER_LEVEL

public static final int ORDER_MODE_REVERSE_PER_LEVEL
See Also:
Constant Field Values

SORT_CRITERIA_DEFINITION

public static final int SORT_CRITERIA_DEFINITION
See Also:
Constant Field Values

SORT_CRITERIA_DATA

public static final int SORT_CRITERIA_DATA
See Also:
Constant Field Values

SORT_CRITERIA_LEXICAL

public static final int SORT_CRITERIA_LEXICAL
See Also:
Constant Field Values

SORT_CRITERIA_ALIAS

public static final int SORT_CRITERIA_ALIAS
See Also:
Constant Field Values
Constructor Detail

SortingFilterSetting

public SortingFilterSetting()
Method Detail

getShowDuplicates

public final IntegerParameter getShowDuplicates()
Returns whether duplicate Elements should be shown or not, i.e. if duplicates should be displayed the value of the returned IntegerParameter is 1, otherwise 0.

Returns:
the show duplicates setting

setShowDuplicates

public final void setShowDuplicates(int showDuplicates)
Specifies whether duplicate Elements should be shown or not.

Parameters:
showDuplicates - pass 1 to show duplicate elements, pass 0 to hide duplicates

setShowDuplicates

public final void setShowDuplicates(IntegerParameter showDuplicates)
Specifies whether duplicate Elements should be shown or not.

Parameters:
showDuplicates - to show duplicate elements the value of the passed IntegerParameter must be 1. To hide duplicates the value must be 0.

getSortCriteria

public final IntegerParameter getSortCriteria()
Returns the currently set sorting criteria, i.e. one of the predefined sort criteria constants

Returns:
the set sorting criteria

setSortCriteria

public final void setSortCriteria(int sortCriteria)
Sets the sorting criteria, i.e. one of the predefined sort criteria constants.

Parameters:
sortCriteria - should be one of the predefined sort criteria constants

setSortCriteria

public final void setSortCriteria(IntegerParameter sortCriteria)
Sets the sorting criteria, i.e. the parameter value should be one of the predefined sort criteria constants.

Parameters:
sortCriteria - the new IntegerParameter to use for the sorting criteria

doReverseOrder

public final boolean doReverseOrder()
Checks if the reverse order mode is active

Returns:
true if reverse order mode should be used, false otherwise

getOrderMode

public final IntegerParameter getOrderMode()
Returns the reverse order mode

Returns:
the reverse order mode, i.e. one of the predefined order mode constants

setOrderMode

public final void setOrderMode(int orderMode)
Sets the reverse order mode. One of the predefined order mode constants should be used

Parameters:
orderMode - the new order mode

setOrderMode

public final void setOrderMode(IntegerParameter orderMode)
Sets the reverse order mode, i.e. the parameter value should be one of the predefined order mode constants.

Parameters:
orderMode - the new IntegerParameter to use for the order mode

doSortByType

public final boolean doSortByType()
Checks if the sort by type mode is active

Returns:
true if sort by type mode should be used, false otherwise

getSortTypeMode

public final IntegerParameter getSortTypeMode()
Returns the sort by type mode

Returns:
the sort by type mode, i.e. one of the predefined sort by type mode constants

setSortTypeMode

public final void setSortTypeMode(int sortTypeMode)
Sets the sort by type mode. One of the predefined sort by type mode constants should be used

Parameters:
sortTypeMode - the new sort by type mode

setSortTypeMode

public final void setSortTypeMode(IntegerParameter sortTypeMode)
Sets the sort by type mode, i.e. the parameter value should be one of the predefined sort by type mode constants.

Parameters:
sortTypeMode - the new IntegerParameter to use for the sort by type mode

doHierarchy

public final boolean doHierarchy()
Checks if a hierarchy should be created

Returns:
true if a hierarchy mode is active, false otherwise

getHierarchicalMode

public final IntegerParameter getHierarchicalMode()
Returns the hierarchical mode

Returns:
the hierarchical mode, i.e. one of the predefined hierarchical mode constants

setHierarchicalMode

public final void setHierarchicalMode(int hierarchicalMode)
Sets the hierarchical mode. One of the predefined hierarchical mode constants should be used

Parameters:
hierarchicalMode - the new hierarchical mode

setHierarchicalMode

public final void setHierarchicalMode(IntegerParameter hierarchicalMode)
Sets the hierarchical mode. The parameter value should be one of the predefined hierarchical mode constants.

Parameters:
hierarchicalMode - the new IntegerParameter to use for the hierarchical mode

doSortPerLevel

public final boolean doSortPerLevel()
Checks if the sort per level mode is active

Returns:
true if sort per level mode should be used, false otherwise

getSortLevel

public final IntegerParameter getSortLevel()
Returns the level at which the elements should be sorted

Returns:
the sort level

setSortLevel

public final void setSortLevel(int level)
Sets the level to sort the elements at

Parameters:
level - the sort level

setSortLevel

public final void setSortLevel(IntegerParameter sortLevel)
Sets the level to sort the elements at as IntegerParameter

Parameters:
sortLevel - the sort level

getSortLevelElement

public final StringParameter getSortLevelElement()
Deprecated. use getSortLevel()

Returns the identifier of the reference element for sort per level mode

Returns:
the sort per level reference element id

setSortLevelElement

public final void setSortLevelElement(java.lang.String sortLevelElementId)
Deprecated. please use setSortLevel(int)

Sets the identifier of the reference element for sort per level mode

Parameters:
sortLevelElementId - the sort per level reference element id

setSortLevelElement

public final void setSortLevelElement(StringParameter sortLevelElement)
Deprecated. please use setSortLevel(IntegerParameter)

Sets the identifier of the sort per level element, i.e. the parameter value should contain the id of the reference element.

Parameters:
sortLevelElementId - the new StringParameter to use for the sort per level mode

doSortByAttribute

public final boolean doSortByAttribute()
Checks if the sort by attribute mode is active

Returns:
true if sort by attribute mode should be used, false otherwise

getSortAttribute

public final StringParameter getSortAttribute()
Returns the attribute identifier to sort after

Returns:

setSortAttribute

public final void setSortAttribute(java.lang.String attributeId)
Sets the attribute id to sort after

Parameters:
sortAttribute -

setSortAttribute

public final void setSortAttribute(StringParameter sortAttribute)
Sets the identifier of attribute to sort after, i.e. the parameter value should contain the id of the attribute.

Parameters:
sortAttribute - the new StringParameter to use for the sort by attribute mode

reset

public final void reset()
Description copied from interface: FilterSetting
Resets the filter setting to its defaults.


bind

public final void bind(Subset2 subset)
Description copied from interface: FilterSetting

Binds this filter settings instance to the given Subset2

NOTE: PLEASE DON'T USE! INTERNAL METHOD

Specified by:
bind in interface FilterSetting
Overrides:
bind in class AbstractFilterSettings

unbind

public final void unbind()
Description copied from interface: FilterSetting

Releases this filter settings instance from a previously binded Subset2

NOTE: PLEASE DON'T USE! INTERNAL METHOD

Specified by:
unbind in interface FilterSetting
Overrides:
unbind in class AbstractFilterSettings

adapt

public final void adapt(FilterSetting from)
Description copied from interface: FilterSetting
Adapt the filter setting from the given filter setting. After that both settings are the same.

Parameters:
from - the filter setting to adapt from