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
  • 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

      void setMappingStrategy(IMappingStrategy mappingStrategy)
      Seit:
      4.0
    • setFeature

      void setFeature(EStructuralFeature feature)
      Seit:
      4.0
    • setDBType

      void setDBType(org.eclipse.net4j.db.DBType dbType)
      Seit:
      4.0
    • createDBField

      @Deprecated void createDBField(org.eclipse.net4j.db.ddl.IDBTable table)
      Veraltet.
    • createDBField

      void createDBField(org.eclipse.net4j.db.ddl.IDBTable table, String fieldName)
      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

      void setDBField(org.eclipse.net4j.db.ddl.IDBTable table, String fieldName)
      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

      void setValue(PreparedStatement stmt, int index, Object value) throws SQLException
      Set the given value to the JDBC IDBPreparedStatement using an appropriate setXxx method.
      Parameter:
      stmt - the prepared statement to set the value
      index - the index to use for the setXxx method.
      value - the value to set.
      Löst aus:
      SQLException - if the setXxx throws it.
    • setDefaultValue

      void setDefaultValue(PreparedStatement stmt, int index) throws SQLException
      Set the feature's default value to the JDBC IDBPreparedStatement using an appropriate setXxx method.
      Parameter:
      stmt - the prepared statement to set the value
      index - the index to use for the setXxx method.
      Löst aus:
      SQLException - if the setXxx throws it.
      Seit:
      3.0
    • setValueFromRevision

      void setValueFromRevision(PreparedStatement stmt, int index, InternalCDORevision value) throws SQLException
      Set a value of the given revision to the JDBC IDBPreparedStatement using an appropriate setXxx method. The feature from which the value is taken is determined by getFeature().
      Parameter:
      stmt - the prepared statement to set the value
      index - the index to use for the setXxx method.
      value - the revision to get the value to set from.
      Löst aus:
      SQLException - if the setXxx throws it.
    • readValue

      Object readValue(ResultSet resultSet) throws SQLException
      Read the value from a 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.
      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

      void readValueToRevision(ResultSet resultSet, InternalCDORevision revision) throws SQLException
      Read a value from a 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.
      Parameter:
      resultSet - the result set to read from
      revision - the revision to which the value should be set.
      Löst aus:
      SQLException - if reading the value throws an SQLException
      Seit:
      3.0