fri.util.database.jpa.tree.closuretable.pojos
Class ClosureTableTreePojo

java.lang.Object
  extended by fri.util.database.jpa.commons.AbstractEntity
      extended by fri.util.database.jpa.tree.closuretable.pojos.ClosureTableTreePojo
All Implemented Interfaces:
ClosureTableTreeNode, TreeNode, java.lang.Cloneable

@Entity
public class ClosureTableTreePojo
extends AbstractEntity
implements ClosureTableTreeNode

Example POJO for the unit test, implementing ClosureTableTreeNode via JPA. This is a very normal JPA domain object and contains no tree properties. Instances of such a entity type should be persisted using ClosureTableTreeDao.

Author:
Fritz Ritzberger, 14.10.2012

Constructor Summary
ClosureTableTreePojo()
          No-argument constructor needed by JPA layer.
ClosureTableTreePojo(java.lang.String name)
          Convenience constructor for programming.
 
Method Summary
 ClosureTableTreeNode clone()
          For copy and unique constraint checking this is required.
 java.lang.String getAddress()
           
 java.io.Serializable getId()
           
 java.lang.String getName()
           
 void setAddress(java.lang.String address)
           
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 
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
 

Constructor Detail

ClosureTableTreePojo

public ClosureTableTreePojo()
No-argument constructor needed by JPA layer. Must be present when other constructors exist.


ClosureTableTreePojo

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

Method Detail

getId

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

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 ClosureTableTreeNode clone()
Description copied from interface: ClosureTableTreeNode
For copy and unique constraint checking this is required.

Specified by:
clone in interface ClosureTableTreeNode
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