com.anasoft.os.daofusion.criteria
Class SortCriterion

java.lang.Object
  extended by com.anasoft.os.daofusion.criteria.NestedPropertyCriterion<NestedPropertyCriterionVisitor>
      extended by com.anasoft.os.daofusion.criteria.SortCriterion
All Implemented Interfaces:
PersistentEntityCriterion<NestedPropertyCriterionVisitor>

public class SortCriterion
extends NestedPropertyCriterion<NestedPropertyCriterionVisitor>

Sort criterion for a single property of the target persistent entity.

Author:
vojtech.szocs
See Also:
NestedPropertyCriterion

Nested Class Summary
static class SortCriterion.SortCriterionBuilder
          Builder for SortCriterion instances.
 
Nested classes/interfaces inherited from class com.anasoft.os.daofusion.criteria.NestedPropertyCriterion
NestedPropertyCriterion.NestedPropertyCriterionBuilder<T extends NestedPropertyCriterion<V>,V extends NestedPropertyCriterionVisitor>
 
Constructor Summary
SortCriterion(AssociationPath associationPath, java.lang.String targetPropertyName, boolean sortAscending)
          Creates a new sort criterion with ignoreCase set to false.
SortCriterion(AssociationPath associationPath, java.lang.String targetPropertyName, boolean sortAscending, boolean ignoreCase)
          Creates a new sort criterion.
SortCriterion(java.lang.String propertyPath, boolean sortAscending)
          Deprecated. propertyPath / associationJoinType concept is now deprecated in favor of the associationPath / targetPropertyName approach.
SortCriterion(java.lang.String propertyPath, boolean sortAscending, boolean ignoreCase)
          Deprecated. propertyPath / associationJoinType concept is now deprecated in favor of the associationPath / targetPropertyName approach.
SortCriterion(java.lang.String propertyPath, NestedPropertyJoinType associationJoinType, boolean sortAscending, boolean ignoreCase)
          Deprecated. propertyPath / associationJoinType concept is now deprecated in favor of the associationPath / targetPropertyName approach.
 
Method Summary
 void accept(NestedPropertyCriterionVisitor visitor)
          Accepts the given visitor to visit this criterion.
 boolean isIgnoreCase()
           
 boolean isSortAscending()
           
 
Methods inherited from class com.anasoft.os.daofusion.criteria.NestedPropertyCriterion
equals, getAssociationPath, getTargetPropertyName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortCriterion

@Deprecated
public SortCriterion(java.lang.String propertyPath,
                                NestedPropertyJoinType associationJoinType,
                                boolean sortAscending,
                                boolean ignoreCase)
Deprecated. propertyPath / associationJoinType concept is now deprecated in favor of the associationPath / targetPropertyName approach.

Creates a new sort criterion.

Parameters:
propertyPath - Dot-separated logical path to the target property.
associationJoinType - Type of join to use in case of a nested (non-direct) persistent entity property (can be null otherwise).
sortAscending - true for ascending, false for descending sort order.
ignoreCase - true for case-insensitive sorting, false for case-sensitive sorting.

SortCriterion

public SortCriterion(AssociationPath associationPath,
                     java.lang.String targetPropertyName,
                     boolean sortAscending,
                     boolean ignoreCase)
Creates a new sort criterion.

Parameters:
associationPath - AssociationPath which points to the given property of the target persistent entity.
targetPropertyName - Name of the target property of the given persistent entity.
sortAscending - true for ascending, false for descending sort order.
ignoreCase - true for case-insensitive sorting, false for case-sensitive sorting.

SortCriterion

@Deprecated
public SortCriterion(java.lang.String propertyPath,
                                boolean sortAscending,
                                boolean ignoreCase)
Deprecated. propertyPath / associationJoinType concept is now deprecated in favor of the associationPath / targetPropertyName approach.

Creates a new sort criterion using the default nested persistent entity property join type.

Parameters:
propertyPath - Dot-separated logical path to the target property.
sortAscending - true for ascending, false for descending sort order.
ignoreCase - true for case-insensitive sorting, false for case-sensitive sorting.

SortCriterion

@Deprecated
public SortCriterion(java.lang.String propertyPath,
                                boolean sortAscending)
Deprecated. propertyPath / associationJoinType concept is now deprecated in favor of the associationPath / targetPropertyName approach.

Creates a new sort criterion using the default nested persistent entity property join type with ignoreCase set to false.

This is a convenience constructor for non-string properties where the ignoreCase parameter is not supported.

Parameters:
propertyPath - Dot-separated logical path to the target property.
sortAscending - true for ascending, false for descending sort order.

SortCriterion

public SortCriterion(AssociationPath associationPath,
                     java.lang.String targetPropertyName,
                     boolean sortAscending)
Creates a new sort criterion with ignoreCase set to false.

Parameters:
associationPath - AssociationPath which points to the given property of the target persistent entity.
targetPropertyName - Name of the target property of the given persistent entity.
sortAscending - true for ascending, false for descending sort order.
Method Detail

isSortAscending

public boolean isSortAscending()
Returns:
true for ascending, false for descending sort order.

isIgnoreCase

public boolean isIgnoreCase()
Returns:
true for case-insensitive sorting, false for case-sensitive sorting.

accept

public void accept(NestedPropertyCriterionVisitor visitor)
Description copied from interface: PersistentEntityCriterion
Accepts the given visitor to visit this criterion.

Parameters:
visitor - The visitor to accept.
See Also:
PersistentEntityCriterion.accept(java.lang.Object)


Copyright © 2008-2009 ANASOFT and contributors. All Rights Reserved.