public interface Column
extends org.datanucleus.store.schema.table.Column
Modifier and Type | Field and Description |
---|---|
static int |
WRAPPER_FUNCTION_INSERT |
static int |
WRAPPER_FUNCTION_SELECT |
static int |
WRAPPER_FUNCTION_UPDATE |
Modifier and Type | Method and Description |
---|---|
String |
applySelectFunction(String replacementValue)
Wraps the column name with a FUNCTION.
|
void |
checkDecimal()
Checks the column definition as a decimal.
|
void |
checkInteger()
Checks the column definition as an integer.
|
void |
checkPrimitive()
Checks the column definition as a primitive.
|
void |
checkString()
Checks the column definition as a string.
|
void |
copyConfigurationTo(Column col)
Copy the configuration of this field to another field
|
String |
getConstraints() |
DatastoreMapping |
getDatastoreMapping()
Accessor for the datastore mapping that this datastore field relates to.
|
DatastoreIdentifier |
getIdentifier()
Accessor for the identifier for this object.
|
JavaTypeMapping |
getJavaTypeMapping()
Accessor for the JavaTypeMapping for the field/property that owns this column.
|
org.datanucleus.metadata.AbstractMemberMetaData |
getMemberMetaData()
Accessor for the MetaData of the field/property that this is the datastore field for.
|
String |
getSQLDefinition()
Accessor for the SQL definition of this column.
|
String |
getStoredJavaType()
Accessor for the type of data stored in this field.
|
RDBMSStoreManager |
getStoreManager()
Accessor for the StoreManager for this column.
|
Table |
getTable()
Accessor for the table for this column
|
SQLTypeInfo |
getTypeInfo()
Accessor for the type info for this column.
|
String |
getWrapperFunction(int wrapperMode)
Gets the wrapper for parameters.
|
void |
initializeColumnInfoFromDatastore(RDBMSColumnInfo ci)
Initialize the default column value and auto increment
|
boolean |
isIdentity()
Accessor for the whether this column is an identity column.
|
boolean |
isUnlimitedLength()
Convenience method to check if the length is required to be unlimited (BLOB/CLOB).
|
Column |
setConstraints(String constraints)
Mutator for the constraints of the column.
|
void |
setDatastoreMapping(DatastoreMapping mapping)
Method to associate this datastore field with its mapping.
|
void |
setIdentifier(DatastoreIdentifier identifier)
Mutator for the identifier of the column.
|
Column |
setIdentity(boolean identity)
Mutator for whether we set this column as an identity column.
|
Column |
setTypeInfo(SQLTypeInfo typeInfo)
Mutator for the type information of the column.
|
void |
setWrapperFunction(String wrapperFunction,
int wrapperMode)
Sets a function to wrap the column.
|
void |
validate(RDBMSColumnInfo ci)
Method to validate the contents of the column.
|
getColumnMetaData, getColumnType, getDefaultValue, getJdbcType, getMemberColumnMapping, getName, getPosition, getTypeName, isDefaultable, isNullable, isPrimaryKey, isUnique, setColumnMetaData, setDefaultable, setJdbcType, setNullable, setPosition, setPrimaryKey, setTypeName, setUnique
static final int WRAPPER_FUNCTION_SELECT
static final int WRAPPER_FUNCTION_INSERT
static final int WRAPPER_FUNCTION_UPDATE
RDBMSStoreManager getStoreManager()
Table getTable()
getTable
in interface org.datanucleus.store.schema.table.Column
String getStoredJavaType()
void setIdentifier(DatastoreIdentifier identifier)
identifier
- The identifierDatastoreIdentifier getIdentifier()
Column setIdentity(boolean identity)
identity
- True if column is identityboolean isIdentity()
void setDatastoreMapping(DatastoreMapping mapping)
mapping
- The mapping for this datastore fieldDatastoreMapping getDatastoreMapping()
JavaTypeMapping getJavaTypeMapping()
String applySelectFunction(String replacementValue)
example: SQRT(?) generates: SQRT(columnName)
replacementValue
- the replacement to ?. Probably it's a column name, that may be fully qualified name or notvoid copyConfigurationTo(Column col)
col
- the column to copyorg.datanucleus.metadata.AbstractMemberMetaData getMemberMetaData()
boolean isUnlimitedLength()
Column setTypeInfo(SQLTypeInfo typeInfo)
typeInfo
- The type infoSQLTypeInfo getTypeInfo()
String getSQLDefinition()
void initializeColumnInfoFromDatastore(RDBMSColumnInfo ci)
ci
- The column informationvoid validate(RDBMSColumnInfo ci)
ci
- The column information taken from the databaseColumn setConstraints(String constraints)
constraints
- The constraintsString getConstraints()
void checkPrimitive() throws ColumnDefinitionException
ColumnDefinitionException
- if an error occursvoid checkInteger() throws ColumnDefinitionException
ColumnDefinitionException
- if an error occursvoid checkDecimal() throws ColumnDefinitionException
ColumnDefinitionException
- if an error occursvoid checkString() throws ColumnDefinitionException
ColumnDefinitionException
- if an error occursvoid setWrapperFunction(String wrapperFunction, int wrapperMode)
SQRT(?) generates: SQRT(COLUMN)
wrapperFunction
- The wrapperFunction to set.wrapperMode
- whether select, insert or updateString getWrapperFunction(int wrapperMode)
wrapperMode
- whether select, insert or updateCopyright © 2017. All rights reserved.