net.ontopia.persistence.proxy
Class ClassInfo

java.lang.Object
  extended by net.ontopia.persistence.proxy.ClassInfo
All Implemented Interfaces:
ClassInfoIF

public class ClassInfo
extends java.lang.Object
implements ClassInfoIF

INTERNAL: A class descriptor-like class that is used by the RDBMS proxy implementation to access the information it needs about the object relational class descriptor in an optimized manner.


Field Summary
protected  ClassDescriptor cdesc
           
protected  java.util.Map fields
           
protected  FieldInfoIF identity_field
           
protected  java.lang.Class klass
           
protected  java.lang.Class klass_immutable
           
protected  FieldInfoIF[] m2m_fields
           
protected  RDBMSMapping mapping
           
protected  FieldInfoIF[] o2m_fields
           
protected  FieldInfoIF[] o2o_fields
           
protected  FieldInfoIF[] value_fields
           
 
Fields inherited from interface net.ontopia.persistence.proxy.ClassInfoIF
STRUCTURE_COLLECTION, STRUCTURE_OBJECT, TYPE_AGGREGATE, TYPE_IDENTIFIABLE
 
Constructor Summary
ClassInfo(RDBMSMapping mapping, ClassDescriptor cdesc)
           
 
Method Summary
protected static FieldInfoIF[] compileFieldInfos(ClassInfoIF cinfo, FieldDescriptor[] fdescs)
          INTERNAL: Wraps the field descriptors in the appropriate field info implementations.
 java.lang.Object createInstance(boolean immutable)
          INTERNAL: Creates an instance of the descriptor class.
 java.lang.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(java.lang.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.
 java.lang.String getMasterTable()
          INTERNAL: Returns the name of the master table in which the class is stored.
 java.lang.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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mapping

protected RDBMSMapping mapping

cdesc

protected ClassDescriptor cdesc

klass

protected java.lang.Class klass

klass_immutable

protected java.lang.Class klass_immutable

fields

protected java.util.Map fields

identity_field

protected FieldInfoIF identity_field

value_fields

protected FieldInfoIF[] value_fields

o2o_fields

protected FieldInfoIF[] o2o_fields

o2m_fields

protected FieldInfoIF[] o2m_fields

m2m_fields

protected FieldInfoIF[] m2m_fields
Constructor Detail

ClassInfo

public ClassInfo(RDBMSMapping mapping,
                 ClassDescriptor cdesc)
Method Detail

getMapping

public ObjectRelationalMappingIF getMapping()
INTERNAL: Returns the RDBMS specific object relational mapping instance.

Specified by:
getMapping in interface ClassInfoIF

getName

public java.lang.String getName()
Description copied from interface: ClassInfoIF
INTERNAL: Returns the name of the descriptor class (the mapped class).

Specified by:
getName in interface ClassInfoIF

getDescriptorClass

public java.lang.Class getDescriptorClass()
INTERNAL: Return the descriptor class described by the descriptor.

Specified by:
getDescriptorClass in interface ClassInfoIF

createInstance

public java.lang.Object createInstance(boolean immutable)
                                throws java.lang.Exception
Description copied from interface: ClassInfoIF
INTERNAL: Creates an instance of the descriptor class. Actual implementation will depend on the immutable argument.

Specified by:
createInstance in interface ClassInfoIF
Throws:
java.lang.Exception

getFieldInfoByName

public FieldInfoIF getFieldInfoByName(java.lang.String name)
INTERNAL: Get the field info by name.

Specified by:
getFieldInfoByName in interface ClassInfoIF

getIdentityFieldInfo

public FieldInfoIF getIdentityFieldInfo()
INTERNAL: Get the identity field infos.

Specified by:
getIdentityFieldInfo in interface ClassInfoIF

getValueFieldInfos

public FieldInfoIF[] getValueFieldInfos()
INTERNAL: Get the value field infos.

Specified by:
getValueFieldInfos in interface ClassInfoIF

getOne2OneFieldInfos

public FieldInfoIF[] getOne2OneFieldInfos()
INTERNAL: Get the 1:1 field infos.

Specified by:
getOne2OneFieldInfos in interface ClassInfoIF

getOne2ManyFieldInfos

public FieldInfoIF[] getOne2ManyFieldInfos()
INTERNAL: Get the 1:M field infos.

Specified by:
getOne2ManyFieldInfos in interface ClassInfoIF

getMany2ManyFieldInfos

public FieldInfoIF[] getMany2ManyFieldInfos()
INTERNAL: Get the M:M field infos.

Specified by:
getMany2ManyFieldInfos in interface ClassInfoIF

isAbstract

public boolean isAbstract()
Description copied from interface: ClassInfoIF
INTERNAL: Returns true if the descriptor class is declared as an abstract descriptor.

Specified by:
isAbstract in interface ClassInfoIF

isIdentifiable

public boolean isIdentifiable()
Description copied from interface: ClassInfoIF
INTERNAL: Returns true if the descriptor class is declared as a an identifiable type.

Specified by:
isIdentifiable in interface ClassInfoIF

isAggregate

public boolean isAggregate()
Description copied from interface: ClassInfoIF
INTERNAL: Returns true if the descriptor class is declared as an aggregate type.

Specified by:
isAggregate in interface ClassInfoIF

getStructure

public int getStructure()
Description copied from interface: ClassInfoIF
INTERNAL: Returns the structure of the descriptor class. This can either be OBJECT, COLLECTION or MAP.

Specified by:
getStructure in interface ClassInfoIF

getMasterTable

public java.lang.String getMasterTable()
Description copied from interface: ClassInfoIF
INTERNAL: Returns the name of the master table in which the class is stored. This is the table which typically contains the instance identity.

Specified by:
getMasterTable in interface ClassInfoIF

compileFieldInfos

protected static FieldInfoIF[] compileFieldInfos(ClassInfoIF cinfo,
                                                 FieldDescriptor[] fdescs)
INTERNAL: Wraps the field descriptors in the appropriate field info implementations.


getFieldInfo

protected static FieldInfoIF getFieldInfo(ClassInfoIF cinfo,
                                          FieldDescriptor fdesc,
                                          int index)
INTERNAL: Wraps the field descriptor in the appropriate field info implementation.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000-2012 Ontopia.