|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.persistence.proxy.IdentityFieldInfo
public class IdentityFieldInfo
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 | |
---|---|
protected int |
column_count
|
protected FieldInfoIF[] |
fields
|
protected int |
fields_length
|
protected java.lang.reflect.Method |
getter
|
protected ClassInfoIF |
parent_cinfo
|
protected java.lang.Class |
parent_class
|
protected java.lang.reflect.Method |
setter
|
protected int |
sqlType
|
protected java.lang.String[] |
value_columns
|
Fields inherited from interface net.ontopia.persistence.proxy.FieldInfoIF |
---|
MANY_TO_MANY, ONE_TO_MANY, ONE_TO_ONE |
Constructor Summary | |
---|---|
IdentityFieldInfo(ClassInfoIF parent_cinfo,
FieldInfoIF[] identity_fields)
|
Method Summary | |
---|---|
protected void |
aggregateColumnNames(java.util.List columns)
|
void |
bind(java.lang.Object value,
java.sql.PreparedStatement stm,
int stmt_index)
INTERNAL: Binds the identity keys to the containing fields. |
protected java.lang.String[] |
computeValueColumns()
|
int |
getCardinality()
INTERNAL: Gets the field cardinality. |
int |
getColumnCount()
INTERNAL: Returns the number of columns that the field spans. |
FieldInfoIF[] |
getFieldInfos()
INTERNAL: Returns the underlying FieldInfoIF instances. |
FieldInfoIF[] |
getFields()
INTERNAL: Returns the underlying FieldInfoIFs that the identity field spans. |
int |
getIndex()
INTERNAL: Gets the value field index of this field. |
java.lang.String[] |
getJoinKeys()
INTERNAL: Gets the columns in the join table that contains the keys of the referencing object. |
java.lang.String |
getJoinTable()
INTERNAL: Gets the name of the table which needs to be joined to order to access the field value from the master table. |
java.lang.String[] |
getManyKeys()
INTERNAL: Gets the columns in the join table that contains the keys of the referenced object. |
java.lang.String |
getName()
INTERNAL: Gets the field name. |
ClassInfoIF |
getParentClassInfo()
INTERNAL: Gets the class info for the field's object type. |
java.lang.String |
getTable()
INTERNAL: Gets the table in which the field value is stored (aka the master table). |
java.lang.Object |
getValue(java.lang.Object object)
INTERNAL: Gets the field value from the given object. |
java.lang.Class |
getValueClass()
INTERNAL: Gets the field value class. |
ClassInfoIF |
getValueClassInfo()
INTERNAL: Gets the class info for the field's value type. |
java.lang.String[] |
getValueColumns()
INTERNAL: Returns the names of the columns that the field spans. |
boolean |
isAggregateField()
INTERNAL: Returns true if the field is an aggregate field. |
boolean |
isCollectionField()
INTERNAL: Returns true if the field is a collection field (has a cardinality of 1:1 or 1:M). |
boolean |
isIdentityField()
INTERNAL: Returns true if the field handler references an object identity field. |
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. |
java.lang.Object |
load(AccessRegistrarIF registrar,
TicketIF ticket,
java.sql.ResultSet rs,
int rsindex,
boolean direct)
INTERNAL: Loads from its containing fields an IdentityIF with the field values as key. |
void |
retrieveFieldValues(java.lang.Object value,
java.util.List field_values)
|
void |
retrieveSQLValues(java.lang.Object value,
java.util.List sql_values)
|
void |
setValue(java.lang.Object object,
java.lang.Object value)
INTERNAL: Sets the field value for the given object. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ClassInfoIF parent_cinfo
protected java.lang.Class parent_class
protected FieldInfoIF[] fields
protected int fields_length
protected java.lang.String[] value_columns
protected int column_count
protected java.lang.reflect.Method getter
protected java.lang.reflect.Method setter
protected int sqlType
Constructor Detail |
---|
public IdentityFieldInfo(ClassInfoIF parent_cinfo, FieldInfoIF[] identity_fields)
Method Detail |
---|
public FieldInfoIF[] getFields()
public java.lang.String getName()
FieldInfoIF
getName
in interface FieldInfoIF
public int getIndex()
FieldInfoIF
getIndex
in interface FieldInfoIF
public int getCardinality()
FieldInfoIF
getCardinality
in interface FieldInfoIF
public boolean isReadOnly()
FieldInfoIF
isReadOnly
in interface FieldInfoIF
public boolean isIdentityField()
FieldHandlerIF
isIdentityField
in interface FieldHandlerIF
public boolean isCollectionField()
FieldInfoIF
isCollectionField
in interface FieldInfoIF
public boolean isPrimitiveField()
FieldInfoIF
isPrimitiveField
in interface FieldInfoIF
public boolean isReferenceField()
FieldInfoIF
isReferenceField
in interface FieldInfoIF
public boolean isAggregateField()
FieldInfoIF
isAggregateField
in interface FieldInfoIF
public ClassInfoIF getParentClassInfo()
FieldInfoIF
getParentClassInfo
in interface FieldInfoIF
public ClassInfoIF getValueClassInfo()
FieldInfoIF
getValueClassInfo
in interface FieldInfoIF
public java.lang.Class getValueClass()
FieldInfoIF
getValueClass
in interface FieldInfoIF
public java.lang.String getTable()
FieldInfoIF
getTable
in interface FieldInfoIF
public int getColumnCount()
FieldHandlerIF
getColumnCount
in interface FieldHandlerIF
public java.lang.String[] getValueColumns()
FieldInfoIF
getValueColumns
in interface FieldInfoIF
protected java.lang.String[] computeValueColumns()
protected void aggregateColumnNames(java.util.List columns)
public java.lang.Object getValue(java.lang.Object object) throws java.lang.Exception
FieldInfoIF
getValue
in interface FieldInfoIF
java.lang.Exception
public void setValue(java.lang.Object object, java.lang.Object value) throws java.lang.Exception
FieldInfoIF
setValue
in interface FieldInfoIF
java.lang.Exception
public java.lang.String getJoinTable()
FieldInfoIF
getJoinTable
in interface FieldInfoIF
public java.lang.String[] getJoinKeys()
FieldInfoIF
getJoinKeys
in interface FieldInfoIF
public java.lang.String[] getManyKeys()
FieldInfoIF
getManyKeys
in interface FieldInfoIF
public java.lang.Object load(AccessRegistrarIF registrar, TicketIF ticket, java.sql.ResultSet rs, int rsindex, boolean direct) throws java.sql.SQLException
load
in interface FieldHandlerIF
java.sql.SQLException
public void bind(java.lang.Object value, java.sql.PreparedStatement stm, int stmt_index) throws java.sql.SQLException
bind
in interface FieldHandlerIF
java.sql.SQLException
public void retrieveFieldValues(java.lang.Object value, java.util.List field_values)
retrieveFieldValues
in interface FieldHandlerIF
public void retrieveSQLValues(java.lang.Object value, java.util.List sql_values)
retrieveSQLValues
in interface FieldHandlerIF
public java.lang.String toString()
toString
in class java.lang.Object
public FieldInfoIF[] getFieldInfos()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |