| java.lang.Object org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCCMPFieldMetaData
Constructor Summary | |
public | JDBCCMPFieldMetaData(JDBCEntityMetaData entity) | public | JDBCCMPFieldMetaData(JDBCEntityMetaData entity, String fieldName) Constructs cmp field meta data for a field on the specified entity with
the specified fieldName. | public | JDBCCMPFieldMetaData(JDBCEntityMetaData entity, JDBCCMPFieldMetaData defaultValues) | public | JDBCCMPFieldMetaData(JDBCEntityMetaData entity, Element element, JDBCCMPFieldMetaData defaultValues) Constructs cmp field meta data with the data contained in the cmp-field
xml element from a jbosscmp-jdbc xml file. | public | JDBCCMPFieldMetaData(JDBCEntityMetaData entity, Element element, JDBCCMPFieldMetaData defaultValues, boolean primaryKeyMember, boolean notNull, boolean readOnly, int readTimeOut, boolean relationTableField) Constructs cmp field meta data with the data contained in the cmp-field
xml element from a jbosscmp-jdbc xml file. | public | JDBCCMPFieldMetaData(JDBCEntityMetaData entity, JDBCCMPFieldMetaData defaultValues, String columnName, boolean primaryKeyMember, boolean notNull, boolean readOnly, int readTimeOut, boolean relationTableField) Constructs a foreign key or a relation table key field. | public | JDBCCMPFieldMetaData(JDBCEntityMetaData entity, String fieldName, Class fieldType, String columnName, int jdbcType, String sqlType) |
CHECK_DIRTY_AFTER_GET_FALSE | final public static byte CHECK_DIRTY_AFTER_GET_FALSE(Code) | | |
CHECK_DIRTY_AFTER_GET_NOT_PRESENT | final public static byte CHECK_DIRTY_AFTER_GET_NOT_PRESENT(Code) | | |
CHECK_DIRTY_AFTER_GET_TRUE | final public static byte CHECK_DIRTY_AFTER_GET_TRUE(Code) | | |
JDBCCMPFieldMetaData | public JDBCCMPFieldMetaData(JDBCEntityMetaData entity)(Code) | | This constructor is added especially for unknown primary key field
|
JDBCCMPFieldMetaData | public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, String fieldName) throws DeploymentException(Code) | | Constructs cmp field meta data for a field on the specified entity with
the specified fieldName.
Parameters: fieldName - name of the field for which the meta data will be loaded Parameters: entity - entity on which this field is defined throws: DeploymentException - if data in the entity is inconsistent with field type |
JDBCCMPFieldMetaData | public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, Element element, JDBCCMPFieldMetaData defaultValues) throws DeploymentException(Code) | | Constructs cmp field meta data with the data contained in the cmp-field
xml element from a jbosscmp-jdbc xml file. Optional values of the xml
element that are not present are instead loaded from the defalutValues
parameter.
Parameters: element - the xml Element which contains the metadata aboutthis field Parameters: defaultValues - the JDBCCMPFieldMetaData which contains the valuesfor optional elements of the element throws: DeploymentException - if the xml element is not semantically correct |
JDBCCMPFieldMetaData | public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, Element element, JDBCCMPFieldMetaData defaultValues, boolean primaryKeyMember, boolean notNull, boolean readOnly, int readTimeOut, boolean relationTableField) throws DeploymentException(Code) | | Constructs cmp field meta data with the data contained in the cmp-field
xml element from a jbosscmp-jdbc xml file. Optional values of the xml
element that are not present are instead loaded from the defalutValues
parameter.
This constructor form is used to create cmp field meta data for use as
foreign keys. The primaryKeyMember parameter is very important in this
context because a foreign key is not a primary key member but used a pk
member as the default value. If we did not have the primary key member
parameter this JDBCCMPFieldMetaData would get the value from the
defaultValues and be declared a memeber.
|
JDBCCMPFieldMetaData | public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, JDBCCMPFieldMetaData defaultValues, String columnName, boolean primaryKeyMember, boolean notNull, boolean readOnly, int readTimeOut, boolean relationTableField)(Code) | | Constructs a foreign key or a relation table key field.
|
JDBCCMPFieldMetaData | public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, String fieldName, Class fieldType, String columnName, int jdbcType, String sqlType) throws DeploymentException(Code) | | Constructs a field that is used as an optimistic lock
|
equals | public boolean equals(Object o)(Code) | | Compares this JDBCCMPFieldMetaData against the specified object. Returns
true if the objects are the same. Two JDBCCMPFieldMetaData are the same
if they both have the same name and are defined on the same entity.
Parameters: o - the reference object with which to compare true if this object is the same as the object argument; falseotherwise |
getCheckDirtyAfterGet | public byte getCheckDirtyAfterGet()(Code) | | |
getColumnName | public String getColumnName()(Code) | | Gets the column name the property should use or null if the
column name is not overriden.
the name to which this field is persisted or null if thecolumn name is not overriden |
getEntity | public JDBCEntityMetaData getEntity()(Code) | | Gets the entity on which this field is defined
the entity on which this field is defined |
getFieldName | public String getFieldName()(Code) | | Gets the name of the field.
the name of this field |
getFieldType | public Class getFieldType()(Code) | | Gets the java Class type of this field.
the Class type of this field |
getJDBCType | public int getJDBCType()(Code) | | Gets the JDBC type the property should use or Integer.MIN_VALUE
if not overriden.
the jdbc type of this field |
getPrimaryKeyField | public Field getPrimaryKeyField()(Code) | | Gets the Field of the primary key object which contains the value of
this field. Returns null, if this field is not a member of the primary
key, or if the primray key is single valued.
the Field of the primary key which contains thevalue of this field |
getPropertyOverrides | public List getPropertyOverrides()(Code) | | Gets the property overrides. Property overrides change the default
mapping of Dependent Value Object properties. If there are no property
overrides this method returns an empty list.
an unmodifiable list of the property overrides. |
getReadTimeOut | public int getReadTimeOut()(Code) | | Gets the length of time (ms) that a read valid or -1 if data must
always be reread from the database
the length of time that data read database is valid, or -1if data must always be reread from the database |
getSQLType | public String getSQLType()(Code) | | Gets the SQL type the property should use or null
if not overriden.
the sql data type string used in create table statements |
hashCode | public int hashCode()(Code) | | Returns a hashcode for this JDBCCMPFieldMetaData. The hashcode is computed
based on the hashCode of the declaring entity and the hashCode of the
fieldName
a hash code value for this object |
isAutoIncrement | public boolean isAutoIncrement()(Code) | | true if the key is auto incremented by the database |
isIndexed | public boolean isIndexed()(Code) | | Should an index for this field be generated?
Normally this should be false for primary key fields
But it seems there are databases that do not automatically
put indices on primary keys *sigh*
true if an index should be generated on this field |
isNotNull | public boolean isNotNull()(Code) | | Should this field allow null values?
true if this field will not allow a null value. |
isPrimaryKeyMember | public boolean isPrimaryKeyMember()(Code) | | Is this field one of the primary key fields?
true if this field is one of the primary key fields |
isReadOnly | public boolean isReadOnly()(Code) | | Is this field read only. A read only field will never be persisted
true if this field is read only |
isRelationTableField | public boolean isRelationTableField()(Code) | | |
isUnknownPkField | public boolean isUnknownPkField()(Code) | | Is this field an unknown primary key field?
true if the field is an unknown primary key field |
readCheckDirtyAfterGet | public static byte readCheckDirtyAfterGet(Element element) throws DeploymentException(Code) | | |
toString | public String toString()(Code) | | Returns a string describing this JDBCCMPFieldMetaData. The exact details
of the representation are unspecified and subject to change, but the
following may be regarded as typical:
"[JDBCCMPFieldMetaData: fieldName=name, [JDBCEntityMetaData:
entityName=UserEJB]]"
a string representation of the object |
|
|