com.anasoft.os.daofusion.criteria
Class NestedPropertyCriterion<V extends NestedPropertyCriterionVisitor>

java.lang.Object
  extended by com.anasoft.os.daofusion.criteria.NestedPropertyCriterion<V>
Type Parameters:
V - Type of the criterion visitor applicable for this criterion.
All Implemented Interfaces:
PersistentEntityCriterion<V>
Direct Known Subclasses:
FilterCriterion, SortCriterion

public abstract class NestedPropertyCriterion<V extends NestedPropertyCriterionVisitor>
extends java.lang.Object
implements PersistentEntityCriterion<V>

Generic persistent entity property criterion supporting a nested property of the target persistent entity.

The nested property criterion is essentially a combination of two factors:

This class is immutable by design. Subclasses should remain immutable as well in order to be safely reused across the code.

Author:
vojtech.szocs
See Also:
NestedPropertyCriteria, NestedPropertyCriterionVisitor, AssociationPath

Nested Class Summary
protected static class NestedPropertyCriterion.NestedPropertyCriterionBuilder<T extends NestedPropertyCriterion<V>,V extends NestedPropertyCriterionVisitor>
          Base class for specific NestedPropertyCriterion builders.
 
Constructor Summary
NestedPropertyCriterion(AssociationPath associationPath, java.lang.String targetPropertyName)
          Creates a new property criterion.
NestedPropertyCriterion(java.lang.String propertyPath, NestedPropertyJoinType associationJoinType)
          Deprecated. propertyPath / associationJoinType concept is now deprecated in favor of the associationPath / targetPropertyName approach.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 AssociationPath getAssociationPath()
           
 java.lang.String getTargetPropertyName()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.anasoft.os.daofusion.criteria.PersistentEntityCriterion
accept
 

Constructor Detail

NestedPropertyCriterion

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

Creates a new property 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).

NestedPropertyCriterion

public NestedPropertyCriterion(AssociationPath associationPath,
                               java.lang.String targetPropertyName)
Creates a new property 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.
Method Detail

getTargetPropertyName

public java.lang.String getTargetPropertyName()
Returns:
Name of the target property of the given persistent entity.

getAssociationPath

public AssociationPath getAssociationPath()
Returns:
AssociationPath which points to the given property of the target persistent entity.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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