fri.util.database.jpa.tree.nestedsets.pojos
Class TemporalNestedSetsTreePojo

java.lang.Object
  extended by fri.util.database.jpa.commons.AbstractEntity
      extended by fri.util.database.jpa.tree.nestedsets.pojos.AbstractNestedSetsTreePojo
          extended by fri.util.database.jpa.tree.nestedsets.pojos.TemporalNestedSetsTreePojo
All Implemented Interfaces:
NestedSetsTreeNode, TemporalNestedSetsTreeNode, Temporal, TreeNode, java.lang.Cloneable

@Entity
public class TemporalNestedSetsTreePojo
extends AbstractNestedSetsTreePojo
implements TemporalNestedSetsTreeNode

Example POJO for the unit test, implementing TemporalNestedSetsTree via JPA.

Author:
Fritz Ritzberger, 12.10.2011

Field Summary
 
Fields inherited from interface fri.util.database.jpa.tree.Temporal
VALID_FROM, VALID_TO
 
Constructor Summary
TemporalNestedSetsTreePojo()
          No-argument constructor needed by JPA.
TemporalNestedSetsTreePojo(java.lang.String name)
          Convenience constructor for programming.
 
Method Summary
 NestedSetsTreeNode clone()
          For copy and unique constraint checking this is required.
 java.lang.String getAddress()
           
 java.lang.String getId()
           
 java.lang.String getName()
           
 NestedSetsTreeNode getTopLevel()
          DO NOT use this, is for the DAO exclusively.
 java.util.Date getValidFrom()
           
 java.util.Date getValidTo()
           
 void setAddress(java.lang.String address)
           
 void setName(java.lang.String name)
           
 void setTopLevel(NestedSetsTreeNode topLevel)
          Do not call.
 void setValidFrom(java.util.Date validFrom)
          Sets the temporal valid-from date of this node.
 void setValidTo(java.util.Date validTo)
          Sets the temporal valid-to date of this node.
 java.lang.String toString()
           
 
Methods inherited from class fri.util.database.jpa.tree.nestedsets.pojos.AbstractNestedSetsTreePojo
getLeft, getRight, setLeft, setRight
 
Methods inherited from class fri.util.database.jpa.commons.AbstractEntity
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fri.util.database.jpa.tree.nestedsets.NestedSetsTreeNode
getLeft, getRight, setLeft, setRight
 

Constructor Detail

TemporalNestedSetsTreePojo

public TemporalNestedSetsTreePojo()
No-argument constructor needed by JPA.


TemporalNestedSetsTreePojo

public TemporalNestedSetsTreePojo(java.lang.String name)
Convenience constructor for programming.

Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface TreeNode
Specified by:
getId in class AbstractEntity
Returns:
the primary key of this tree node.

getValidFrom

public java.util.Date getValidFrom()
Specified by:
getValidFrom in interface Temporal
Returns:
the temporal valid-from date of this node.

getValidTo

public java.util.Date getValidTo()
Specified by:
getValidTo in interface Temporal
Returns:
the temporal valid-to date of this node.

setValidFrom

public void setValidFrom(java.util.Date validFrom)
Description copied from interface: Temporal
Sets the temporal valid-from date of this node.

Specified by:
setValidFrom in interface Temporal

setValidTo

public void setValidTo(java.util.Date validTo)
Description copied from interface: Temporal
Sets the temporal valid-to date of this node.

Specified by:
setValidTo in interface Temporal

getTopLevel

public NestedSetsTreeNode getTopLevel()
Description copied from interface: NestedSetsTreeNode
DO NOT use this, is for the DAO exclusively. The private Java property name for this MUST BE "topLevel" in any implementation, as that name is used in DAO queries.

Specified by:
getTopLevel in interface NestedSetsTreeNode
Returns:
the top-level (root) node of this tree node. This is NOT its parent!

setTopLevel

public void setTopLevel(NestedSetsTreeNode topLevel)
Do not call. Public due to implementation constraints.

Specified by:
setTopLevel in interface NestedSetsTreeNode

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getAddress

public java.lang.String getAddress()

setAddress

public void setAddress(java.lang.String address)

clone

public NestedSetsTreeNode clone()
Description copied from interface: NestedSetsTreeNode
For copy and unique constraint checking this is required.

Specified by:
clone in interface NestedSetsTreeNode
Specified by:
clone in interface TreeNode
Overrides:
clone in class java.lang.Object
Returns:
a clone of this node, excluding Id property.

toString

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