Schnittstelle ITypeMapping
- Alle bekannten Implementierungsklassen:
AbstractTypeMapping,DelegatingTypeMapping
public interface ITypeMapping
Mapping of single values to and from the database.
- Seit:
- 2.0
- Autor:
- Eike Stepper, Stefan Winkler
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic interfaceA descriptor which describes one type mapping class.static interfaceA factory for typeMappings.static interfaceA provider for type mapping information.static interfaceA global (singleton) registry which collects all available type mappings which are either available in the CDO core, as declared extensions, or registered manually. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidcreateDBField(org.eclipse.net4j.db.ddl.IDBTable table) Veraltet.voidcreateDBField(org.eclipse.net4j.db.ddl.IDBTable table, String fieldName) Creates the DBField and adds it to the given table.org.eclipse.net4j.db.DBTypeorg.eclipse.net4j.db.ddl.IDBFieldgetField()Read the value from aResultSetand convert it from the DB to the CDO representation.voidreadValueToRevision(ResultSet resultSet, InternalCDORevision revision) Read a value from aResultSet, convert it from the DB to the CDO representation and set it to the feature of the revision.voidsetDBField(org.eclipse.net4j.db.ddl.IDBTable table, String fieldName) Sets the DBField.voidsetDBType(org.eclipse.net4j.db.DBType dbType) voidsetDefaultValue(PreparedStatement stmt, int index) Set the feature's default value to the JDBCIDBPreparedStatementusing an appropriatesetXxxmethod.voidsetFeature(EStructuralFeature feature) voidsetMappingStrategy(IMappingStrategy mappingStrategy) voidsetValue(PreparedStatement stmt, int index, Object value) Set the given value to the JDBCIDBPreparedStatementusing an appropriatesetXxxmethod.voidsetValueFromRevision(PreparedStatement stmt, int index, InternalCDORevision value) Set a value of the given revision to the JDBCIDBPreparedStatementusing an appropriatesetXxxmethod.
-
Methodendetails
-
getFeature
EStructuralFeature getFeature()- Gibt zurück:
- The feature which is associated with this mapping.
-
getField
org.eclipse.net4j.db.ddl.IDBField getField()- Gibt zurück:
- The db field which is associated with this mapping.
-
getDBType
org.eclipse.net4j.db.DBType getDBType()- Gibt zurück:
- The db type which is associated with this mapping.
- Seit:
- 3.0
-
setMappingStrategy
- Seit:
- 4.0
-
setFeature
- Seit:
- 4.0
-
setDBType
void setDBType(org.eclipse.net4j.db.DBType dbType) - Seit:
- 4.0
-
createDBField
Veraltet.As of 4.2 usecreateDBField(IDBTable, String). -
createDBField
Creates the DBField and adds it to the given table. The name of the DBField is explicitly determined by the corresponding parameter.- Parameter:
table- the table to add this field to.fieldName- the name for the DBField.
-
setDBField
Sets the DBField. The name of the DBField is explicitly determined by the corresponding parameter.- Parameter:
table- the table to add this field to.fieldName- the name for the DBField.- Seit:
- 3.0
-
setValue
Set the given value to the JDBCIDBPreparedStatementusing an appropriatesetXxxmethod.- Parameter:
stmt- the prepared statement to set the valueindex- the index to use for thesetXxxmethod.value- the value to set.- Löst aus:
SQLException- if thesetXxxthrows it.
-
setDefaultValue
Set the feature's default value to the JDBCIDBPreparedStatementusing an appropriatesetXxxmethod.- Parameter:
stmt- the prepared statement to set the valueindex- the index to use for thesetXxxmethod.- Löst aus:
SQLException- if thesetXxxthrows it.- Seit:
- 3.0
-
setValueFromRevision
void setValueFromRevision(PreparedStatement stmt, int index, InternalCDORevision value) throws SQLException Set a value of the given revision to the JDBCIDBPreparedStatementusing an appropriatesetXxxmethod. The feature from which the value is taken is determined bygetFeature().- Parameter:
stmt- the prepared statement to set the valueindex- the index to use for thesetXxxmethod.value- the revision to get the value to set from.- Löst aus:
SQLException- if thesetXxxthrows it.
-
readValue
Read the value from aResultSetand convert it from the DB to the CDO representation. The resultSet field to read from is determined automatically by the internalgetField()name.- Parameter:
resultSet- the result set to read from- Gibt zurück:
- the read value
- Löst aus:
SQLException- if reading the value throws an SQLException- Seit:
- 3.0
-
readValueToRevision
Read a value from aResultSet, 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 internalgetField()name.- Parameter:
resultSet- the result set to read fromrevision- the revision to which the value should be set.- Löst aus:
SQLException- if reading the value throws an SQLException- Seit:
- 3.0
-
createDBField(IDBTable, String).