org.seasar.doma.extension.gen
クラス GlobalFactory

java.lang.Object
  上位を拡張 org.seasar.doma.extension.gen.GlobalFactory

public class GlobalFactory
extends Object

グローバルなファクトリです。

作成者:
taedium

コンストラクタの概要
GlobalFactory()
           
 
メソッドの概要
 DaoDelegateDescFactory createDaoDelegateDescFactory()
          Daoデリゲート記述のファクトリを作成します。
 DaoDescFactory createDaoDescFactory(String packageName, String suffix, String configClassName)
          Dao記述のファクトリを作成します。
 DataSource createDataSource(Driver driver, String user, String password, String url)
          データソースを作成します。
 EntityDescFactory createEntityDescFactory(String packageName, Class<?> superclass, EntityPropertyDescFactory entityPropertyDescFactory, NamingType namingType, String originalStatesPropertyName, boolean showCatalogName, boolean showSchemaName, boolean showTableName, boolean showDbComment, boolean useAccessor, boolean useListener)
          エンティティ記述のファクトリを作成します。
 EntityListenerDescFactory createEntityListenerDescFactory(String packageName, String superclassName)
           
 EntityPropertyClassNameResolver createEntityPropertyClassNameResolver(File propertyFile)
          エンティティプロパティのクラス名リゾルバを作成します。
 EntityPropertyDescFactory createEntityPropertyDescFactory(GenDialect dialect, EntityPropertyClassNameResolver propertyClassNameResolver, String versionColumnNamePattern, GenerationType generationType, Long initialValue, Long allocationSize, boolean showColumnName)
          エンティティプロパティ記述のファクトリを作成します。
 Generator createGenerator(String templateEncoding, File templatePrimaryDir)
          ジェネレータを作成します。
 SqlDescFactory createSqlDescFactory(File templatePrimaryDir, GenDialect dialect)
          SQL記述ファクトリを作成します。
 SqlTestDescFactory createSqlTestDescFactory(String sqlTestClassName, boolean abstrct, String dialectClassName, String driverClassName, String url, String user, String password, Set<File> sqlFiles)
          SQLテスト記述ファクトリを作成します。
 TableMetaReader createTableMetaReader(GenDialect dialect, DataSource dataSource, String schemaName, String tableNamePattern, String ignoredTableNamePattern, List<String> tableTypes)
          データソースメタデータのファクトリを作成します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

GlobalFactory

public GlobalFactory()
メソッドの詳細

createDataSource

public DataSource createDataSource(Driver driver,
                                   String user,
                                   String password,
                                   String url)
データソースを作成します。

パラメータ:
driver - JDBCドライバー
user - ユーザー
password - パスワード
url - 接続URL
戻り値:
データソース

createTableMetaReader

public TableMetaReader createTableMetaReader(GenDialect dialect,
                                             DataSource dataSource,
                                             String schemaName,
                                             String tableNamePattern,
                                             String ignoredTableNamePattern,
                                             List<String> tableTypes)
データソースメタデータのファクトリを作成します。

パラメータ:
dialect - 方言
dataSource - データソース
schemaName - スキーマ名
tableNamePattern - 読み取り対象とするテーブル名のパターン
ignoredTableNamePattern - 読み取り非対象とするテーブル名のパターン
tableTypes - テーブルの型のリスト
戻り値:
データソースメタデータのファクトリ

createEntityPropertyDescFactory

public EntityPropertyDescFactory createEntityPropertyDescFactory(GenDialect dialect,
                                                                 EntityPropertyClassNameResolver propertyClassNameResolver,
                                                                 String versionColumnNamePattern,
                                                                 GenerationType generationType,
                                                                 Long initialValue,
                                                                 Long allocationSize,
                                                                 boolean showColumnName)
エンティティプロパティ記述のファクトリを作成します。

パラメータ:
dialect - 方言
propertyClassNameResolver - プロパティクラス名のリゾルバ
versionColumnNamePattern - バージョンカラム名パターン
generationType - 識別子を生成する方法
initialValue - 識別子の初期値
allocationSize - 識別子の割り当てサイズ
showColumnName - カラム名を表示する場合 true
戻り値:
エンティティプロパティ記述のファクトリ

createEntityDescFactory

public EntityDescFactory createEntityDescFactory(String packageName,
                                                 Class<?> superclass,
                                                 EntityPropertyDescFactory entityPropertyDescFactory,
                                                 NamingType namingType,
                                                 String originalStatesPropertyName,
                                                 boolean showCatalogName,
                                                 boolean showSchemaName,
                                                 boolean showTableName,
                                                 boolean showDbComment,
                                                 boolean useAccessor,
                                                 boolean useListener)
エンティティ記述のファクトリを作成します。

パラメータ:
packageName - パッケージ名
superclass - スーパークラス
entityPropertyDescFactory - エンティティプロパティ記述のファクトリ
namingType - ネーミング規約
showCatalogName - カタログ名を表示する場合 true
showSchemaName - スキーマ名を表示する場合 true
showTableName - テーブル名を表示する場合 true
showDbComment - データベースのコメントを表示する場合 true
useAccessor - アクセッサーを使用する場合 true
戻り値:
エンティティ記述のファクトリ

createEntityListenerDescFactory

public EntityListenerDescFactory createEntityListenerDescFactory(String packageName,
                                                                 String superclassName)

createDaoDescFactory

public DaoDescFactory createDaoDescFactory(String packageName,
                                           String suffix,
                                           String configClassName)
Dao記述のファクトリを作成します。

パラメータ:
packageName - パッケージ名
suffix - サフィックス
configClassName - 設定クラス名
戻り値:
Dao記述のファクトリ
導入されたバージョン:
1.7.0

createDaoDelegateDescFactory

public DaoDelegateDescFactory createDaoDelegateDescFactory()
Daoデリゲート記述のファクトリを作成します。

戻り値:
Daoデリゲート記述のファクトリ

createEntityPropertyClassNameResolver

public EntityPropertyClassNameResolver createEntityPropertyClassNameResolver(File propertyFile)
エンティティプロパティのクラス名リゾルバを作成します。

パラメータ:
propertyFile - プロパティファイル
戻り値:
ドメインクラス名のリゾルバ

createSqlTestDescFactory

public SqlTestDescFactory createSqlTestDescFactory(String sqlTestClassName,
                                                   boolean abstrct,
                                                   String dialectClassName,
                                                   String driverClassName,
                                                   String url,
                                                   String user,
                                                   String password,
                                                   Set<File> sqlFiles)
SQLテスト記述ファクトリを作成します。

パラメータ:
sqlTestClassName - SQLのテストクラス名
abstrct - 抽象クラスの場合true
dialectClassName - org.seasar.doma.jdbc.dialect.Dialectのサブクラスの名前
driverClassName - Driver のサブクラスの名前
url - JDBC接続URL
user - JDBC接続ユーザ
password - JDBC接続パスワード
sqlFiles - テスト対象のSQLファイルのセット
戻り値:
SQLテスト記述ファクトリ

createSqlDescFactory

public SqlDescFactory createSqlDescFactory(File templatePrimaryDir,
                                           GenDialect dialect)
SQL記述ファクトリを作成します。

パラメータ:
templatePrimaryDir - テンプレートを格納するプライマリディレクトリ、使用しない場合 null
dialect - 方言
戻り値:
SQL記述ファクトリ
導入されたバージョン:
1.11.0

createGenerator

public Generator createGenerator(String templateEncoding,
                                 File templatePrimaryDir)
ジェネレータを作成します。

パラメータ:
templateEncoding - テンプレートファイルのエンコーディング
templatePrimaryDir - テンプレートファイルを格納したプライマリディレクトリ、プライマリディレクトリを使用しない場合null
戻り値:
ジェネレータ


Copyright © 2009-2013 The Seasar Foundation. All Rights Reserved.