ch.elca.el4j.services.persistence.hibernate.dao.extent
Class AbstractExtentPart

java.lang.Object
  extended by ch.elca.el4j.services.persistence.hibernate.dao.extent.AbstractExtentPart
All Implemented Interfaces:
Serializable, Comparable<AbstractExtentPart>
Direct Known Subclasses:
ExtentCollection, ExtentEntity

public abstract class AbstractExtentPart
extends Object
implements Serializable, Comparable<AbstractExtentPart>

An ExtentPart is the abstract super Class of Extent parts like ExtentEntity or ExtentCollection.

Author:
Andreas Rueedlinger (ARR)
See Also:
Serialized Form
File-location:
AbstractExtentPart
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Field Summary
protected  String m_name
          The name of the extent-part.
protected  AbstractExtentPart m_parent
          The parent of the entity, null if root.
 
Constructor Summary
AbstractExtentPart()
           
 
Method Summary
 int compareTo(AbstractExtentPart other)
          
 boolean equals(Object object)
          
protected  String firstCharLower(String str)
          Helper function to set first Character lower case.
protected  String firstCharUpper(String str)
          Helper function to set first Character upper case.
abstract  String getId()
           
 Method getMethod()
          Method to get the extent-part, null if root entity, otherwise set latest when added as child.
 String getName()
          Name of the extent-part.
 AbstractExtentPart getParent()
          Return the parent entity of the current extent part, null if root or contained in a collection.
 int hashCode()
          
protected  String nativeToString()
           
protected  void setParent(AbstractExtentPart parent)
          Sets the parent of the extent-part.
protected  String toFieldName(Method m)
          Helper function to convert a string from Getter-Method-name to field name.
 String toString()
          
protected abstract  void updateId()
          Updates the id of the extent part.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_name

protected String m_name
The name of the extent-part.


m_parent

protected AbstractExtentPart m_parent
The parent of the entity, null if root.

Constructor Detail

AbstractExtentPart

public AbstractExtentPart()
Method Detail

getName

public String getName()
Name of the extent-part.

Returns:
the name of the extent-part.

getParent

public AbstractExtentPart getParent()
Return the parent entity of the current extent part, null if root or contained in a collection.

Returns:
the parent.

getId

public abstract String getId()
Returns:
the id of the extent part.

updateId

protected abstract void updateId()
Updates the id of the extent part. Should be used be children to inform its parent.


compareTo

public int compareTo(AbstractExtentPart other)

Specified by:
compareTo in interface Comparable<AbstractExtentPart>

setParent

protected void setParent(AbstractExtentPart parent)
Sets the parent of the extent-part.

Parameters:
parent - the parent to set.

getMethod

public Method getMethod()
                 throws SecurityException,
                        NoSuchMethodException
Method to get the extent-part, null if root entity, otherwise set latest when added as child.

Returns:
the method to get the extent-part.
Throws:
NoSuchMethodException
SecurityException

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object object)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object

nativeToString

protected String nativeToString()
Returns:
the old native implementation of the toString method.

toFieldName

protected String toFieldName(Method m)
Helper function to convert a string from Getter-Method-name to field name.

Parameters:
m - the method to get the field name of.
Returns:
field name

firstCharLower

protected String firstCharLower(String str)
Helper function to set first Character lower case.

Parameters:
str - string to be changed
Returns:
changed string

firstCharUpper

protected String firstCharUpper(String str)
Helper function to set first Character upper case.

Parameters:
str - string to be changed
Returns:
changed string


Copyright © 2005-2011 ELCA. All Rights Reserved.