|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anasoft.os.daofusion.criteria.AssociationPath
public class AssociationPath
Association path which points to the given property of the target persistent entity.
Association path starts at the target persistent entity as the root object, navigating through associated objects as necessary. This way, nested property criteria which operate on associated objects can be easily defined by the user. Note that the association path does not include the target property itself.
This class is immutable by design so you can safely reuse its instances across the code.
AssociationPathElement
,
AssociationPathRegister
Field Summary | |
---|---|
static AssociationPath |
ROOT
Shorthand constant for an empty association path which essentially points to target criteria root. |
static java.lang.String |
SEPARATOR
|
static java.lang.String |
SEPARATOR_REGEX
|
Constructor Summary | |
---|---|
AssociationPath(AssociationPath prefix,
AssociationPathElement... elements)
Creates a new association path with rootPath elements placed at the beginning, followed by elements in consequence. |
|
AssociationPath(AssociationPathElement... elements)
Creates a new association path. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAlias()
Returns the alias for this association path. |
AssociationPathElement |
getLastElement()
Returns the last element of this association path or null in case the association path is empty. |
AssociationPath |
getSuperPath()
Returns the "super path" for this association path. |
int |
hashCode()
|
java.util.Iterator<AssociationPath> |
iterator()
Returns an iterator over AssociationPath instances
for this association path. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SEPARATOR
public static final java.lang.String SEPARATOR_REGEX
public static final AssociationPath ROOT
Constructor Detail |
---|
public AssociationPath(AssociationPathElement... elements)
elements
- Association path elements.public AssociationPath(AssociationPath prefix, AssociationPathElement... elements)
prefix
- Association path prefix (elements to be
placed at the beginning of this association path).elements
- Association path elements.Method Detail |
---|
public AssociationPathElement getLastElement()
public AssociationPath getSuperPath()
Super path includes all path elements except the last one.
public java.lang.String getAlias()
This method is used by AssociationPathRegister
when
creating Criteria
instances so that these instances
can be reused by referencing their aliases.
public java.util.Iterator<AssociationPath> iterator()
AssociationPath
instances
for this association path.
The resulting iterator follows a custom logic based on the order of contained association path elements. For example, an iterator over the association path "a.b.c" will produce following paths:
Iterator.remove()
operation is not
supported.
iterator
in interface java.lang.Iterable<AssociationPath>
Iterable.iterator()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |