com.hudson.hibernatesynchronizer.mapping
Class HibernateClassId

java.lang.Object
  extended bycom.hudson.hibernatesynchronizer.mapping.BaseElement
      extended bycom.hudson.hibernatesynchronizer.mapping.HibernateClassId
All Implemented Interfaces:
java.lang.Comparable

public class HibernateClassId
extends BaseElement
implements java.lang.Comparable

Author:
Joe Hudson This represents data related to the 'id' or 'composite-id' nodes of the hibernate mapping configuration file.

Constructor Summary
HibernateClassId(HibernateClass parent, org.w3c.dom.Node node, java.lang.String packageName)
           
 
Method Summary
 int compareTo(java.lang.Object arg0)
          Compare this to another object
 boolean exists()
          Return true if the id exists for the parent and false if not
 HibernateIdGenerator getGenerator()
           
 HibernateClass getParent()
          Return the HibernateClass that this id belongs to
 java.util.List getProperties()
          If this is a composite id, return a list of properties that make up the composite
 HibernateClassProperty getProperty()
          Return either the column property if this is a non-composite or the object that represents the composite object.
protected  java.lang.String[] getReservedProperties()
          Return the reserved properties associated with this element
 boolean hasExternalClass()
          Return true if the id is represented in an external class or false if not
 boolean isComposite()
          Return true if the id is a composite id and false otherwise
 
Methods inherited from class com.hudson.hibernatesynchronizer.mapping.BaseElement
clear, get, get, getCustomProperties, getJavaDoc, getJavaDoc, getMetaData, getNode, getNodeText, getParentRoot, saveMetaData, set, setNode, setParentRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateClassId

public HibernateClassId(HibernateClass parent,
                        org.w3c.dom.Node node,
                        java.lang.String packageName)
Method Detail

hasExternalClass

public boolean hasExternalClass()
Return true if the id is represented in an external class or false if not


getParent

public HibernateClass getParent()
Return the HibernateClass that this id belongs to


getProperty

public HibernateClassProperty getProperty()
Return either the column property if this is a non-composite or the object that represents the composite object.

Returns:
a HibernateClassProperty representing the field value

isComposite

public boolean isComposite()
Return true if the id is a composite id and false otherwise


getProperties

public java.util.List getProperties()
If this is a composite id, return a list of properties that make up the composite

Returns:
a List of HibernateClassProperty objects

exists

public boolean exists()
Return true if the id exists for the parent and false if not


getGenerator

public HibernateIdGenerator getGenerator()
Returns:
Returns the id generator.

getReservedProperties

protected java.lang.String[] getReservedProperties()
Return the reserved properties associated with this element

Overrides:
getReservedProperties in class BaseElement

compareTo

public int compareTo(java.lang.Object arg0)
Compare this to another object

Specified by:
compareTo in interface java.lang.Comparable