|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.jdo.jpa.info.ClassInfo
public final class ClassInfo
This class holds the necessary information so that Castor can properly map a
JPA annotated Class to the database.
| Constructor Summary | |
|---|---|
ClassInfo()
Creates a new empty ClassInfo. |
|
ClassInfo(Class<?> describedClass)
Creates a new ClassInfo, describing a given Class. |
|
| Method Summary | |
|---|---|
void |
addFieldInfo(FieldInfo fieldInfo)
Add a FieldInfo to this ClassInfo; if the
FieldInfo is already in the set of fields, it is NOT added a
second time (FieldInfos are unique). |
void |
addKey(FieldInfo key)
Add a FieldInfo to the key set of this ClassInfo (keys and
attributes are disjunct!). |
void |
addNature(String nature)
|
Class<?> |
getDescribedClass()
Returns the reference to the Class object that is described by
this ClassInfo. |
Class<?> |
getExtendedClass()
Get the reference to the Class object that is extended by this class. |
int |
getFieldCount()
Indicates the number of FieldInfos already known to this
ClassInfo. |
FieldInfo |
getFieldInfoByName(String memberName)
Returns a FieldInfo that corresponds to an element with the given
node name. |
Set<FieldInfo> |
getFieldInfos()
Returns Set of associated fields. |
int |
getKeyFieldCount()
|
FieldInfo |
getKeyFieldInfoByName(String keyName)
Returns a FieldInfo that corresponds to a key element with the
given node name. |
Set<FieldInfo> |
getKeyFieldInfos()
Returns Set of key fields. |
Object |
getProperty(String name)
|
boolean |
hasNature(String nature)
|
void |
setDescribedClass(Class<?> describedClass)
Sets the Class that is described by this ClassInfo. |
void |
setProperty(String name,
Object value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassInfo()
public ClassInfo(Class<?> describedClass)
describedClass - the Class that is described by this ClassInfo.| Method Detail |
|---|
public void addNature(String nature)
addNature in interface NatureExtendableNatureExtendable.addNature(java.lang.String)public boolean hasNature(String nature)
hasNature in interface NatureExtendableNatureExtendable.hasNature(java.lang.String)public Object getProperty(String name)
getProperty in interface PropertyHolderPropertyHolder.getProperty(java.lang.String)
public void setProperty(String name,
Object value)
setProperty in interface PropertyHolderPropertyHolder.setProperty(java.lang.String,
java.lang.Object)public Class<?> getDescribedClass()
Class object that is described by
this ClassInfo.
public void setDescribedClass(Class<?> describedClass)
Class that is described by this ClassInfo.
describedClass - The Class that is described by this ClassInfo.public void addFieldInfo(FieldInfo fieldInfo)
FieldInfo to this ClassInfo; if the
FieldInfo is already in the set of fields, it is NOT added a
second time (FieldInfos are unique).
fieldInfo - The FieldInfo to add to this ClassInfopublic int getFieldCount()
FieldInfos already known to this
ClassInfo.
FieldInfo definitions for this
ClassInfo.public FieldInfo getFieldInfoByName(String memberName)
FieldInfo that corresponds to an element with the given
node name.
memberName - the name of the field to get.
FieldInfo that corresponds to an element with the given
node name or null if that field does not exist.public Set<FieldInfo> getFieldInfos()
public void addKey(FieldInfo key)
FieldInfo to the key set of this ClassInfo (keys and
attributes are disjunct!). It is only inserted once in each of these
lists, so normal elements can be "raised" to be keys after first adding
them to the class.
key - - the FieldInfo to add to the set of key fields.public int getKeyFieldCount()
FieldInfo definitions for this ClassInfo's
key.public FieldInfo getKeyFieldInfoByName(String keyName)
FieldInfo that corresponds to a key element with the
given node name.
keyName - the name of the key field to get.
FieldInfo that corresponds to a key element with the
given node name or null if that field is not in the key set.public Set<FieldInfo> getKeyFieldInfos()
public Class<?> getExtendedClass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||