public class IdentityFieldInfo extends Object implements FieldInfoIF
| Modifier and Type | Field and Description |
|---|---|
protected int |
column_count |
protected FieldInfoIF[] |
fields |
protected int |
fields_length |
protected Method |
getter |
protected ClassInfoIF |
parent_cinfo |
protected Class<?> |
parent_class |
protected Method |
setter |
protected int |
sqlType |
protected String[] |
value_columns |
MANY_TO_MANY, ONE_TO_MANY, ONE_TO_ONE| Constructor and Description |
|---|
IdentityFieldInfo(ClassInfoIF parent_cinfo,
FieldInfoIF[] identity_fields) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
aggregateColumnNames(List<String> columns) |
void |
bind(Object value,
PreparedStatement stm,
int stmt_index)
INTERNAL: Binds the identity keys to the containing fields.
|
protected 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.
|
String[] |
getJoinKeys()
INTERNAL: Gets the columns in the join table that contains the
keys of the referencing object.
|
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.
|
String[] |
getManyKeys()
INTERNAL: Gets the columns in the join table that contains the
keys of the referenced object.
|
String |
getName()
INTERNAL: Gets the field name.
|
ClassInfoIF |
getParentClassInfo()
INTERNAL: Gets the class info for the field's object type.
|
String |
getTable()
INTERNAL: Gets the table in which the field value is stored (aka
the master table).
|
Object |
getValue(Object object)
INTERNAL: Gets the field value from the given object.
|
Class<?> |
getValueClass()
INTERNAL: Gets the field value class.
|
ClassInfoIF |
getValueClassInfo()
INTERNAL: Gets the class info for the field's value type.
|
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.
|
Object |
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.
|
void |
retrieveFieldValues(Object value,
List<Object> field_values) |
void |
retrieveSQLValues(Object value,
List<SQLValueIF> sql_values) |
void |
setValue(Object object,
Object value)
INTERNAL: Sets the field value for the given object.
|
String |
toString() |
protected ClassInfoIF parent_cinfo
protected Class<?> parent_class
protected FieldInfoIF[] fields
protected int fields_length
protected String[] value_columns
protected int column_count
protected Method getter
protected Method setter
protected int sqlType
public IdentityFieldInfo(ClassInfoIF parent_cinfo, FieldInfoIF[] identity_fields)
public FieldInfoIF[] getFields()
public String getName()
FieldInfoIFgetName in interface FieldInfoIFpublic int getIndex()
FieldInfoIFgetIndex in interface FieldInfoIFpublic int getCardinality()
FieldInfoIFgetCardinality in interface FieldInfoIFpublic boolean isReadOnly()
FieldInfoIFisReadOnly in interface FieldInfoIFpublic boolean isIdentityField()
FieldHandlerIFisIdentityField in interface FieldHandlerIFpublic boolean isCollectionField()
FieldInfoIFisCollectionField in interface FieldInfoIFpublic boolean isPrimitiveField()
FieldInfoIFisPrimitiveField in interface FieldInfoIFpublic boolean isReferenceField()
FieldInfoIFisReferenceField in interface FieldInfoIFpublic boolean isAggregateField()
FieldInfoIFisAggregateField in interface FieldInfoIFpublic ClassInfoIF getParentClassInfo()
FieldInfoIFgetParentClassInfo in interface FieldInfoIFpublic ClassInfoIF getValueClassInfo()
FieldInfoIFgetValueClassInfo in interface FieldInfoIFpublic Class<?> getValueClass()
FieldInfoIFgetValueClass in interface FieldInfoIFpublic String getTable()
FieldInfoIFgetTable in interface FieldInfoIFpublic int getColumnCount()
FieldHandlerIFgetColumnCount in interface FieldHandlerIFpublic String[] getValueColumns()
FieldInfoIFgetValueColumns in interface FieldInfoIFprotected String[] computeValueColumns()
public Object getValue(Object object) throws Exception
FieldInfoIFgetValue in interface FieldInfoIFExceptionpublic void setValue(Object object, Object value) throws Exception
FieldInfoIFsetValue in interface FieldInfoIFExceptionpublic String getJoinTable()
FieldInfoIFgetJoinTable in interface FieldInfoIFpublic String[] getJoinKeys()
FieldInfoIFgetJoinKeys in interface FieldInfoIFpublic String[] getManyKeys()
FieldInfoIFgetManyKeys in interface FieldInfoIFpublic Object load(AccessRegistrarIF registrar, TicketIF ticket, ResultSet rs, int rsindex, boolean direct) throws SQLException
load in interface FieldHandlerIFSQLExceptionpublic void bind(Object value, PreparedStatement stm, int stmt_index) throws SQLException
bind in interface FieldHandlerIFSQLExceptionpublic void retrieveFieldValues(Object value, List<Object> field_values)
retrieveFieldValues in interface FieldHandlerIFpublic void retrieveSQLValues(Object value, List<SQLValueIF> sql_values)
retrieveSQLValues in interface FieldHandlerIFpublic FieldInfoIF[] getFieldInfos()