com.hudson.hibernatesynchronizer.mapping
Class BaseElement

java.lang.Object
  extended bycom.hudson.hibernatesynchronizer.mapping.BaseElement
Direct Known Subclasses:
HibernateClass, HibernateClassId, HibernateClassProperty, HibernateIdGenerator, HibernateQuery

public class BaseElement
extends java.lang.Object


Constructor Summary
BaseElement()
           
 
Method Summary
 void clear(java.lang.String key)
          Clear the cached property for the given key
 java.lang.String get(java.lang.String key)
          Return the save-able property for the given key
 java.lang.String get(java.lang.String key, boolean force)
          Return the property for the given key.
 java.util.Map getCustomProperties()
          Return all custom properties for this element
 java.lang.String getJavaDoc(java.lang.String key)
          Return Javadoc style comments for the given String
 java.lang.String getJavaDoc(java.lang.String key, java.lang.String indent)
          Return Javadoc style comments for the given String using the indentation given
 java.util.List getMetaData()
          Return a list of meta-data nodes associated with this element
 org.w3c.dom.Node getNode()
          Return the node associated with this element
protected  java.lang.String getNodeText(org.w3c.dom.Node node)
          Helper method to return the contents of a given node
 HibernateClass getParentRoot()
          Return the class root for this element or self if this element is a HibernateClass that is the parent class
protected  java.lang.String[] getReservedProperties()
          Return an array of properties that should not be considered custom properties
protected  void saveMetaData(org.w3c.dom.Node node)
          Set the custom properties associated with the meta-data for this element
 void set(java.lang.String key, java.lang.String value)
          Set the property using the key and value given
 void setNode(org.w3c.dom.Node node)
          Set the node related to this element
 void setParentRoot(HibernateClass rootClass)
          Set the class root for this element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseElement

public BaseElement()
Method Detail

set

public void set(java.lang.String key,
                java.lang.String value)
Set the property using the key and value given

Parameters:
key -
value -

clear

public void clear(java.lang.String key)
Clear the cached property for the given key

Parameters:
key -

get

public java.lang.String get(java.lang.String key)
Return the save-able property for the given key

Parameters:
key -

get

public java.lang.String get(java.lang.String key,
                            boolean force)
Return the property for the given key. If force is true, return the property match even if the property is marked as not save-able

Parameters:
key -
force -
Returns:

getJavaDoc

public java.lang.String getJavaDoc(java.lang.String key)
Return Javadoc style comments for the given String

Parameters:
key -

getJavaDoc

public java.lang.String getJavaDoc(java.lang.String key,
                                   java.lang.String indent)
Return Javadoc style comments for the given String using the indentation given

Parameters:
key -
indent -

getCustomProperties

public java.util.Map getCustomProperties()
Return all custom properties for this element


getReservedProperties

protected java.lang.String[] getReservedProperties()
Return an array of properties that should not be considered custom properties


getNode

public org.w3c.dom.Node getNode()
Return the node associated with this element


getNodeText

protected java.lang.String getNodeText(org.w3c.dom.Node node)
Helper method to return the contents of a given node

Parameters:
node -

saveMetaData

protected void saveMetaData(org.w3c.dom.Node node)
Set the custom properties associated with the meta-data for this element

Parameters:
node - the element node

setNode

public void setNode(org.w3c.dom.Node node)
Set the node related to this element

Parameters:
node - the element node

getParentRoot

public HibernateClass getParentRoot()
Return the class root for this element or self if this element is a HibernateClass that is the parent class


setParentRoot

public void setParentRoot(HibernateClass rootClass)
Set the class root for this element

Parameters:
rootClass -

getMetaData

public java.util.List getMetaData()
Return a list of meta-data nodes associated with this element

Returns:
a List of Node objects