Klasse DelegatingTypeMapping

java.lang.Object
org.eclipse.emf.cdo.server.db.mapping.DelegatingTypeMapping
Alle implementierten Schnittstellen:
ITypeMapping

public abstract class DelegatingTypeMapping extends Object implements ITypeMapping
Seit:
4.10
Autor:
Eike Stepper
  • Konstruktordetails

    • DelegatingTypeMapping

      public DelegatingTypeMapping()
  • Methodendetails

    • getDelegate

      public abstract AbstractTypeMapping getDelegate()
    • getFeature

      public EStructuralFeature getFeature()
      Angegeben von:
      getFeature in Schnittstelle ITypeMapping
      Gibt zurück:
      The feature which is associated with this mapping.
    • getField

      public org.eclipse.net4j.db.ddl.IDBField getField()
      Angegeben von:
      getField in Schnittstelle ITypeMapping
      Gibt zurück:
      The db field which is associated with this mapping.
    • getDBType

      public org.eclipse.net4j.db.DBType getDBType()
      Angegeben von:
      getDBType in Schnittstelle ITypeMapping
      Gibt zurück:
      The db type which is associated with this mapping.
    • setMappingStrategy

      public void setMappingStrategy(IMappingStrategy mappingStrategy)
      Angegeben von:
      setMappingStrategy in Schnittstelle ITypeMapping
    • setFeature

      public void setFeature(EStructuralFeature feature)
      Angegeben von:
      setFeature in Schnittstelle ITypeMapping
    • setDBType

      public void setDBType(org.eclipse.net4j.db.DBType dbType)
      Angegeben von:
      setDBType in Schnittstelle ITypeMapping
    • createDBField

      public void createDBField(org.eclipse.net4j.db.ddl.IDBTable table)
      Angegeben von:
      createDBField in Schnittstelle ITypeMapping
    • createDBField

      public void createDBField(org.eclipse.net4j.db.ddl.IDBTable table, String fieldName)
      Beschreibung aus Schnittstelle kopiert: ITypeMapping
      Creates the DBField and adds it to the given table. The name of the DBField is explicitly determined by the corresponding parameter.
      Angegeben von:
      createDBField in Schnittstelle ITypeMapping
      Parameter:
      table - the table to add this field to.
      fieldName - the name for the DBField.
    • setDBField

      public void setDBField(org.eclipse.net4j.db.ddl.IDBTable table, String fieldName)
      Beschreibung aus Schnittstelle kopiert: ITypeMapping
      Sets the DBField. The name of the DBField is explicitly determined by the corresponding parameter.
      Angegeben von:
      setDBField in Schnittstelle ITypeMapping
      Parameter:
      table - the table to add this field to.
      fieldName - the name for the DBField.
    • setValue

      public void setValue(PreparedStatement stmt, int index, Object value) throws SQLException
      Beschreibung aus Schnittstelle kopiert: ITypeMapping
      Set the given value to the JDBC IDBPreparedStatement using an appropriate setXxx method.
      Angegeben von:
      setValue in Schnittstelle ITypeMapping
      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

      public void setDefaultValue(PreparedStatement stmt, int index) throws SQLException
      Beschreibung aus Schnittstelle kopiert: ITypeMapping
      Set the feature's default value to the JDBC IDBPreparedStatement using an appropriate setXxx method.
      Angegeben von:
      setDefaultValue in Schnittstelle ITypeMapping
      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.
    • setValueFromRevision

      public void setValueFromRevision(PreparedStatement stmt, int index, InternalCDORevision revision) throws SQLException
      Beschreibung aus Schnittstelle kopiert: ITypeMapping
      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 ITypeMapping.getFeature().
      Angegeben von:
      setValueFromRevision in Schnittstelle ITypeMapping
      Parameter:
      stmt - the prepared statement to set the value
      index - the index to use for the setXxx method.
      revision - the revision to get the value to set from.
      Löst aus:
      SQLException - if the setXxx throws it.
    • readValue

      public Object readValue(ResultSet resultSet) throws SQLException
      Beschreibung aus Schnittstelle kopiert: ITypeMapping
      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 ITypeMapping.getField() name.
      Angegeben von:
      readValue in Schnittstelle ITypeMapping
      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
    • readValueToRevision

      public void readValueToRevision(ResultSet resultSet, InternalCDORevision revision) throws SQLException
      Beschreibung aus Schnittstelle kopiert: ITypeMapping
      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 ITypeMapping.getField() name.
      Angegeben von:
      readValueToRevision in Schnittstelle ITypeMapping
      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
    • encode

      protected Object encode(Object value)
    • decode

      protected Object decode(Object value)