Package net.ontopia.persistence.proxy
Class ClassDescriptor
java.lang.Object
net.ontopia.persistence.proxy.ClassDescriptor
INTERNAL: Class used for holding object relational mapping class
declarations. It is used by the ObjectRelationalMapping class.
A class descriptor contains information about object classes defined in object relational mappings. Class descriptors consists of a set of field descriptors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Class<?>[]protected Map<String,FieldDescriptor> protected List<FieldDescriptor>protected String[]protected Class<?>[]protected booleanprotected Class<?>protected Class<?>protected ObjectRelationalMappingprotected Stringprotected intprotected int -
Constructor Summary
ConstructorsConstructorDescriptionClassDescriptor(Class<?> klass, Class<?> klass_immutable, ObjectRelationalMapping mapping) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(FieldDescriptor fdesc) INTERNAL: Adds the field descriptor to the class descriptor.INTERNAL: Returns an array containing the fields that are aggregate objects.Class<?>INTERNAL: Returns the descriptor class.Class[]INTERNAL: Returns the descriptor classes that this descriptor class extends.getFieldByName(String field_name) INTERNAL: Gets the field descriptor representing the field with the given name.protected Map<String,FieldDescriptor> INTERNAL: Returns all the field descriptors of this class descriptor.String[]INTERNAL: Gets all the field names of this class descriptor.protected String[]INTERNAL: Returns the field names of the identity fields.INTERNAL: Returns an array containing the fields that are identity fields.Class<?>INTERNAL: Returns the immutable descriptor class.Class[]INTERNAL: Gets the interfaces that this descriptor class implement.INTERNAL: Gets the object relational mapping that the class descriptor belongs to.INTERNAL: Returns the name of the master table in which the class is stored.getName()INTERNAL: Returns the name of the descriptor class (the mapped class).INTERNAL: Returns an array containing the fields that are of primitive types.INTERNAL: Returns an array containing the fields that references other mapped objects.intINTERNAL: Returns the class structure.intgetType()INTERNAL: Returns the class type.INTERNAL: Returns an array containing the fields that are value fields, i.e. not identity fields.booleanINTERNAL: Returns true if the descriptor class is mapped as an abstract class.booleanprotected voidpopulateExtendsMap(Map<String, FieldDescriptor> _fdescs) voidsetAbstract(boolean isabstract) INTERNAL: Sets the abstract flag.voidsetExtends(Class[] extends_classes) INTERNAL: Sets the descriptor classes that this descriptor class extends.protected voidsetIdentityFieldNames(String[] identity_fields) INTERNAL: Sets the field names of the identity fields.voidsetInterfaces(Class[] interfaces) INTERNAL: Sets the interfaces that this descriptor class implement.voidsetMasterTable(String master_table) INTERNAL: Sets the name of the master table in which the class is stored.voidsetStructure(int structure) INTERNAL: Sets the class structure.voidsetType(int type) INTERNAL: Sets the class type.toString()
-
Field Details
-
mapping
-
klass
-
klass_immutable
-
identity_fields
-
isabstract
protected boolean isabstract -
type
protected int type -
structure
protected int structure -
master_table
-
extends_classes
-
interfaces
-
fdescs_list
-
fdescs
-
-
Constructor Details
-
ClassDescriptor
-
-
Method Details
-
getMapping
INTERNAL: Gets the object relational mapping that the class descriptor belongs to. -
getName
INTERNAL: Returns the name of the descriptor class (the mapped class). -
getDescriptorClass
INTERNAL: Returns the descriptor class. -
getImmutableDescriptorClass
INTERNAL: Returns the immutable descriptor class. -
getIdentityFields
INTERNAL: Returns an array containing the fields that are identity fields.An identity field is the field that together represents the identity, or primary key, of instances of the class.
-
getValueFields
INTERNAL: Returns an array containing the fields that are value fields, i.e. not identity fields. -
getPrimitiveFields
INTERNAL: Returns an array containing the fields that are of primitive types. -
getReferenceFields
INTERNAL: Returns an array containing the fields that references other mapped objects. -
getAggregateFields
INTERNAL: Returns an array containing the fields that are aggregate objects. Aggregate objects are composite objects that don't have explicit identity. -
getIdentityFieldNames
INTERNAL: Returns the field names of the identity fields. -
setIdentityFieldNames
INTERNAL: Sets the field names of the identity fields. -
getType
public int getType()INTERNAL: Returns the class type. -
setType
public void setType(int type) INTERNAL: Sets the class type. This is can either be ClassInfoIF.TYPE_IDENTIFIABLE or ClassInfoIF.TYPE_AGGREGATE. -
isAggregate
public boolean isAggregate() -
getStructure
public int getStructure()INTERNAL: Returns the class structure. -
setStructure
public void setStructure(int structure) INTERNAL: Sets the class structure. This is can either be ClassInfoIF.STRUCTURE_OBJECT or ClassInfoIF.STRUCTURE_COLLECTION. -
setAbstract
public void setAbstract(boolean isabstract) INTERNAL: Sets the abstract flag. The default is that the descriptor class is non-abstract (i.e. concrete). -
isAbstract
public boolean isAbstract()INTERNAL: Returns true if the descriptor class is mapped as an abstract class. -
getMasterTable
INTERNAL: Returns the name of the master table in which the class is stored. -
setMasterTable
INTERNAL: Sets the name of the master table in which the class is stored. -
getExtends
INTERNAL: Returns the descriptor classes that this descriptor class extends. (Not implemented) -
setExtends
INTERNAL: Sets the descriptor classes that this descriptor class extends. (Not implemented) -
getFieldDescriptorMap
-
populateExtendsMap
-
getInterfaces
INTERNAL: Gets the interfaces that this descriptor class implement. -
setInterfaces
INTERNAL: Sets the interfaces that this descriptor class implement. -
getFieldDescriptors
INTERNAL: Returns all the field descriptors of this class descriptor. -
getFieldNames
INTERNAL: Gets all the field names of this class descriptor. -
getFieldByName
INTERNAL: Gets the field descriptor representing the field with the given name. -
addField
INTERNAL: Adds the field descriptor to the class descriptor. -
toString
-