Class AbstractSelectStatementCreator
- java.lang.Object
-
- de.akquinet.jbosscc.guttenbase.statements.AbstractStatementCreator
-
- de.akquinet.jbosscc.guttenbase.statements.AbstractSelectStatementCreator
-
- Direct Known Subclasses:
SelectStatementCreator
,SplitByColumnSelectCountStatementCreator
,SplitByColumnSelectMinMaxStatementCreator
,SplitByColumnSelectStatementCreator
public abstract class AbstractSelectStatementCreator extends AbstractStatementCreator
Create SELECT statement for copying data.© 2012-2034 akquinet tech@spree
- Author:
- M. Dahm
-
-
Field Summary
Fields Modifier and Type Field Description static String
FROM
-
Fields inherited from class de.akquinet.jbosscc.guttenbase.statements.AbstractStatementCreator
_columnMapper, _connectorId, _connectorRepository, LOG
-
-
Constructor Summary
Constructors Constructor Description AbstractSelectStatementCreator(ConnectorRepository connectorRepository, String connectorId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PreparedStatement
createMappedSelectStatement(Connection connection, TableMetaData sourceTableMetaData, String tableName, TableMetaData targetTableMetaData, String sourceConnectorId)
Create SELECT statement in the target table to retrieve data from the mapped columns.protected String
createOrderBy(TableMetaData tableMetaData)
Try to retrieve data in some deterministic orderPreparedStatement
createSelectStatement(Connection connection, String tableName, TableMetaData tableMetaData)
Create SELECT statement in the source table to retrieve data from the configured source columns.protected String
createWhereClause(TableMetaData tableMetaData)
-
Methods inherited from class de.akquinet.jbosscc.guttenbase.statements.AbstractStatementCreator
createColumnClause, getMappedTargetColumns
-
-
-
-
Field Detail
-
FROM
public static final String FROM
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractSelectStatementCreator
public AbstractSelectStatementCreator(ConnectorRepository connectorRepository, String connectorId)
-
-
Method Detail
-
createSelectStatement
public PreparedStatement createSelectStatement(Connection connection, String tableName, TableMetaData tableMetaData) throws SQLException
Create SELECT statement in the source table to retrieve data from the configured source columns.- Throws:
SQLException
-
createWhereClause
protected String createWhereClause(TableMetaData tableMetaData)
- Overrides:
createWhereClause
in classAbstractStatementCreator
-
createMappedSelectStatement
public PreparedStatement createMappedSelectStatement(Connection connection, TableMetaData sourceTableMetaData, String tableName, TableMetaData targetTableMetaData, String sourceConnectorId) throws SQLException
Create SELECT statement in the target table to retrieve data from the mapped columns. I.e., since the target table configuration may be different, the SELECT statement may be different. This is needed to check data compatibility with theCheckEqualTableDataTool
- Throws:
SQLException
-
createOrderBy
protected String createOrderBy(TableMetaData tableMetaData)
Try to retrieve data in some deterministic order
-
-