public final class JDBCCMPFieldMetaData extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
CHECK_DIRTY_AFTER_GET_FALSE |
static byte |
CHECK_DIRTY_AFTER_GET_NOT_PRESENT |
static byte |
CHECK_DIRTY_AFTER_GET_TRUE |
Constructor and Description |
---|
JDBCCMPFieldMetaData(JDBCEntityMetaData entity)
This constructor is added especially for unknown primary key field
|
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,
ParsedCmpField parsedField,
JDBCCMPFieldMetaData defaultValues) |
JDBCCMPFieldMetaData(JDBCEntityMetaData entity,
ParsedCmpField parsedField,
JDBCCMPFieldMetaData defaultValues,
boolean primaryKeyMember,
boolean notNull,
boolean readOnly,
int readTimeOut,
boolean relationTableField) |
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) |
Modifier and Type | Method and Description |
---|---|
void |
addProperty(JDBCCMPFieldPropertyMetaData propertyMetaData) |
boolean |
equals(Object o)
Compares this JDBCCMPFieldMetaData against the specified object.
|
byte |
getCheckDirtyAfterGet() |
ClassLoader |
getClassLoader() |
String |
getColumnName()
Gets the column name the property should use or null if the
column name is not overridden.
|
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 overridden.
|
Field |
getPrimaryKeyField() |
List<JDBCCMPFieldPropertyMetaData> |
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 overridden.
|
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?
|
String |
toString()
Returns a string describing this JDBCCMPFieldMetaData.
|
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
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity)
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, String fieldName)
fieldName
- name of the field for which the meta data will be loadedentity
- entity on which this field is definedException
- if data in the entity is inconsistent with field typepublic JDBCCMPFieldMetaData(JDBCEntityMetaData entity, JDBCCMPFieldMetaData defaultValues)
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, ParsedCmpField parsedField, JDBCCMPFieldMetaData defaultValues, boolean primaryKeyMember, boolean notNull, boolean readOnly, int readTimeOut, boolean relationTableField)
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)
public JDBCCMPFieldMetaData(JDBCEntityMetaData entity, ParsedCmpField parsedField, JDBCCMPFieldMetaData defaultValues)
public JDBCEntityMetaData getEntity()
public String getFieldName()
public Class<?> getFieldType()
public String getColumnName()
public int getJDBCType()
public String getSQLType()
public List<JDBCCMPFieldPropertyMetaData> getPropertyOverrides()
public boolean isReadOnly()
public int getReadTimeOut()
public boolean isPrimaryKeyMember()
public boolean isNotNull()
public boolean isIndexed()
public boolean isUnknownPkField()
public boolean isAutoIncrement()
public boolean isRelationTableField()
public byte getCheckDirtyAfterGet()
public String getStateFactory()
public boolean equals(Object o)
public int hashCode()
public String toString()
public void addProperty(JDBCCMPFieldPropertyMetaData propertyMetaData)
public ClassLoader getClassLoader()
public Field getPrimaryKeyField()
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.