Package net.ontopia.persistence.proxy
Class IdentityFieldInfo
java.lang.Object
net.ontopia.persistence.proxy.IdentityFieldInfo
- All Implemented Interfaces:
FieldHandlerIF,FieldInfoIF
INTERNAL: A field that represents the identity of instances of a
class. An identity field is a composite of one or more fields that
together represent the identity of objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected FieldInfoIF[]protected intprotected Methodprotected ClassInfoIFprotected Class<?>protected Methodprotected intprotected String[]Fields inherited from interface net.ontopia.persistence.proxy.FieldInfoIF
MANY_TO_MANY, ONE_TO_MANY, ONE_TO_ONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaggregateColumnNames(List<String> columns) voidbind(Object value, PreparedStatement stm, int stmt_index) INTERNAL: Binds the identity keys to the containing fields.protected String[]intINTERNAL: Gets the field cardinality.intINTERNAL: Returns the number of columns that the field spans.INTERNAL: Returns the underlying FieldInfoIF instances.INTERNAL: Returns the underlying FieldInfoIFs that the identity field spans.intgetIndex()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.getTable()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.INTERNAL: Gets the class info for the field's value type.String[]INTERNAL: Returns the names of the columns that the field spans.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 handler references an object identity field.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.load(AccessRegistrarIF registrar, TicketIF ticket, ResultSet rs, int rsindex, boolean direct) INTERNAL: Loads from its containing fields an IdentityIF with the field values as key.voidretrieveFieldValues(Object value, List<Object> field_values) voidretrieveSQLValues(Object value, List<SQLValueIF> sql_values) voidINTERNAL: Sets the field value for the given object.toString()
-
Field Details
-
parent_cinfo
-
parent_class
-
fields
-
fields_length
protected int fields_length -
value_columns
-
column_count
protected int column_count -
getter
-
setter
-
sqlType
protected int sqlType
-
-
Constructor Details
-
IdentityFieldInfo
-
-
Method Details
-
getFields
INTERNAL: Returns the underlying FieldInfoIFs that the identity field spans. -
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
-
getCardinality
public int getCardinality()Description copied from interface:FieldInfoIFINTERNAL: Gets the field cardinality.- Specified by:
getCardinalityin interfaceFieldInfoIF
-
isReadOnly
public boolean isReadOnly()Description copied from interface:FieldInfoIFINTERNAL: Returns true if this field is read-only field.- Specified by:
isReadOnlyin interfaceFieldInfoIF
-
isIdentityField
public boolean isIdentityField()Description copied from interface:FieldHandlerIFINTERNAL: Returns true if the field handler references an object identity field.- Specified by:
isIdentityFieldin interfaceFieldHandlerIF
-
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
-
getValueClassInfo
Description copied from interface:FieldInfoIFINTERNAL: Gets the class info for the field's value type. Note that primitive value classes don't have a class info.- Specified by:
getValueClassInfoin 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
-
getColumnCount
public int getColumnCount()Description copied from interface:FieldHandlerIFINTERNAL: Returns the number of columns that the field spans.- Specified by:
getColumnCountin interfaceFieldHandlerIF
-
getValueColumns
Description copied from interface:FieldInfoIFINTERNAL: Returns the names of the columns that the field spans.- Specified by:
getValueColumnsin interfaceFieldInfoIF
-
computeValueColumns
-
aggregateColumnNames
-
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
-
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
-
load
public Object load(AccessRegistrarIF registrar, TicketIF ticket, ResultSet rs, int rsindex, boolean direct) throws SQLException INTERNAL: Loads from its containing fields an IdentityIF with the field values as key.- Specified by:
loadin interfaceFieldHandlerIF- Throws:
SQLException
-
bind
INTERNAL: Binds the identity keys to the containing fields.- Specified by:
bindin interfaceFieldHandlerIF- Throws:
SQLException
-
retrieveFieldValues
- Specified by:
retrieveFieldValuesin interfaceFieldHandlerIF
-
retrieveSQLValues
- Specified by:
retrieveSQLValuesin interfaceFieldHandlerIF
-
toString
-
getFieldInfos
INTERNAL: Returns the underlying FieldInfoIF instances.
-