org.seasar.extension.jdbc.gen.internal.data
クラス DumperImpl

java.lang.Object
  上位を拡張 org.seasar.extension.jdbc.gen.internal.data.DumperImpl
すべての実装されたインタフェース:
Dumper

public class DumperImpl
extends java.lang.Object
implements Dumper

Dumperの実装クラスです。

作成者:
taedium

フィールドの概要
protected  char delimiter
          区切り文字
protected  GenDialect dialect
          方言
protected  java.lang.String dumpFileEncoding
          ダンプファイルのエンコーディング
protected  java.lang.String extension
          拡張子
protected static Logger logger
          ロガー
 
コンストラクタの概要
DumperImpl(GenDialect dialect, java.lang.String dumpFileEncoding)
          インスタンスを構築します。
 
メソッドの概要
protected  java.lang.String buildSql(TableDesc tableDesc)
          SQLを組み立てます。
protected  java.lang.String buildSqlWithSort(TableDesc tableDesc)
          ORDER BY句をもつSQLを組み立てます。
protected  DumpFileWriter createDumpFileWriter(java.io.File dumpFile, TableDesc tableDesc)
          ダンプファイルのライタを返します。
 void dump(SqlExecutionContext sqlExecutionContext, DatabaseDesc databaseDesc, java.io.File dumpDir)
          ダンプします。
protected  void dumpRows(java.sql.Statement statement, DumpFileWriter writer, java.lang.String sql)
          データをダンプします。
protected  void dumpTable(SqlExecutionContext sqlExecutionContext, TableDesc tableDesc, DumpFileWriter writer)
          テーブルのデータをダンプします。
protected  boolean dumpTableWithSort(SqlExecutionContext sqlExecutionContext, TableDesc tableDesc, DumpFileWriter writer)
          テーブルのデータをソートしてダンプします。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

logger

protected static Logger logger
ロガー


dumpFileEncoding

protected java.lang.String dumpFileEncoding
ダンプファイルのエンコーディング


dialect

protected GenDialect dialect
方言


extension

protected java.lang.String extension
拡張子


delimiter

protected char delimiter
区切り文字

コンストラクタの詳細

DumperImpl

public DumperImpl(GenDialect dialect,
                  java.lang.String dumpFileEncoding)
インスタンスを構築します。

パラメータ:
dialect - 方言
dumpFileEncoding - ダンプファイルのエンコーディング
メソッドの詳細

dump

public void dump(SqlExecutionContext sqlExecutionContext,
                 DatabaseDesc databaseDesc,
                 java.io.File dumpDir)
インタフェース Dumper の記述:
ダンプします。

定義:
インタフェース Dumper 内の dump
パラメータ:
sqlExecutionContext - SQL実行コンテキスト
databaseDesc - データベース記述
dumpDir - ダンプ先のディレクトリ

dumpTableWithSort

protected boolean dumpTableWithSort(SqlExecutionContext sqlExecutionContext,
                                    TableDesc tableDesc,
                                    DumpFileWriter writer)
テーブルのデータをソートしてダンプします。

パラメータ:
sqlExecutionContext - SQL実行コンテキスト
tableDesc - テーブル記述
writer - ライタ
戻り値:
ソート用のカラムが存在しない場合true

dumpTable

protected void dumpTable(SqlExecutionContext sqlExecutionContext,
                         TableDesc tableDesc,
                         DumpFileWriter writer)
テーブルのデータをダンプします。

パラメータ:
sqlExecutionContext - SQL実行コンテキスト
tableDesc - テーブル記述
writer - ライタ

dumpRows

protected void dumpRows(java.sql.Statement statement,
                        DumpFileWriter writer,
                        java.lang.String sql)
                 throws java.sql.SQLException
データをダンプします。

パラメータ:
statement - SQLの文
writer - ライタ
sql - SQL
例外:
java.sql.SQLException - SQLに関する例外が発生した場合

buildSqlWithSort

protected java.lang.String buildSqlWithSort(TableDesc tableDesc)
ORDER BY句をもつSQLを組み立てます。

パラメータ:
tableDesc - テーブル記述
戻り値:
SQL

buildSql

protected java.lang.String buildSql(TableDesc tableDesc)
SQLを組み立てます。

パラメータ:
tableDesc - テーブル記述
戻り値:
SQL

createDumpFileWriter

protected DumpFileWriter createDumpFileWriter(java.io.File dumpFile,
                                              TableDesc tableDesc)
ダンプファイルのライタを返します。

パラメータ:
dumpFile - ダンプファイル
tableDesc - テーブル記述
戻り値:
ダンプファイルのライタ


Copyright © 2004-2014 The Seasar Foundation. All Rights Reserved.