|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.common.impex.data.service.impl.DefaultDumpDataService
public class DefaultDumpDataService
Field Summary | |
---|---|
protected static int |
DEFAULT_DATABASE_ROW_COUNT
In the absence of a properties file holding detailed table statistics, this value is used. |
protected static org.slf4j.Logger |
logger
|
Constructor Summary | |
---|---|
DefaultDumpDataService()
|
Method Summary | |
---|---|
DumpTableResult |
dumpTable(DumpDataContext context,
DumpTableContext tableContext,
Connection conn)
|
protected DumpTableResult |
dumpTable(DumpDataContext dataContext,
DumpTableContext tableContext,
ResultSet rs)
|
List<DumpTableResult> |
dumpTables(DumpDataContext context,
Schema schema)
|
protected String |
getClob(Clob clob)
Convert a CLOB to a String |
protected String |
getColumnValueAsString(String dateFormat,
ResultSet rs,
int index,
Column column)
Use JDBC to extract the data held by the database into a java.lang.String suitable for dumping to disk. |
protected long |
getDumpedTableCount(List<DumpTableResult> results)
|
protected DumpProgress |
getDumpProgress(OutputStream out,
List<Column> columns,
List<List<String>> data,
DumpDataContext ddc,
DumpTableContext dtc,
TableTracker tracker)
|
protected long |
getDumpResultRows(List<DumpTableResult> results)
|
protected long |
getDumpResultSize(List<DumpTableResult> results)
|
protected List<Column> |
getOrderedColumnsFromMetadata(ResultSetMetaData md,
Table t)
Convert the JDBC metadata into a list of Column objects ordered in exactly the same way as the metadata |
protected List<String> |
getRowData(String dateFormat,
String tableName,
ResultSet rs,
List<Column> columns)
Convert the data from the row into String form |
protected String |
getSelectAllQuery(Table table)
Generate a SQL statement that selects all data from the table |
protected long |
getSize(List<String> data)
|
protected List<DumpTableBucket> |
getTableBuckets(List<DumpTableContext> tables,
DumpDataContext context,
List<DumpTableResult> results,
org.kuali.common.util.PercentCompleteInformer progressTracker)
|
protected long |
getTotalRowCount(List<DumpTableContext> contexts)
|
protected boolean |
isIntervalLimitExceeded(TableTracker tracker,
DumpDataContext context)
Return true if we have processed 50 rows or 50k of data, whichever comes first. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.slf4j.Logger logger
protected static final int DEFAULT_DATABASE_ROW_COUNT
Constructor Detail |
---|
public DefaultDumpDataService()
Method Detail |
---|
public DumpTableResult dumpTable(DumpDataContext context, DumpTableContext tableContext, Connection conn)
dumpTable
in interface DumpDataService
protected DumpTableResult dumpTable(DumpDataContext dataContext, DumpTableContext tableContext, ResultSet rs)
protected boolean isIntervalLimitExceeded(TableTracker tracker, DumpDataContext context)
protected List<String> getRowData(String dateFormat, String tableName, ResultSet rs, List<Column> columns) throws SQLException
SQLException
protected String getClob(Clob clob) throws SQLException
SQLException
protected String getColumnValueAsString(String dateFormat, ResultSet rs, int index, Column column) throws SQLException
java.lang.String
suitable for dumping to disk. The String returned by this method must be completely
disconnected from the ResultSet and database. Once this method returns, invoking a method on the underlying ResultSet or otherwise contacting the database to assist with
processing the data held in this row/column is forbidden.
SQLException
protected long getTotalRowCount(List<DumpTableContext> contexts)
public List<DumpTableResult> dumpTables(DumpDataContext context, Schema schema)
dumpTables
in interface DumpDataService
protected long getDumpedTableCount(List<DumpTableResult> results)
protected long getDumpResultRows(List<DumpTableResult> results)
protected long getDumpResultSize(List<DumpTableResult> results)
protected List<DumpTableBucket> getTableBuckets(List<DumpTableContext> tables, DumpDataContext context, List<DumpTableResult> results, org.kuali.common.util.PercentCompleteInformer progressTracker)
protected String getSelectAllQuery(Table table)
protected List<Column> getOrderedColumnsFromMetadata(ResultSetMetaData md, Table t) throws SQLException
Column
objects ordered in exactly the same way as the metadata
SQLException
protected DumpProgress getDumpProgress(OutputStream out, List<Column> columns, List<List<String>> data, DumpDataContext ddc, DumpTableContext dtc, TableTracker tracker)
protected long getSize(List<String> data)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |