org.seasar.extension.jdbc.gen.internal.model
クラス TableModelFactoryImpl

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

public class TableModelFactoryImpl
extends java.lang.Object
implements TableModelFactory

TableModelFactoryの実装クラスです。

作成者:
taedium

フィールドの概要
protected  javax.sql.DataSource dataSource
          データソース
protected  char delimiter
          SQLステートメントの区切り文字
protected  GenDialect dialect
          方言
protected  GeneratedModelSupport generatedModelSupport
          生成モデルのサポート
protected static Logger logger
          ロガー
protected  SqlIdentifierCaseType sqlIdentifierCaseType
          SQLの識別子の大文字小文字を変換するかどうかを示す列挙型
protected  SqlKeywordCaseType sqlKeywordCaseType
          SQLのキーワードの大文字小文字を変換するかどうかを示す列挙型
protected  java.lang.String tableOption
          テーブルオプション、存在しない場合はnull
protected  boolean useComment
          コメントを使用する場合true
 
コンストラクタの概要
TableModelFactoryImpl(GenDialect dialect, javax.sql.DataSource dataSource, SqlIdentifierCaseType sqlIdentifierCaseType, SqlKeywordCaseType sqlKeywordCaseType, char delimiter, java.lang.String tableOption, boolean useComment)
           
 
メソッドの概要
protected  void doColumnModel(TableModel tableModel, TableDesc tableDesc)
          カラムモデルを処理します。
protected  void doForeignKeyModel(TableModel tableModel, TableDesc tableDesc)
          外部キーモデルを処理します。
protected  void doGeneratedInfo(TableModel tableModel, TableDesc tableDesc)
          生成情報を処理します。
protected  void doPrimaryKeyModel(TableModel tableModel, TableDesc tableDesc)
          主キーモデルを処理します。
protected  void doSequenceModel(TableModel tableModel, TableDesc tableDesc)
          シーケンスモデルを処理します。
protected  void doUniqueKeyModel(TableModel tableModel, TableDesc tableDesc)
          一意キーモデルを処理します。
protected  java.lang.Long getNextValue(java.lang.String sequenceName, int allocationSize)
          シーケンスの次の値を返します。
 TableModel getTableModel(TableDesc tableDesc)
          テーブルモデルを返します。
protected  java.lang.String identifier(java.lang.String identifier)
          識別子の大文字小文字を変換します。
protected  java.lang.String keyword(java.lang.String keyword)
          キーワードの大文字小文字を変換します。
protected  java.lang.String normalizeComment(java.lang.String comment)
          コメントを正規化します。
protected  java.lang.String toActionName(ReferentialActionType actionType)
          参照動作の名前に変換します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

logger

protected static Logger logger
ロガー


dialect

protected GenDialect dialect
方言


dataSource

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


delimiter

protected char delimiter
SQLステートメントの区切り文字


tableOption

protected java.lang.String tableOption
テーブルオプション、存在しない場合はnull


sqlIdentifierCaseType

protected SqlIdentifierCaseType sqlIdentifierCaseType
SQLの識別子の大文字小文字を変換するかどうかを示す列挙型


sqlKeywordCaseType

protected SqlKeywordCaseType sqlKeywordCaseType
SQLのキーワードの大文字小文字を変換するかどうかを示す列挙型


useComment

protected boolean useComment
コメントを使用する場合true


generatedModelSupport

protected GeneratedModelSupport generatedModelSupport
生成モデルのサポート

コンストラクタの詳細

TableModelFactoryImpl

public TableModelFactoryImpl(GenDialect dialect,
                             javax.sql.DataSource dataSource,
                             SqlIdentifierCaseType sqlIdentifierCaseType,
                             SqlKeywordCaseType sqlKeywordCaseType,
                             char delimiter,
                             java.lang.String tableOption,
                             boolean useComment)
パラメータ:
dialect - 方言
dataSource - データソース
sqlIdentifierCaseType - SQLの識別子の大文字小文字を変換するかどうかを示す列挙型
sqlKeywordCaseType - SQLのキーワードの大文字小文字を変換するかどうかを示す列挙型
delimiter - 区切り文字
tableOption - テーブルオプション、存在しない場合はnull
useComment - コメントを使用する場合true
メソッドの詳細

getTableModel

public TableModel getTableModel(TableDesc tableDesc)
インタフェース TableModelFactory の記述:
テーブルモデルを返します。

定義:
インタフェース TableModelFactory 内の getTableModel
パラメータ:
tableDesc - テーブル記述
戻り値:
テーブルモデル

doPrimaryKeyModel

protected void doPrimaryKeyModel(TableModel tableModel,
                                 TableDesc tableDesc)
主キーモデルを処理します。

パラメータ:
tableModel - テーブルモデル
tableDesc - テーブル記述

doUniqueKeyModel

protected void doUniqueKeyModel(TableModel tableModel,
                                TableDesc tableDesc)
一意キーモデルを処理します。

パラメータ:
tableModel - テーブルモデル
tableDesc - テーブル記述

doForeignKeyModel

protected void doForeignKeyModel(TableModel tableModel,
                                 TableDesc tableDesc)
外部キーモデルを処理します。

パラメータ:
tableModel - テーブルモデル
tableDesc - テーブル記述

toActionName

protected java.lang.String toActionName(ReferentialActionType actionType)
参照動作の名前に変換します。

パラメータ:
actionType -
戻り値:
参照動作の名前

doSequenceModel

protected void doSequenceModel(TableModel tableModel,
                               TableDesc tableDesc)
シーケンスモデルを処理します。

パラメータ:
tableModel - テーブルモデル
tableDesc - テーブル記述

doColumnModel

protected void doColumnModel(TableModel tableModel,
                             TableDesc tableDesc)
カラムモデルを処理します。

パラメータ:
tableModel - テーブルモデル
tableDesc - テーブル記述

getNextValue

protected java.lang.Long getNextValue(java.lang.String sequenceName,
                                      int allocationSize)
シーケンスの次の値を返します。

パラメータ:
sequenceName - シーケンス名
allocationSize - 割り当てサイズ
戻り値:
シーケンスの次の値、シーケンスが存在しない場合はnull

keyword

protected java.lang.String keyword(java.lang.String keyword)
キーワードの大文字小文字を変換します。

パラメータ:
keyword - キーワード
戻り値:
変換された文字列

identifier

protected java.lang.String identifier(java.lang.String identifier)
識別子の大文字小文字を変換します。

パラメータ:
identifier - 識別子
戻り値:
変換された文字列

normalizeComment

protected java.lang.String normalizeComment(java.lang.String comment)
コメントを正規化します。

パラメータ:
comment - コメント
戻り値:
正規化されたコメント

doGeneratedInfo

protected void doGeneratedInfo(TableModel tableModel,
                               TableDesc tableDesc)
生成情報を処理します。

パラメータ:
tableModel - テーブルモデル
tableDesc - テーブル記述


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