org.seasar.extension.jdbc.gen.internal.version
クラス DdlVersionIncrementerImpl

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

public class DdlVersionIncrementerImpl
extends java.lang.Object
implements DdlVersionIncrementer

DdlVersionIncrementerの実装クラスです。

作成者:
taedium

入れ子のクラスの概要
protected static class DdlVersionIncrementerImpl.PathFilenameFilter
          除外対象のパスで始まるファイル名をフィルタします。
 
インタフェース org.seasar.extension.jdbc.gen.version.DdlVersionIncrementer から継承された入れ子のクラス/インタフェース
DdlVersionIncrementer.Callback
 
フィールドの概要
protected  java.util.List<java.lang.String> createDirNameList
          createディレクトリ名のリスト
protected  javax.sql.DataSource dataSource
          データソース
protected  DdlVersionDirectoryTree ddlVersionDirectoryTree
          DDLのバージョンを管理するディレクトリ
protected  GenDialect dialect
          方言
protected  java.util.List<java.lang.String> dropDirNameList
          dropディレクトリ名のリスト
protected  GenDdlListener genDdlListener
          バージョンディレクトリやファイルが生成されたイベントを受け取るためのリスナー
protected static Logger logger
          ロガー
protected  java.util.List<DdlVersionDirectory> recoveryDirList
          リカバリ対象のディレクトリのリスト
 
コンストラクタの概要
DdlVersionIncrementerImpl(DdlVersionDirectoryTree ddlVersionDirectoryTree, GenDdlListener genDdlListener, GenDialect dialect, javax.sql.DataSource dataSource, java.util.List<java.lang.String> createDirNameList, java.util.List<java.lang.String> dropDirNameList)
          インスタンスを構築します。
 
メソッドの概要
protected  void copyDir(ManagedFile srcDir, ManagedFile destDir, java.io.FilenameFilter filter)
          ディレクトリをコピーします。
protected  void copyDirectory(DdlVersionDirectory src, DdlVersionDirectory dest)
          バージョンディレクトリをコピーします。
protected  void copyDropDirectory(DdlVersionDirectory src, DdlVersionDirectory dest)
          dropディレクトリを作成します。
protected  void deleteDir(ManagedFile dir)
          ディレクトリを削除します。
protected  DdlVersionDirectory getCurrentDdlVersionDirectory()
          現バージョンに対応するディレクトリを返します。
protected  DdlVersionDirectory getNextDdlVersionDirectory(DdlVersionDirectory currentVersionDir)
          次バージョンに対応するディレクトリを返します。
 void increment(java.lang.String comment, DdlVersionIncrementer.Callback callback)
          バージョンを増分します。
protected  void incrementVersionNo(java.lang.String comment)
          バージョン番号を増分します。
protected  void makeDirectory(DdlVersionDirectory versionDir)
          バージョンディレクトリを作成します。
protected  void recover()
          作成したバージョンディレクトリを削除します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

logger

protected static Logger logger
ロガー


ddlVersionDirectoryTree

protected DdlVersionDirectoryTree ddlVersionDirectoryTree
DDLのバージョンを管理するディレクトリ


genDdlListener

protected GenDdlListener genDdlListener
バージョンディレクトリやファイルが生成されたイベントを受け取るためのリスナー


dialect

protected GenDialect dialect
方言


dataSource

protected javax.sql.DataSource dataSource
データソース


createDirNameList

protected java.util.List<java.lang.String> createDirNameList
createディレクトリ名のリスト


dropDirNameList

protected java.util.List<java.lang.String> dropDirNameList
dropディレクトリ名のリスト


recoveryDirList

protected java.util.List<DdlVersionDirectory> recoveryDirList
リカバリ対象のディレクトリのリスト

コンストラクタの詳細

DdlVersionIncrementerImpl

public DdlVersionIncrementerImpl(DdlVersionDirectoryTree ddlVersionDirectoryTree,
                                 GenDdlListener genDdlListener,
                                 GenDialect dialect,
                                 javax.sql.DataSource dataSource,
                                 java.util.List<java.lang.String> createDirNameList,
                                 java.util.List<java.lang.String> dropDirNameList)
インスタンスを構築します。

パラメータ:
ddlVersionDirectoryTree - DDLのバージョンを管理するディレクトリ
genDdlListener - バージョンディレクトリやファイルが生成されたイベントを受け取るためのリスナー
dialect - 方言
dataSource - データソース
createDirNameList - コピー非対象のcreateディレクトリ名のリスト
dropDirNameList - コピー非対象のdropディレクトリ名のリスト
メソッドの詳細

increment

public void increment(java.lang.String comment,
                      DdlVersionIncrementer.Callback callback)
インタフェース DdlVersionIncrementer の記述:
バージョンを増分します。

定義:
インタフェース DdlVersionIncrementer 内の increment
パラメータ:
comment - バージョンを増分する理由を示すコメント
callback - コールバック

getCurrentDdlVersionDirectory

protected DdlVersionDirectory getCurrentDdlVersionDirectory()
現バージョンに対応するディレクトリを返します。

戻り値:
現バージョンに対応するディレクトリ

getNextDdlVersionDirectory

protected DdlVersionDirectory getNextDdlVersionDirectory(DdlVersionDirectory currentVersionDir)
次バージョンに対応するディレクトリを返します。

パラメータ:
currentVersionDir - 現バージョンに対応するディレクトリ
戻り値:
次バージョンに対応するディレクトリ

makeDirectory

protected void makeDirectory(DdlVersionDirectory versionDir)
バージョンディレクトリを作成します。

パラメータ:
versionDir - バージョンディレクトリ

copyDirectory

protected void copyDirectory(DdlVersionDirectory src,
                             DdlVersionDirectory dest)
バージョンディレクトリをコピーします。

パラメータ:
src - コピー元のバージョンディレクトリ
dest - コピー先のバージョンディレクトリ

copyDropDirectory

protected void copyDropDirectory(DdlVersionDirectory src,
                                 DdlVersionDirectory dest)
dropディレクトリを作成します。

パラメータ:
src - コピー元のバージョンディレクトリ
dest - コピー先のバージョンディレクトリ

copyDir

protected void copyDir(ManagedFile srcDir,
                       ManagedFile destDir,
                       java.io.FilenameFilter filter)
ディレクトリをコピーします。

パラメータ:
srcDir - コピー元のディレクトリ
destDir - コピー先のディレクトリ
filter - フィルタ

recover

protected void recover()
作成したバージョンディレクトリを削除します。


deleteDir

protected void deleteDir(ManagedFile dir)
ディレクトリを削除します。

パラメータ:
dir - ディレクトリ

incrementVersionNo

protected void incrementVersionNo(java.lang.String comment)
バージョン番号を増分します。

パラメータ:
comment - バージョンを増分する理由を示すコメント


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