|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.jdo.jpa.info.FieldInfo
public class FieldInfo
This class holds the necessary information so that Castor can properly map a JPA annotated classes member to the database.
Constructor Summary | |
---|---|
FieldInfo(ClassInfo declaringClass,
java.lang.Class<?> fieldType,
java.lang.String fieldName,
FieldHandlerImpl fieldHandler)
Creates a FieldInfo associated to the given ClassInfo , describing
the given a field with the given name using method (property) access. |
Method Summary | |
---|---|
void |
addNature(java.lang.String nature)
Adds a specified nature. |
ClassInfo |
getDeclaringClassInfo()
Returns the declaring ClassInfo this FieldInfo is
associated with. |
FieldHandlerImpl |
getFieldHandler()
Returns the FieldHandler associated with this field. |
java.lang.String |
getFieldName()
Indicates the name of the field described by this FieldInfo . |
java.lang.Class<?> |
getFieldType()
Indicates the type of the field described by this FieldInfo . |
java.lang.Object |
getProperty(java.lang.String name)
Get a property by its name. |
boolean |
hasNature(java.lang.String nature)
Checks if a specified nature has been added. |
void |
setDeclaringClassInfo(ClassInfo classInfo)
Sets the reference to the declaring ClassInfo this
FieldInfo is associated with. |
void |
setFieldHandler(FieldHandlerImpl fieldHandler)
Sets the FieldHandler associated with this field. |
void |
setFieldName(java.lang.String fieldName)
Sets the name of the field described by this FieldInfo . |
void |
setFieldType(java.lang.Class<?> fieldType)
Sets the type of the field described by this FieldInfo . |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set a property specified by the name to the passed value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldInfo(ClassInfo declaringClass, java.lang.Class<?> fieldType, java.lang.String fieldName, FieldHandlerImpl fieldHandler)
ClassInfo
, describing
the given a field with the given name using method (property) access.
declaringClass
- The ClassInfo this FieldInfo is associated with.fieldType
- The type of the described field.fieldName
- The name of the described field.fieldHandler
- The FieldHandlerImpl
that describes the accessType of
that field.Method Detail |
---|
public void addNature(java.lang.String nature)
addNature
in interface NatureExtendable
nature
- the name of the natureNatureExtendable.addNature(java.lang.String)
public boolean hasNature(java.lang.String nature)
hasNature
in interface NatureExtendable
nature
- the name of the nature.
NatureExtendable.hasNature(java.lang.String)
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface PropertyHolder
name
- the name of the property to get.
PropertyHolder.getProperty(java.lang.String)
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface PropertyHolder
name
- the name of the property to set.value
- the value to set the specified property to.PropertyHolder.setProperty(java.lang.String,
java.lang.Object)
public ClassInfo getDeclaringClassInfo()
ClassInfo
this FieldInfo
is
associated with.
ClassInfo
this FieldInfo
is
associated with.public void setDeclaringClassInfo(ClassInfo classInfo)
ClassInfo
this
FieldInfo
is associated with.
classInfo
- The ClassInfo this FieldInfo is associated with.public java.lang.String getFieldName()
FieldInfo
.
FieldInfo
.public void setFieldName(java.lang.String fieldName)
FieldInfo
.
fieldName
- set the name of the field described by this FieldInfo
.public java.lang.Class<?> getFieldType()
FieldInfo
.
public void setFieldType(java.lang.Class<?> fieldType)
FieldInfo
.
fieldType
- The Type of the field.public FieldHandlerImpl getFieldHandler()
FieldHandler
associated with this field.
FieldHandlerImpl
managing access to the underlying
field.public void setFieldHandler(FieldHandlerImpl fieldHandler)
FieldHandler
associated with this field.
fieldHandler
- the FieldHandlerImpl
managing access to the underlying
field.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |