eu.etaxonomy.cdm.io.berlinModel.out.mapper
Class DbSingleAttributeExportMapperBase<STATE extends DbExportStateBase<?>>

java.lang.Object
  extended by eu.etaxonomy.cdm.io.common.mapping.CdmAttributeMapperBase
      extended by eu.etaxonomy.cdm.io.common.mapping.CdmSingleAttributeMapperBase
          extended by eu.etaxonomy.cdm.io.berlinModel.out.mapper.DbSingleAttributeExportMapperBase<STATE>
All Implemented Interfaces:
IDbExportMapper<STATE>
Direct Known Subclasses:
DbAnnotationMapper, DbBooleanMapper, DbClobMapper, DbConstantMapper, DbDateMapper, DbExtensionMapper, DbMarkerMapper, DbNullMapper, DbObjectMapper, DbSequenceMapper, DbStringMapper, DbTimePeriodMapper, DbUserMapper, FactCategoryMapper, IdMapper, MethodMapper, RefDetailMapper

public abstract class DbSingleAttributeExportMapperBase<STATE extends DbExportStateBase<?>>
extends CdmSingleAttributeMapperBase
implements IDbExportMapper<STATE>

Version:
1.0
Author:
a.mueller

Field Summary
protected  boolean obligatory
           
 
Fields inherited from class eu.etaxonomy.cdm.io.common.mapping.CdmSingleAttributeMapperBase
defaultValue
 
Constructor Summary
protected DbSingleAttributeExportMapperBase(String cdmAttributeString, String dbAttributString, Object defaultValue)
           
protected DbSingleAttributeExportMapperBase(String cdmAttributeString, String dbAttributString, Object defaultValue, boolean obligatory)
           
 
Method Summary
protected  boolean checkSqlServerColumnExists()
           
protected  boolean doInvoke(CdmBase cdmBase)
           
protected  int getDbColumnIntegerInfo(String selectPart)
           
 int getIndex()
           
protected  int getPrecision()
           
 PreparedStatement getPreparedStatement()
           
protected abstract  int getSqlType()
           
 STATE getState()
           
 String getTableName()
           
protected  Object getValue(CdmBase cdmBase)
           
 void initialize(PreparedStatement stmt, IndexCounter index, STATE state, String tableName)
           
 boolean invoke(CdmBase cdmBase)
           
 String toString()
           
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.CdmSingleAttributeMapperBase
getDestinationAttribute, getDestinationAttributeList, getDestinationAttributes, getSourceAttribute, getSourceAttributeList, getSourceAttributes, getTypeClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

obligatory

protected boolean obligatory
Constructor Detail

DbSingleAttributeExportMapperBase

protected DbSingleAttributeExportMapperBase(String cdmAttributeString,
                                            String dbAttributString,
                                            Object defaultValue)
Parameters:
dbAttributString -
cdmAttributeString -

DbSingleAttributeExportMapperBase

protected DbSingleAttributeExportMapperBase(String cdmAttributeString,
                                            String dbAttributString,
                                            Object defaultValue,
                                            boolean obligatory)
Parameters:
dbAttributString -
cdmAttributeString -
Method Detail

initialize

public void initialize(PreparedStatement stmt,
                       IndexCounter index,
                       STATE state,
                       String tableName)
Specified by:
initialize in interface IDbExportMapper<STATE extends DbExportStateBase<?>>

invoke

public boolean invoke(CdmBase cdmBase)
               throws SQLException
Specified by:
invoke in interface IDbExportMapper<STATE extends DbExportStateBase<?>>
Throws:
SQLException

doInvoke

protected boolean doInvoke(CdmBase cdmBase)
                    throws SQLException
Throws:
SQLException

getValue

protected Object getValue(CdmBase cdmBase)

getSqlType

protected abstract int getSqlType()

getPreparedStatement

public PreparedStatement getPreparedStatement()
Returns:
the preparedStatement

getIndex

public int getIndex()
Returns:
the index

getState

public STATE getState()
Returns:
the state

getTableName

public String getTableName()
Returns:
the state

checkSqlServerColumnExists

protected boolean checkSqlServerColumnExists()

getPrecision

protected int getPrecision()

getDbColumnIntegerInfo

protected int getDbColumnIntegerInfo(String selectPart)

toString

public String toString()
Overrides:
toString in class CdmAttributeMapperBase


Copyright © 2007-2011 EDIT. All Rights Reserved.