|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCCMPFieldMetaData
Imutable class which holds all the information jbosscmp-jdbc needs to know about a CMP field It loads its data from standardjbosscmp-jdbc.xml and jbosscmp-jdbc.xml
Field Summary | |
static byte |
CHECK_DIRTY_AFTER_GET_FALSE
|
static byte |
CHECK_DIRTY_AFTER_GET_NOT_PRESENT
|
static byte |
CHECK_DIRTY_AFTER_GET_TRUE
|
Constructor Summary | |
JDBCCMPFieldMetaData(JDBCEntityMetaData entity)
This constructor is added especially for unknown primary key field |
|
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. |
|
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. |
|
JDBCCMPFieldMetaData(JDBCEntityMetaData entity,
JDBCCMPFieldMetaData defaultValues)
|
|
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. |
|
JDBCCMPFieldMetaData(JDBCEntityMetaData entity,
String fieldName)
Constructs cmp field meta data for a field on the specified entity with the specified fieldName. |
|
JDBCCMPFieldMetaData(JDBCEntityMetaData entity,
String fieldName,
Class fieldType,
String columnName,
int jdbcType,
String sqlType)
Constructs a field that is used as an optimistic lock |
Method Summary | |
boolean |
equals(Object o)
Compares this JDBCCMPFieldMetaData against the specified object. |
byte |
getCheckDirtyAfterGet()
|
String |
getColumnName()
Gets the column name the property should use or null if the column name is not overriden. |
JDBCEntityMetaData |
getEntity()
Gets the entity on which this field is defined |
String |
getFieldName()
Gets the name of the field. |
Class |
getFieldType()
Gets the java Class type of this field. |
int |
getJDBCType()
Gets the JDBC type the property should use or Integer.MIN_VALUE if not overriden. |
Field |
getPrimaryKeyField()
Gets the Field of the primary key object which contains the value of this field. |
List |
getPropertyOverrides()
Gets the property overrides. |
int |
getReadTimeOut()
Gets the length of time (ms) that a read valid or -1 if data must always be reread from the database |
String |
getSQLType()
Gets the SQL type the property should use or null if not overriden. |
String |
getStateFactory()
|
int |
hashCode()
Returns a hashcode for this JDBCCMPFieldMetaData. |
boolean |
isAutoIncrement()
|
boolean |
isIndexed()
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* |
boolean |
isNotNull()
Should this field allow null values? |
boolean |
isPrimaryKeyMember()
Is this field one of the primary key fields? |
boolean |
isReadOnly()
Is this field read only. |
boolean |
isRelationTableField()
|
boolean |
isUnknownPkField()
Is this field an unknown primary key field? |
static byte |
readCheckDirtyAfterGet(Element element)
|
String |
toString()
Returns a string describing this JDBCCMPFieldMetaData. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte CHECK_DIRTY_AFTER_GET_TRUE
public static final byte CHECK_DIRTY_AFTER_GET_FALSE
public static final byte CHECK_DIRTY_AFTER_GET_NOT_PRESENT
Constructor Detail |
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity)
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, String fieldName) throws org.jboss.deployment.DeploymentException
fieldName
- name of the field for which the meta data will be loadedentity
- entity on which this field is defined
org.jboss.deployment.DeploymentException
- if data in the entity is inconsistent with field typepublic JDBCCMPFieldMetaData(JDBCEntityMetaData entity, JDBCCMPFieldMetaData defaultValues)
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, Element element, JDBCCMPFieldMetaData defaultValues) throws org.jboss.deployment.DeploymentException
element
- the xml Element which contains the metadata about
this fielddefaultValues
- the JDBCCMPFieldMetaData which contains the values
for optional elements of the element
org.jboss.deployment.DeploymentException
- if the xml element is not semantically correctpublic JDBCCMPFieldMetaData(JDBCEntityMetaData entity, Element element, JDBCCMPFieldMetaData defaultValues, boolean primaryKeyMember, boolean notNull, boolean readOnly, int readTimeOut, boolean relationTableField) throws org.jboss.deployment.DeploymentException
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, JDBCCMPFieldMetaData defaultValues, String columnName, boolean primaryKeyMember, boolean notNull, boolean readOnly, int readTimeOut, boolean relationTableField)
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, String fieldName, Class fieldType, String columnName, int jdbcType, String sqlType) throws org.jboss.deployment.DeploymentException
Method Detail |
public static byte readCheckDirtyAfterGet(Element element) throws org.jboss.deployment.DeploymentException
org.jboss.deployment.DeploymentException
public JDBCEntityMetaData getEntity()
public String getFieldName()
public Class getFieldType()
public String getColumnName()
public int getJDBCType()
public String getSQLType()
public List getPropertyOverrides()
public boolean isReadOnly()
public int getReadTimeOut()
public boolean isPrimaryKeyMember()
public boolean isNotNull()
public boolean isIndexed()
public Field getPrimaryKeyField()
public boolean isUnknownPkField()
public boolean isAutoIncrement()
public boolean isRelationTableField()
public byte getCheckDirtyAfterGet()
public String getStateFactory()
public boolean equals(Object o)
o
- the reference object with which to compare
public int hashCode()
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |