uk.nominet.catnap.framework
Class Member

java.lang.Object
  extended byuk.nominet.catnap.framework.Member

public class Member
extends java.lang.Object

Represents a definition of a field within an entity has simply two fields name - corresponds to the name of the field within the matching java class column - corresponds to the returned column name from the pl/sql call.


Constructor Summary
Member(EntityDef parentEntityDef, java.lang.String fieldName, java.lang.String column, boolean pk, boolean auto, boolean readOnly)
           
 
Method Summary
 java.lang.String getColumn()
          Return the name of the column within the pl/sql returned result set.
 java.lang.reflect.Field getHierarchicalDeclaredField(java.lang.Class clazz, java.lang.String fieldName)
           
 java.lang.String getJavaFieldName()
           
 java.lang.Class getJavaFieldType()
          Return the java field type for the member.
 java.lang.Object getJavaFieldValue(java.lang.Object source)
          Return the value of a particular field for the passed source object.
 Relationship getRelationship()
          Return a relationship if one exists, otherwise return null.
 boolean isAutoField()
          Return a boolean indicating whether or not this is an auto pk field.
 boolean isPKField()
          Return a boolean indicating whether or not this is a pk field.
 boolean isReadOnly()
           
 void setJavaFieldValue(java.lang.Object source, java.lang.Object newValue)
          Set the value of a particular field for the passed source object.
 void setRelationship(Relationship relationship)
          Set the relationship on this field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Member

public Member(EntityDef parentEntityDef,
              java.lang.String fieldName,
              java.lang.String column,
              boolean pk,
              boolean auto,
              boolean readOnly)
Method Detail

getJavaFieldName

public java.lang.String getJavaFieldName()

getJavaFieldType

public java.lang.Class getJavaFieldType()
Return the java field type for the member. This is derived by descending the object hierarchy starting at the parent entity def.

Returns:

getJavaFieldValue

public java.lang.Object getJavaFieldValue(java.lang.Object source)
Return the value of a particular field for the passed source object. This is useful rather than exposing the field directly as it cunningly handles any nested path members.

Parameters:
source -
Returns:

setJavaFieldValue

public void setJavaFieldValue(java.lang.Object source,
                              java.lang.Object newValue)
Set the value of a particular field for the passed source object. This is useful rather than exposing the field directly as it cunningly handles any nested path members.

Parameters:
source - The source to operate on
newValue - The new value

getColumn

public java.lang.String getColumn()
Return the name of the column within the pl/sql returned result set.

Returns:

isPKField

public boolean isPKField()
Return a boolean indicating whether or not this is a pk field.

Returns:

isAutoField

public boolean isAutoField()
Return a boolean indicating whether or not this is an auto pk field.

Returns:

isReadOnly

public boolean isReadOnly()

getRelationship

public Relationship getRelationship()
Return a relationship if one exists, otherwise return null.


setRelationship

public void setRelationship(Relationship relationship)
Set the relationship on this field.

Parameters:
relationship -

getHierarchicalDeclaredField

public java.lang.reflect.Field getHierarchicalDeclaredField(java.lang.Class clazz,
                                                            java.lang.String fieldName)