|
Cumulus4j API (1.1.0) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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).
| Nested Class Summary | |
|---|---|
protected static class |
ClassMeta.NamedQueries
|
| Field Summary | |
|---|---|
protected static ThreadLocal<Set<ClassMeta>> |
attachedClassMetasInPostDetachThreadLocal
|
protected static String |
UNIQUE_SCOPE_CLASS_META
|
| Constructor Summary | |
|---|---|
protected |
ClassMeta()
|
|
ClassMeta(Class<?> clazz)
|
| Method Summary | |
|---|---|
void |
addFieldMeta(FieldMeta fieldMeta)
|
boolean |
equals(Object obj)
|
long |
getClassID()
|
String |
getClassName()
Get the fully qualified class name (composed of packageName and simpleClassName). |
static String |
getClassName(String packageName,
String 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. |
Map<String,FieldMeta> |
getFieldName2FieldMeta()
|
String |
getPackageName()
Get the package name or an empty String for the default package. |
protected PersistenceManager |
getPersistenceManager()
Get the PersistenceManager assigned to this. |
String |
getSimpleClassName()
|
ClassMeta |
getSuperClassMeta()
The super-class' meta-data or null, if there is no persistence-capable super-class. |
protected String |
getUniqueScope()
|
int |
hashCode()
|
void |
jdoPostDetach(Object o)
|
void |
jdoPostLoad()
|
void |
jdoPreDetach()
|
void |
jdoPreStore()
|
void |
removeFieldMeta(FieldMeta fieldMeta)
|
void |
setSuperClassMeta(ClassMeta superClassMeta)
|
protected void |
setUniqueScope(String uniqueScope)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String UNIQUE_SCOPE_CLASS_META
protected static final ThreadLocal<Set<ClassMeta>> attachedClassMetasInPostDetachThreadLocal
| Constructor Detail |
|---|
protected ClassMeta()
public ClassMeta(Class<?> clazz)
| Method Detail |
|---|
public long getClassID()
protected String getUniqueScope()
protected void setUniqueScope(String uniqueScope)
public String getPackageName()
String for the default package.
null).public String getSimpleClassName()
public String getClassName()
packageName and simpleClassName).
public static String getClassName(String packageName,
String simpleClassName)
public ClassMeta getSuperClassMeta()
null, if there is no persistence-capable super-class.
null.public void setSuperClassMeta(ClassMeta superClassMeta)
protected PersistenceManager getPersistenceManager()
PersistenceManager assigned to this. If there is none, this method checks, if
this is new. If this was persisted before, it must have one or an IllegalStateException
is thrown.
PersistenceManager assigned to this or null.public Map<String,FieldMeta> getFieldName2FieldMeta()
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 Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic AbstractClassMetaData getDataNucleusClassMetaData(ExecutionContext executionContext)
public void jdoPreDetach()
jdoPreDetach in interface DetachCallbackpublic void jdoPostDetach(Object o)
jdoPostDetach in interface DetachCallbackpublic void jdoPreStore()
jdoPreStore in interface StoreCallbackpublic void jdoPostLoad()
jdoPostLoad in interface LoadCallback
|
Cumulus4j API (1.1.0) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||