NatureExtendable
, PropertyHolder
public final class ClassInfo extends java.lang.Object implements PropertyHolder
Class
to the database.Constructor | Description |
---|---|
ClassInfo() |
Creates a new empty ClassInfo.
|
ClassInfo(java.lang.Class<?> describedClass) |
Creates a new ClassInfo, describing a given Class.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addFieldInfo(FieldInfo fieldInfo) |
|
void |
addKey(FieldInfo key) |
Add a
FieldInfo to the key set of this ClassInfo (keys and
attributes are disjunct!). |
void |
addNature(java.lang.String nature) |
Adds a specified nature.
|
java.lang.Class<?> |
getDescribedClass() |
Returns the reference to the
Class object that is described by
this ClassInfo . |
java.lang.Class<?> |
getExtendedClass() |
Get the reference to the Class object that is extended by this class.
|
int |
getFieldCount() |
|
FieldInfo |
getFieldInfoByName(java.lang.String memberName) |
Returns a
FieldInfo that corresponds to an element with the given
node name. |
java.util.Set<FieldInfo> |
getFieldInfos() |
Returns Set of associated fields.
|
int |
getKeyFieldCount() |
|
FieldInfo |
getKeyFieldInfoByName(java.lang.String keyName) |
Returns a
FieldInfo that corresponds to a key element with the
given node name. |
java.util.Set<FieldInfo> |
getKeyFieldInfos() |
Returns Set of key fields.
|
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 |
setDescribedClass(java.lang.Class<?> describedClass) |
Sets the
Class that is described by this ClassInfo . |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
Set a property specified by the name to the passed value.
|
public ClassInfo()
public ClassInfo(java.lang.Class<?> describedClass)
describedClass
- the Class that is described by this ClassInfo.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 java.lang.Class<?> getDescribedClass()
Class
object that is described by
this ClassInfo
.public void setDescribedClass(java.lang.Class<?> describedClass)
Class
that is described by this ClassInfo
.describedClass
- The Class
that is described by this ClassInfo
.public void addFieldInfo(FieldInfo fieldInfo)
public int getFieldCount()
public FieldInfo getFieldInfoByName(java.lang.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 java.util.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(java.lang.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 java.util.Set<FieldInfo> getKeyFieldInfos()
public java.lang.Class<?> getExtendedClass()
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com