|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.persistence.proxy.FieldDescriptor
public class 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 | |
---|---|
protected int |
cardinality
|
protected ClassDescriptor |
cdesc
|
protected java.lang.Class |
collection_class
|
protected java.lang.String[] |
columns
|
protected java.lang.String |
getter
|
protected java.lang.reflect.Method |
getter_method
|
protected java.lang.String[] |
joinkeys
|
protected java.lang.String |
jointable
|
static int |
MANY_TO_MANY
Flag indicating that the descriptor field represents a M:M relationship. |
protected java.lang.String[] |
manykeys
|
protected ObjectRelationalMapping |
mapping
|
protected java.lang.String |
name
|
static int |
ONE_TO_MANY
Flag indicating that the descriptor field represents a 1:M relationship. |
static int |
ONE_TO_ONE
Flag indicating that the descriptor field represents a 1:1 relationship. |
protected boolean |
readonly
|
protected boolean |
required
|
protected java.lang.String |
setter
|
protected java.lang.reflect.Method |
setter_method
|
protected java.lang.Class |
value_class
|
Constructor Summary | |
---|---|
FieldDescriptor(java.lang.String name,
ClassDescriptor cdesc)
|
Method Summary | |
---|---|
int |
getCardinality()
INTERNAL: Gets the field cardinality. |
ClassDescriptor |
getClassDescriptor()
INTERNAL: Gets the class descriptor that the field descriptor belongs to. |
java.lang.Class |
getCollectionClass()
INTERNAL: Returns the collection class to store the field values in if the field is a 1:M and M:M field. |
java.lang.String[] |
getColumns()
INTERNAL: Returns the names of the columns referenced by the field. |
java.lang.String |
getGetter()
INTERNAL: Returns the method name for getting the field value from class instances. |
java.lang.reflect.Method |
getGetterMethod()
INTERNAL: Returns the method for getting the field value from class instances. |
java.lang.String[] |
getJoinKeys()
INTERNAL: Gets the columns that contains the keys referencing the master table. |
java.lang.String |
getJoinTable()
INTERNAL: Gets the name of the table which needs to be joined to order to access the field via the master table. |
java.lang.String[] |
getManyKeys()
INTERNAL: Gets the columns that contains the keys in the jointable that references the field table. |
java.lang.String |
getName()
INTERNAL: Returns the name of the descriptor field (the mapped field). |
java.lang.String |
getSetter()
INTERNAL: Returns the method name for setting the field value of class instances. |
java.lang.reflect.Method |
getSetterMethod()
INTERNAL: Returns the method for setting the field value of class instances. |
java.lang.String |
getTable()
INTERNAL: Returns the name of the table in which the field is stored. |
java.lang.Class |
getValueClass()
INTERNAL: Gets the field value class. |
ClassDescriptor |
getValueClassDescriptor()
INTERNAL: Gets the class descriptor of the field value class. |
boolean |
isAggregateField()
INTERNAL: Returns true if the field is an aggregate field. |
boolean |
isCollectionField()
INTERNAL: Returns true if the field is a collection field (a cardinality of 1:1 or 1:M). |
boolean |
isExternal()
INTERNAL: Returns true if the field is stored in a different table from the master table. |
boolean |
isIdentityField()
INTERNAL: Returns true if the field is an identity field. |
boolean |
isManyToMany()
INTERNAL: Returns true if the field cardinality is M:M. |
boolean |
isOneToMany()
INTERNAL: Returns true if the field cardinality is 1:M. |
boolean |
isOneToOne()
INTERNAL: Returns true if the field cardinality is 1:1. |
boolean |
isPrimitiveField()
INTERNAL: Returns true if the field is a primitive field. |
boolean |
isReadOnly()
INTERNAL: Returns true if this field is read-only field. |
boolean |
isReferenceField()
INTERNAL: Returns true if the field is a reference field. |
boolean |
isRequired()
INTERNAL: Returns true if the field is a required field. |
void |
setCardinality(int cardinality)
INTERNAL: Sets the field cardinality. |
void |
setCollectionClass(java.lang.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. |
void |
setColumns(java.lang.String[] columns)
INTERNAL: Sets the names of the columns referenced by the field. |
void |
setGetter(java.lang.String getter)
INTERNAL: Sets the method name for getting the field value from class instances. |
void |
setGetterMethod(java.lang.reflect.Method getter_method)
INTERNAL: Sets the method for getting the field value from class instances. |
void |
setJoinKeys(java.lang.String[] joinkeys)
INTERNAL: Sets the columns that contains the keys referencing the master table. |
void |
setJoinTable(java.lang.String jointable)
INTERNAL: Sets the name of the table which needs to be joined to order to access the field via the master table. |
void |
setManyKeys(java.lang.String[] manykeys)
INTERNAL: Sets the columns that contains the keys in the jointable that references the field table. |
void |
setReadOnly(boolean readonly)
INTERNAL: Sets whether the field is a read-only field or not. |
void |
setRequired(boolean required)
INTERNAL: Sets whether the field is a required field or not. |
void |
setSetter(java.lang.String setter)
INTERNAL: Sets the method name for setting the field value of class instances. |
void |
setSetterMethod(java.lang.reflect.Method setter_method)
INTERNAL: Sets the method for setting the field value of class instances. |
void |
setValueClass(java.lang.Class value_class)
INTERNAL: Sets the field value class. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ONE_TO_ONE
public static final int ONE_TO_MANY
public static final int MANY_TO_MANY
protected ObjectRelationalMapping mapping
protected ClassDescriptor cdesc
protected java.lang.String name
protected int cardinality
protected java.lang.Class value_class
protected boolean required
protected boolean readonly
protected java.lang.String getter
protected java.lang.String setter
protected java.lang.reflect.Method getter_method
protected java.lang.reflect.Method setter_method
protected java.lang.String[] columns
protected java.lang.String jointable
protected java.lang.String[] joinkeys
protected java.lang.String[] manykeys
protected java.lang.Class collection_class
Constructor Detail |
---|
public FieldDescriptor(java.lang.String name, ClassDescriptor cdesc)
Method Detail |
---|
public ClassDescriptor getClassDescriptor()
public java.lang.String getName()
public int getCardinality()
public void setCardinality(int cardinality)
public boolean isOneToOne()
public boolean isOneToMany()
public boolean isManyToMany()
public boolean isCollectionField()
public boolean isRequired()
public void setRequired(boolean required)
public boolean isReadOnly()
public void setReadOnly(boolean readonly)
public ClassDescriptor getValueClassDescriptor()
public java.lang.Class getValueClass()
public void setValueClass(java.lang.Class value_class)
public boolean isIdentityField()
public boolean isPrimitiveField()
public boolean isReferenceField()
public boolean isAggregateField()
public java.lang.String getGetter()
public void setGetter(java.lang.String getter)
public java.lang.String getSetter()
public void setSetter(java.lang.String setter)
public java.lang.reflect.Method getGetterMethod()
public void setGetterMethod(java.lang.reflect.Method getter_method)
public java.lang.reflect.Method getSetterMethod()
public void setSetterMethod(java.lang.reflect.Method setter_method)
public java.lang.String getTable()
public boolean isExternal()
public java.lang.String[] getColumns()
public void setColumns(java.lang.String[] columns)
public java.lang.String getJoinTable()
public void setJoinTable(java.lang.String jointable)
public java.lang.String[] getJoinKeys()
public void setJoinKeys(java.lang.String[] joinkeys)
public java.lang.String[] getManyKeys()
public void setManyKeys(java.lang.String[] manykeys)
public java.lang.Class getCollectionClass()
public void setCollectionClass(java.lang.Class collection_class)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |