Package net.ontopia.persistence.proxy
Class AbstractFieldInfo
java.lang.Object
net.ontopia.persistence.proxy.AbstractFieldInfo
- All Implemented Interfaces:
FieldHandlerIF,FieldInfoIF
- Direct Known Subclasses:
AggregateFieldInfo,PrimitiveFieldInfo,ReferenceFieldInfo
INTERNAL: An abstract field info class containing the common
behaviour for FieldInfoIFs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected FieldDescriptorprotected Methodprotected intprotected booleanprotected Stringprotected ClassInfoIFprotected booleanprotected Methodprotected Class<?>Fields inherited from interface net.ontopia.persistence.proxy.FieldInfoIF
MANY_TO_MANY, ONE_TO_MANY, ONE_TO_ONE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFieldInfo(ClassInfoIF parent_cinfo, String name, int index, Class<?> value_class, boolean is_collection, int cardinality, boolean readonly) -
Method Summary
Modifier and TypeMethodDescriptionintINTERNAL: Gets the field cardinality.INTERNAL: Returns the underlying FieldDescriptor instance if one exists.protected MethodintgetIndex()INTERNAL: Gets the value field index of this field.String[]INTERNAL: Gets the columns in the join table that contains the keys of the referencing object.INTERNAL: Gets the name of the table which needs to be joined to order to access the field value from the master table.String[]INTERNAL: Gets the columns in the join table that contains the keys of the referenced object.getName()INTERNAL: Gets the field name.INTERNAL: Gets the class info for the field's object type.protected MethodgetTable()INTERNAL: Gets the table in which the field value is stored (aka the master table).INTERNAL: Gets the field value from the given object.Class<?>INTERNAL: Gets the field value class.booleanINTERNAL: Returns true if the field is an aggregate field.booleanINTERNAL: Returns true if the field is a collection field (has a cardinality of 1:1 or 1:M).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.voidINTERNAL: Sets the field value for the given object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.ontopia.persistence.proxy.FieldHandlerIF
bind, getColumnCount, isIdentityField, load, retrieveFieldValues, retrieveSQLValuesMethods inherited from interface net.ontopia.persistence.proxy.FieldInfoIF
getValueClassInfo, getValueColumns
-
Field Details
-
name
-
index
protected int index -
cardinality
protected int cardinality -
readonly
protected boolean readonly -
is_collection
protected boolean is_collection -
parent_cinfo
-
value_class
-
field
-
getter
-
setter
-
-
Constructor Details
-
AbstractFieldInfo
protected AbstractFieldInfo(ClassInfoIF parent_cinfo, String name, int index, Class<?> value_class, boolean is_collection, int cardinality, boolean readonly)
-
-
Method Details
-
getName
Description copied from interface:FieldInfoIFINTERNAL: Gets the field name.- Specified by:
getNamein interfaceFieldInfoIF
-
getIndex
public int getIndex()Description copied from interface:FieldInfoIFINTERNAL: Gets the value field index of this field. This is the id (index) used by transactions and persistent instances to refer to this particular object field.- Specified by:
getIndexin interfaceFieldInfoIF
-
isReadOnly
public boolean isReadOnly()Description copied from interface:FieldInfoIFINTERNAL: Returns true if this field is read-only field.- Specified by:
isReadOnlyin interfaceFieldInfoIF
-
getCardinality
public int getCardinality()Description copied from interface:FieldInfoIFINTERNAL: Gets the field cardinality.- Specified by:
getCardinalityin interfaceFieldInfoIF
-
isCollectionField
public boolean isCollectionField()Description copied from interface:FieldInfoIFINTERNAL: Returns true if the field is a collection field (has a cardinality of 1:1 or 1:M).- Specified by:
isCollectionFieldin interfaceFieldInfoIF
-
isPrimitiveField
public boolean isPrimitiveField()Description copied from interface:FieldInfoIFINTERNAL: Returns true if the field is a primitive field. Field value must be of primitive type.- Specified by:
isPrimitiveFieldin interfaceFieldInfoIF
-
isReferenceField
public boolean isReferenceField()Description copied from interface:FieldInfoIFINTERNAL: Returns true if the field is a reference field. Field value must be of identifiable type.- Specified by:
isReferenceFieldin interfaceFieldInfoIF
-
isAggregateField
public boolean isAggregateField()Description copied from interface:FieldInfoIFINTERNAL: Returns true if the field is an aggregate field. Field value must be of aggregate type.- Specified by:
isAggregateFieldin interfaceFieldInfoIF
-
getParentClassInfo
Description copied from interface:FieldInfoIFINTERNAL: Gets the class info for the field's object type.- Specified by:
getParentClassInfoin interfaceFieldInfoIF
-
getValueClass
Description copied from interface:FieldInfoIFINTERNAL: Gets the field value class. For primitive fields the primitive wrapper class is returned.- Specified by:
getValueClassin interfaceFieldInfoIF
-
getTable
Description copied from interface:FieldInfoIFINTERNAL: Gets the table in which the field value is stored (aka the master table).- Specified by:
getTablein interfaceFieldInfoIF
-
getValue
Description copied from interface:FieldInfoIFINTERNAL: Gets the field value from the given object.- Specified by:
getValuein interfaceFieldInfoIF- Throws:
Exception
-
setValue
Description copied from interface:FieldInfoIFINTERNAL: Sets the field value for the given object.- Specified by:
setValuein interfaceFieldInfoIF- Throws:
Exception
-
getGetterMethod
-
getSetterMethod
-
getJoinTable
Description copied from interface:FieldInfoIFINTERNAL: Gets the name of the table which needs to be joined to order to access the field value from the master table.- Specified by:
getJoinTablein interfaceFieldInfoIF
-
getJoinKeys
Description copied from interface:FieldInfoIFINTERNAL: Gets the columns in the join table that contains the keys of the referencing object.- Specified by:
getJoinKeysin interfaceFieldInfoIF
-
getManyKeys
Description copied from interface:FieldInfoIFINTERNAL: Gets the columns in the join table that contains the keys of the referenced object.- Specified by:
getManyKeysin interfaceFieldInfoIF
-
getDescriptor
INTERNAL: Returns the underlying FieldDescriptor instance if one exists.
-