|
Cumulus4j API (1.0.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.model.ClassMeta
public class ClassMeta
Persistent meta-data for a persistence-capable Class
. Since class names are very long,
we use the classID
instead in our index and data entities (e.g. in the relation
DataEntry.classMeta
).
Constructor Summary | |
---|---|
protected |
ClassMeta()
|
|
ClassMeta(Class<?> clazz)
|
Method Summary | |
---|---|
void |
addFieldMeta(FieldMeta fieldMeta)
|
boolean |
equals(Object obj)
|
long |
getClassID()
|
static ClassMeta |
getClassMeta(PersistenceManager pm,
Class<?> clazz,
boolean throwExceptionIfNotFound)
|
static ClassMeta |
getClassMeta(PersistenceManager pm,
String packageName,
String simpleClassName,
boolean throwExceptionIfNotFound)
|
String |
getClassName()
Get the fully qualified class name (composed of packageName and simpleClassName ). |
AbstractClassMetaData |
getDataNucleusClassMetaData(ExecutionContext executionContext)
|
FieldMeta |
getFieldMeta(long fieldID)
Get the FieldMeta with the specified fieldID . |
FieldMeta |
getFieldMeta(String fieldName)
Get the FieldMeta for a field that is directly declared in the class referenced by
this ClassMeta . |
FieldMeta |
getFieldMeta(String className,
String fieldName)
Get the FieldMeta for a field that is either directly declared in the class referenced by this
ClassMeta or in a super-class. |
Collection<FieldMeta> |
getFieldMetas()
Get all FieldMeta instances known to this instance. |
String |
getPackageName()
Get the package name or an empty String for the default package. |
String |
getSimpleClassName()
|
ClassMeta |
getSuperClassMeta()
The super-class' meta-data or null , if there is no persistence-capable super-class. |
int |
hashCode()
|
void |
removeFieldMeta(FieldMeta fieldMeta)
|
void |
setSuperClassMeta(ClassMeta superClassMeta)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ClassMeta()
public ClassMeta(Class<?> clazz)
Method Detail |
---|
public static ClassMeta getClassMeta(PersistenceManager pm, String packageName, String simpleClassName, boolean throwExceptionIfNotFound)
public static ClassMeta getClassMeta(PersistenceManager pm, Class<?> clazz, boolean throwExceptionIfNotFound)
public long getClassID()
public String getPackageName()
String
for the default package.
null
).public String getSimpleClassName()
public String getClassName()
packageName
and simpleClassName
).
public ClassMeta getSuperClassMeta()
null
, if there is no persistence-capable super-class.
null
.public void setSuperClassMeta(ClassMeta superClassMeta)
public Collection<FieldMeta> getFieldMetas()
FieldMeta
instances known to this instance. This is the meta-data for all fields
directly declared in the class referenced by this ClassMeta
not
including super-classes.
public FieldMeta getFieldMeta(String fieldName)
FieldMeta
for a field that is directly declared in the class referenced by
this ClassMeta
. This method thus does not take super-classes into account.
fieldName
- the simple field name (no class prefix).
FieldMeta
corresponding to the specified fieldName
or null
, if no such field
exists.getFieldMeta(long)
,
getFieldMeta(String, String)
public FieldMeta getFieldMeta(String className, String fieldName)
Get the FieldMeta
for a field that is either directly declared in the class referenced by this
ClassMeta
or in a super-class.
If className
is null
, this method
searches recursively in the inheritance hierarchy upwards (i.e. first this class then the super-class,
then the next super-class etc.) until it finds a field matching the given fieldName
.
If className
is not null
, this method searches only in the specified class.
If className
is neither the current class nor any super-class, this method always returns
null
.
className
- the fully qualified class-name of the class referenced by this ClassMeta
or any super-class. null
to search the entire class hierarchy upwards (through all super-classes
until the field is found or the last super-class was investigated).fieldName
- the simple field name (no class prefix).
FieldMeta
matching the given criteria or null
if no such field could be found.public FieldMeta getFieldMeta(long fieldID)
FieldMeta
with the specified fieldID
. It does not matter, if
this field is directly in the class referenced by this ClassMeta
or in a super-class.
fieldID
- the fieldID
of the FieldMeta
to be found.
FieldMeta
referenced by the given fieldID
or null
, if no such
field exists in the class or any super-class.public void addFieldMeta(FieldMeta fieldMeta)
public void removeFieldMeta(FieldMeta fieldMeta)
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public AbstractClassMetaData getDataNucleusClassMetaData(ExecutionContext executionContext)
|
Cumulus4j API (1.0.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |