public class ClassInfo extends Object implements ClassInfoIF
| Modifier and Type | Field and Description |
|---|---|
protected ClassDescriptor |
cdesc |
protected Map<String,FieldInfoIF> |
fields |
protected FieldInfoIF |
identity_field |
protected Class<?> |
klass |
protected Class<?> |
klass_immutable |
protected FieldInfoIF[] |
m2m_fields |
protected RDBMSMapping |
mapping |
protected FieldInfoIF[] |
o2m_fields |
protected FieldInfoIF[] |
o2o_fields |
protected FieldInfoIF[] |
value_fields |
STRUCTURE_COLLECTION, STRUCTURE_OBJECT, TYPE_AGGREGATE, TYPE_IDENTIFIABLE| Constructor and Description |
|---|
ClassInfo(RDBMSMapping mapping,
ClassDescriptor cdesc) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
compile()
INTERNAL: Compile the information in the class descriptor to an
optimized form.
|
protected static FieldInfoIF[] |
compileFieldInfos(ClassInfoIF cinfo,
FieldDescriptor[] fdescs)
INTERNAL: Wraps the field descriptors in the appropriate field
info implementations.
|
Object |
createInstance(boolean immutable)
INTERNAL: Creates an instance of the descriptor class.
|
Class<?> |
getDescriptorClass()
INTERNAL: Return the descriptor class described by the
descriptor.
|
protected static FieldInfoIF |
getFieldInfo(ClassInfoIF cinfo,
FieldDescriptor fdesc,
int index)
INTERNAL: Wraps the field descriptor in the appropriate field
info implementation.
|
FieldInfoIF |
getFieldInfoByName(String name)
INTERNAL: Get the field info by name.
|
FieldInfoIF |
getIdentityFieldInfo()
INTERNAL: Get the identity field infos.
|
FieldInfoIF[] |
getMany2ManyFieldInfos()
INTERNAL: Get the M:M field infos.
|
ObjectRelationalMappingIF |
getMapping()
INTERNAL: Returns the RDBMS specific object relational mapping
instance.
|
String |
getMasterTable()
INTERNAL: Returns the name of the master table in which the class
is stored.
|
String |
getName()
INTERNAL: Returns the name of the descriptor class (the mapped
class).
|
FieldInfoIF[] |
getOne2ManyFieldInfos()
INTERNAL: Get the 1:M field infos.
|
FieldInfoIF[] |
getOne2OneFieldInfos()
INTERNAL: Get the 1:1 field infos.
|
int |
getStructure()
INTERNAL: Returns the structure of the descriptor class.
|
FieldInfoIF[] |
getValueFieldInfos()
INTERNAL: Get the value field infos.
|
boolean |
isAbstract()
INTERNAL: Returns true if the descriptor class is declared as an
abstract descriptor.
|
boolean |
isAggregate()
INTERNAL: Returns true if the descriptor class is declared as an
aggregate type.
|
boolean |
isIdentifiable()
INTERNAL: Returns true if the descriptor class is declared as a
an identifiable type.
|
String |
toString() |
protected RDBMSMapping mapping
protected ClassDescriptor cdesc
protected Class<?> klass
protected Class<?> klass_immutable
protected Map<String,FieldInfoIF> fields
protected FieldInfoIF identity_field
protected FieldInfoIF[] value_fields
protected FieldInfoIF[] o2o_fields
protected FieldInfoIF[] o2m_fields
protected FieldInfoIF[] m2m_fields
public ClassInfo(RDBMSMapping mapping, ClassDescriptor cdesc)
protected void compile()
public ObjectRelationalMappingIF getMapping()
getMapping in interface ClassInfoIFpublic String getName()
ClassInfoIFgetName in interface ClassInfoIFpublic Class<?> getDescriptorClass()
getDescriptorClass in interface ClassInfoIFpublic Object createInstance(boolean immutable) throws Exception
ClassInfoIFcreateInstance in interface ClassInfoIFExceptionpublic FieldInfoIF getFieldInfoByName(String name)
getFieldInfoByName in interface ClassInfoIFpublic FieldInfoIF getIdentityFieldInfo()
getIdentityFieldInfo in interface ClassInfoIFpublic FieldInfoIF[] getValueFieldInfos()
getValueFieldInfos in interface ClassInfoIFpublic FieldInfoIF[] getOne2OneFieldInfos()
getOne2OneFieldInfos in interface ClassInfoIFpublic FieldInfoIF[] getOne2ManyFieldInfos()
getOne2ManyFieldInfos in interface ClassInfoIFpublic FieldInfoIF[] getMany2ManyFieldInfos()
getMany2ManyFieldInfos in interface ClassInfoIFpublic boolean isAbstract()
ClassInfoIFisAbstract in interface ClassInfoIFpublic boolean isIdentifiable()
ClassInfoIFisIdentifiable in interface ClassInfoIFpublic boolean isAggregate()
ClassInfoIFisAggregate in interface ClassInfoIFpublic int getStructure()
ClassInfoIFgetStructure in interface ClassInfoIFpublic String getMasterTable()
ClassInfoIFgetMasterTable in interface ClassInfoIFprotected static FieldInfoIF[] compileFieldInfos(ClassInfoIF cinfo, FieldDescriptor[] fdescs)
protected static FieldInfoIF getFieldInfo(ClassInfoIF cinfo, FieldDescriptor fdesc, int index)