Package net.ontopia.persistence.proxy
Class FieldDescriptor
java.lang.Object
net.ontopia.persistence.proxy.FieldDescriptor
INTERNAL: Class used for holding object relational mapping field
declarations. It is used by the ObjectRelationalMapping class.
A field descriptor contains information about fields of object classes defined in object relational mappings. A field descriptor belongs to a single class descriptor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected ClassDescriptorprotected Classprotected String[]protected Stringprotected Methodprotected String[]protected Stringstatic final intFlag indicating that the descriptor field represents a M:M relationship.protected String[]protected ObjectRelationalMappingprotected Stringstatic final intFlag indicating that the descriptor field represents a 1:M relationship.static final intFlag indicating that the descriptor field represents a 1:1 relationship.protected booleanprotected booleanprotected Stringprotected Methodprotected Class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintINTERNAL: Gets the field cardinality.INTERNAL: Gets the class descriptor that the field descriptor belongs to.INTERNAL: Returns the collection class to store the field values in if the field is a 1:M and M:M field.String[]INTERNAL: Returns the names of the columns referenced by the field.INTERNAL: Returns the method name for getting the field value from class instances.INTERNAL: Returns the method for getting the field value from class instances.String[]INTERNAL: Gets the columns that contains the keys referencing the master table.INTERNAL: Gets the name of the table which needs to be joined to order to access the field via the master table.String[]INTERNAL: Gets the columns that contains the keys in the jointable that references the field table.getName()INTERNAL: Returns the name of the descriptor field (the mapped field).INTERNAL: Returns the method name for setting the field value of class instances.INTERNAL: Returns the method for setting the field value of class instances.getTable()INTERNAL: Returns the name of the table in which the field is stored.INTERNAL: Gets the field value class.INTERNAL: Gets the class descriptor of the field value class.booleanINTERNAL: Returns true if the field is an aggregate field.booleanINTERNAL: Returns true if the field is a collection field (a cardinality of 1:1 or 1:M).booleanINTERNAL: Returns true if the field is stored in a different table from the master table.booleanINTERNAL: Returns true if the field is an identity field.booleanINTERNAL: Returns true if the field cardinality is M:M.booleanINTERNAL: Returns true if the field cardinality is 1:M.booleanINTERNAL: Returns true if the field cardinality is 1:1.booleanINTERNAL: Returns true if the field is a primitive field.booleanINTERNAL: Returns true if this field is read-only field.booleanINTERNAL: Returns true if the field is a reference field.booleanINTERNAL: Returns true if the field is a required field.voidsetCardinality(int cardinality) INTERNAL: Sets the field cardinality.voidsetCollectionClass(Class collection_class) INTERNAL: Sets the collection class to store the field values in if the field is a 1:M and M:M field.voidsetColumns(String[] columns) INTERNAL: Sets the names of the columns referenced by the field.voidINTERNAL: Sets the method name for getting the field value from class instances.voidsetGetterMethod(Method getter_method) INTERNAL: Sets the method for getting the field value from class instances.voidsetJoinKeys(String[] joinkeys) INTERNAL: Sets the columns that contains the keys referencing the master table.voidsetJoinTable(String jointable) INTERNAL: Sets the name of the table which needs to be joined to order to access the field via the master table.voidsetManyKeys(String[] manykeys) INTERNAL: Sets the columns that contains the keys in the jointable that references the field table.voidsetReadOnly(boolean readonly) INTERNAL: Sets whether the field is a read-only field or not.voidsetRequired(boolean required) INTERNAL: Sets whether the field is a required field or not.voidINTERNAL: Sets the method name for setting the field value of class instances.voidsetSetterMethod(Method setter_method) INTERNAL: Sets the method for setting the field value of class instances.voidsetValueClass(Class value_class) INTERNAL: Sets the field value class.toString()
-
Field Details
-
ONE_TO_ONE
public static final int ONE_TO_ONEFlag indicating that the descriptor field represents a 1:1 relationship.- See Also:
-
ONE_TO_MANY
public static final int ONE_TO_MANYFlag indicating that the descriptor field represents a 1:M relationship.- See Also:
-
MANY_TO_MANY
public static final int MANY_TO_MANYFlag indicating that the descriptor field represents a M:M relationship.- See Also:
-
mapping
-
cdesc
-
name
-
cardinality
protected int cardinality -
value_class
-
required
protected boolean required -
readonly
protected boolean readonly -
getter
-
setter
-
getter_method
-
setter_method
-
columns
-
jointable
-
joinkeys
-
manykeys
-
collection_class
-
-
Constructor Details
-
FieldDescriptor
-
-
Method Details
-
getClassDescriptor
INTERNAL: Gets the class descriptor that the field descriptor belongs to. -
getName
INTERNAL: Returns the name of the descriptor field (the mapped field). -
getCardinality
public int getCardinality()INTERNAL: Gets the field cardinality. -
setCardinality
public void setCardinality(int cardinality) INTERNAL: Sets the field cardinality. This can be either ONE_TO_ONE, ONE_TO_MANY or MANY_TO_MANY. -
isOneToOne
public boolean isOneToOne()INTERNAL: Returns true if the field cardinality is 1:1. -
isOneToMany
public boolean isOneToMany()INTERNAL: Returns true if the field cardinality is 1:M. -
isManyToMany
public boolean isManyToMany()INTERNAL: Returns true if the field cardinality is M:M. -
isCollectionField
public boolean isCollectionField()INTERNAL: Returns true if the field is a collection field (a cardinality of 1:1 or 1:M). -
isRequired
public boolean isRequired()INTERNAL: Returns true if the field is a required field. -
setRequired
public void setRequired(boolean required) INTERNAL: Sets whether the field is a required field or not. -
isReadOnly
public boolean isReadOnly()INTERNAL: Returns true if this field is read-only field. -
setReadOnly
public void setReadOnly(boolean readonly) INTERNAL: Sets whether the field is a read-only field or not. -
getValueClassDescriptor
INTERNAL: Gets the class descriptor of the field value class. Note that primitive value classes don't have a class info. -
getValueClass
INTERNAL: Gets the field value class. For primitive fields the primitive wrapper class is returned. -
setValueClass
INTERNAL: Sets the field value class. For primitive fields the primitive wrapper class should be used. -
isIdentityField
public boolean isIdentityField()INTERNAL: Returns true if the field is an identity field. -
isPrimitiveField
public boolean isPrimitiveField()INTERNAL: Returns true if the field is a primitive field. -
isReferenceField
public boolean isReferenceField()INTERNAL: Returns true if the field is a reference field. -
isAggregateField
public boolean isAggregateField()INTERNAL: Returns true if the field is an aggregate field. -
getGetter
INTERNAL: Returns the method name for getting the field value from class instances. -
setGetter
INTERNAL: Sets the method name for getting the field value from class instances. -
getSetter
INTERNAL: Returns the method name for setting the field value of class instances. -
setSetter
INTERNAL: Sets the method name for setting the field value of class instances. -
getGetterMethod
INTERNAL: Returns the method for getting the field value from class instances. -
setGetterMethod
INTERNAL: Sets the method for getting the field value from class instances. -
getSetterMethod
INTERNAL: Returns the method for setting the field value of class instances. -
setSetterMethod
INTERNAL: Sets the method for setting the field value of class instances. -
getTable
INTERNAL: Returns the name of the table in which the field is stored. -
isExternal
public boolean isExternal()INTERNAL: Returns true if the field is stored in a different table from the master table. -
getColumns
INTERNAL: Returns the names of the columns referenced by the field. -
setColumns
INTERNAL: Sets the names of the columns referenced by the field. -
getJoinTable
INTERNAL: Gets the name of the table which needs to be joined to order to access the field via the master table. -
setJoinTable
INTERNAL: Sets the name of the table which needs to be joined to order to access the field via the master table. -
getJoinKeys
INTERNAL: Gets the columns that contains the keys referencing the master table. -
setJoinKeys
INTERNAL: Sets the columns that contains the keys referencing the master table. -
getManyKeys
INTERNAL: Gets the columns that contains the keys in the jointable that references the field table. -
setManyKeys
INTERNAL: Sets the columns that contains the keys in the jointable that references the field table. -
getCollectionClass
INTERNAL: Returns the collection class to store the field values in if the field is a 1:M and M:M field. -
setCollectionClass
INTERNAL: Sets the collection class to store the field values in if the field is a 1:M and M:M field. -
toString
-