public interface ITypeMapping
Modifier and Type | Interface and Description |
---|---|
static interface |
ITypeMapping.Descriptor
A descriptor which describes one type mapping class.
|
static interface |
ITypeMapping.Factory
A factory for typeMappings.
|
static interface |
ITypeMapping.Provider
A provider for type mapping information.
|
static interface |
ITypeMapping.Registry
A global (singleton) registry which collects all available type mappings which are either available in the CDO
core, as declared extensions, or registered manually.
|
Modifier and Type | Method and Description |
---|---|
void |
createDBField(IDBTable table)
Deprecated.
As of 4.2 use
createDBField(IDBTable, String) . |
void |
createDBField(IDBTable table,
String fieldName)
Creates the DBField and adds it to the given table.
|
DBType |
getDBType() |
org.eclipse.emf.ecore.EStructuralFeature |
getFeature() |
IDBField |
getField() |
Object |
readValue(ResultSet resultSet)
Read the value from a
ResultSet and convert it from the DB to the CDO representation. |
void |
readValueToRevision(ResultSet resultSet,
InternalCDORevision revision)
Read a value from a
ResultSet , convert it from the DB to the CDO representation and set it to the feature
of the revision. |
void |
setDBField(IDBTable table,
String fieldName)
Sets the DBField.
|
void |
setDBType(DBType dbType) |
void |
setDefaultValue(PreparedStatement stmt,
int index)
Set the feature's default value to the JDBC
IDBPreparedStatement using an appropriate setXxx
method. |
void |
setFeature(org.eclipse.emf.ecore.EStructuralFeature feature) |
void |
setMappingStrategy(IMappingStrategy mappingStrategy) |
void |
setValue(PreparedStatement stmt,
int index,
Object value)
Set the given value to the JDBC
IDBPreparedStatement using an appropriate setXxx method. |
void |
setValueFromRevision(PreparedStatement stmt,
int index,
InternalCDORevision value)
Set a value of the given revision to the JDBC
IDBPreparedStatement using an appropriate setXxx
method. |
org.eclipse.emf.ecore.EStructuralFeature getFeature()
IDBField getField()
DBType getDBType()
void setMappingStrategy(IMappingStrategy mappingStrategy)
void setFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
void setDBType(DBType dbType)
@Deprecated void createDBField(IDBTable table)
createDBField(IDBTable, String)
.void createDBField(IDBTable table, String fieldName)
table
- the table to add this field to.fieldName
- the name for the DBField.void setDBField(IDBTable table, String fieldName)
table
- the table to add this field to.fieldName
- the name for the DBField.void setValue(PreparedStatement stmt, int index, Object value) throws SQLException
IDBPreparedStatement
using an appropriate setXxx
method.stmt
- the prepared statement to set the valueindex
- the index to use for the setXxx
method.value
- the value to set.SQLException
- if the setXxx
throws it.void setDefaultValue(PreparedStatement stmt, int index) throws SQLException
IDBPreparedStatement
using an appropriate setXxx
method.stmt
- the prepared statement to set the valueindex
- the index to use for the setXxx
method.SQLException
- if the setXxx
throws it.void setValueFromRevision(PreparedStatement stmt, int index, InternalCDORevision value) throws SQLException
IDBPreparedStatement
using an appropriate setXxx
method. The feature from which the value is taken is determined by getFeature()
.stmt
- the prepared statement to set the valueindex
- the index to use for the setXxx
method.value
- the revision to get the value to set from.SQLException
- if the setXxx
throws it.Object readValue(ResultSet resultSet) throws SQLException
ResultSet
and convert it from the DB to the CDO representation. The resultSet field
to read from is determined automatically by the internal getField()
name.resultSet
- the result set to read fromSQLException
- if reading the value throws an SQLExceptionvoid readValueToRevision(ResultSet resultSet, InternalCDORevision revision) throws SQLException
ResultSet
, convert it from the DB to the CDO representation and set it to the feature
of the revision. The feature is determined by getFeature() The resultSet field to read from is determined
automatically by the internal getField()
name.resultSet
- the result set to read fromrevision
- the revision to which the value should be set.SQLException
- if reading the value throws an SQLExceptionCopyright (c) 2011-2014 Eike Stepper (Berlin, Germany) and others.