fri.util.database.jpa.tree.closuretable.pojos
Class AbstractTreePathImpl
java.lang.Object
fri.util.database.jpa.tree.closuretable.pojos.AbstractTreePathImpl
- All Implemented Interfaces:
- TreePath
- Direct Known Subclasses:
- TemporalTreePathImpl, TreePathImpl
@MappedSuperclass
public abstract class AbstractTreePathImpl
- extends java.lang.Object
- implements TreePath
Abstraction of the POJO that represents an ancestor to descendant relation.
Foreign keys and primary key must be implemented in the concrete derivation.
Mind that names and data types of CompositeKey are bound to the names and
data types of their concrete derivations!
- Author:
- Fritz Ritzberger, 14.10.2012
Nested Class Summary |
static class |
AbstractTreePathImpl.CompositeId
Primary key mapping class, holding the node id of both ancestor and descendant,
which in combination will be unique and thus suitable as primary key for any TreePathImpl. |
Method Summary |
int |
getDepth()
The 0-n level this descendant tree node occurs, 0 is self-reference. |
int |
getOrderIndex()
The 0-n child position this descendant occurs at. |
void |
setDepth(int depth)
|
void |
setOrderIndex(int position)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractTreePathImpl
public AbstractTreePathImpl()
getDepth
public int getDepth()
- Description copied from interface:
TreePath
- The 0-n level this descendant tree node occurs, 0 is self-reference.
The private Java property name for this MUST BE "depth" in any implementation,
as that name is used in DAO queries.
- Specified by:
getDepth
in interface TreePath
setDepth
public void setDepth(int depth)
- Specified by:
setDepth
in interface TreePath
getOrderIndex
public int getOrderIndex()
- Description copied from interface:
TreePath
- The 0-n child position this descendant occurs at.
The private Java property name for this MUST BE "orderIndex" in any implementation,
as that name is used in DAO queries.
- Specified by:
getOrderIndex
in interface TreePath
setOrderIndex
public void setOrderIndex(int position)
- Specified by:
setOrderIndex
in interface TreePath
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object