|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.seasar.doma.extension.gen.task.AbstractTask org.seasar.doma.extension.gen.task.Gen
public class Gen
コードを生成します。
次のコードを生成できます。
クラス org.seasar.doma.extension.gen.task.AbstractTask から継承されたフィールド |
---|
globalFactory, globalFactoryClassName |
クラス org.apache.tools.ant.Task から継承されたフィールド |
---|
target, taskName, taskType, wrapper |
クラス org.apache.tools.ant.ProjectComponent から継承されたフィールド |
---|
description, location, project |
コンストラクタの概要 | |
---|---|
Gen()
|
メソッドの概要 | |
---|---|
DaoConfig |
createDaoConfig()
Daoの設定を作成します。 |
protected DaoDelegateDescFactory |
createDaoDelegateDescFactory()
Daoデリゲート記述ファクトリを作成します。 |
protected DaoDescFactory |
createDaoDescFactory()
Dao記述ファクトリを作成します。 |
protected DataSource |
createDataSource()
データソースを作成します。 |
EntityConfig |
createEntityConfig()
エンティティの設定を作成します。 |
protected EntityDescFactory |
createEntityDescFactory()
エンティティ記述ファクトリを作成します。 |
protected EntityListenerDescFactory |
createEntityListenerDescFactory()
エンティティリスナー記述ファクトリを作成します。 |
protected EntityPropertyClassNameResolver |
createEntityPropertyClassNameResolver()
エンティティプロパティのクラス名リゾルバを作成します。 |
protected EntityPropertyDescFactory |
createEntityPropertyDescFactory()
グローバルファクトリを作成します。 |
protected Generator |
createGenerator()
ジェネレータを作成します。 |
SqlConfig |
createSqlConfig()
SQLの設定を作成します。 |
protected SqlDescFactory |
createSqlDescFactory()
SQL記述ファクトリを作成します。 |
protected TableMetaReader |
createTableMetaReader()
テーブルメタデータを作成します。 |
protected void |
doPrepare()
サブクラスで準備します。 |
protected void |
doRun()
サブクラスで実行します。 |
protected void |
doValidate()
サブクラスで検証します。 |
protected void |
generateDao(DaoDesc daoDesc)
DaoのJavaコードを生成します。 |
protected void |
generateDaoDelegate(DaoDelegateDesc daoDelegateDesc)
DaoデリゲートのJavaコードを生成します。 |
protected void |
generateEntity(EntityDesc entityDesc)
エンティティのJavaコードを生成します。 |
protected void |
generateEntityListener(EntityListenerDesc entityListenerDesc)
|
protected void |
generateSql(DaoDesc daoDesc,
SqlDesc sqlDesc)
SQLを生成します。 |
void |
setDialectName(DialectNameAttribute dialectName)
方言名を設定します。 |
void |
setDriverClassName(String driverClassName)
Driver のサブタイプのクラス名を設定します。 |
void |
setGenDialectClassName(String genDialectClassName)
GenDialect のサブタイプのクラス名を設定します。 |
void |
setIgnoredTableNamePattern(String ignoredTableNamePattern)
対象としないテーブル名の正規表現を設定します。 |
void |
setPassword(String password)
JDBC接続パスワードを設定します。 |
void |
setSchemaName(String schemaName)
対象とするテーブルが属するスキーマ名を設定します。 |
void |
setTableNamePattern(String tableNamePattern)
対象とするテーブル名の正規表現を設定します。 |
void |
setTableTypes(String tableTypes)
カンマまたは空白で区切られたテーブルの型のリストを設定します |
void |
setTemplateEncoding(String templateEncoding)
テンプレートのエンコーディングを設定します。 |
void |
setTemplatePrimaryDir(File templatePrimaryDir)
テンプレートを格納するプライマリディレクトリを設定します。 |
void |
setUrl(String url)
JDBC接続URLを設定します。 |
void |
setUser(String user)
JDBC接続ユーザーを設定します。 |
void |
setVersionColumnNamePattern(String versionColumnNamePattern)
バージョンカラム名のパターンを設定します。 |
クラス org.seasar.doma.extension.gen.task.AbstractTask から継承されたメソッド |
---|
execute, forName, newInstance, prepare, run, setGlobalFactoryClassName, validate |
クラス org.apache.tools.ant.Task から継承されたメソッド |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
クラス org.apache.tools.ant.ProjectComponent から継承されたメソッド |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
クラス java.lang.Object から継承されたメソッド |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected DialectNameAttribute dialectName
protected String genDialectClassName
GenDialect
のサブタイプのクラス名
protected String driverClassName
Driver
のサブタイプのクラス名
protected String user
protected String password
protected String url
protected String schemaName
protected String tableNamePattern
protected String ignoredTableNamePattern
protected List<String> tableTypes
protected String versionColumnNamePattern
org.seasar.doma.Versino
が注釈されます。
protected String templateEncoding
protected File templatePrimaryDir
null
protected GenDialect dialect
protected DataSource dataSource
protected TableMetaReader tableMetaReader
protected EntityPropertyClassNameResolver entityPropertyClassNameResolver
protected EntityDescFactory entityDescFactory
protected EntityListenerDescFactory entityListenerDescFactory
protected EntityPropertyDescFactory entityPropertyDescFactory
protected DaoDescFactory daoDescFactory
protected DaoDelegateDescFactory daoDelegateDescFactory
protected SqlDescFactory sqlDescFactory
protected Generator generator
protected EntityConfig entityConfig
protected DaoConfig daoConfig
protected SqlConfig sqlConfig
コンストラクタの詳細 |
---|
public Gen()
メソッドの詳細 |
---|
public void setUser(String user)
user
- JDBC接続ユーザーpublic void setPassword(String password)
password
- JDBC接続パスワードpublic void setUrl(String url)
url
- JDBC接続URLpublic void setDriverClassName(String driverClassName)
Driver
のサブタイプのクラス名を設定します。
driverClassName
- Driver
のサブタイプのクラス名public void setDialectName(DialectNameAttribute dialectName)
dialectName
- 方言名public void setGenDialectClassName(String genDialectClassName)
GenDialect
のサブタイプのクラス名を設定します。
genDialectClassName
- GenDialect
のサブタイプのクラス名public void setSchemaName(String schemaName)
schemaName
- 対象とするテーブルが属するスキーマ名public void setTableNamePattern(String tableNamePattern)
tableNamePattern
- 対象とするテーブル名の正規表現public void setIgnoredTableNamePattern(String ignoredTableNamePattern)
ignoredTableNamePattern
- 対象としないテーブル名の正規表現public void setTableTypes(String tableTypes)
tableTypes
- カンマまたは空白で区切られたテーブルの型のリストpublic void setVersionColumnNamePattern(String versionColumnNamePattern)
versionColumnNamePattern
- バージョンカラム名のパターンpublic void setTemplateEncoding(String templateEncoding)
templateEncoding
- テンプレートのエンコーディングpublic void setTemplatePrimaryDir(File templatePrimaryDir)
templatePrimaryDir
- テンプレートを格納するプライマリディレクトリ、使用しない場合 null
public EntityConfig createEntityConfig()
public DaoConfig createDaoConfig()
public SqlConfig createSqlConfig()
protected void doValidate()
AbstractTask
の記述:
AbstractTask
内の doValidate
protected void doPrepare()
AbstractTask
の記述:
AbstractTask
内の doPrepare
protected DataSource createDataSource()
protected TableMetaReader createTableMetaReader()
protected EntityPropertyClassNameResolver createEntityPropertyClassNameResolver()
protected EntityPropertyDescFactory createEntityPropertyDescFactory()
protected EntityDescFactory createEntityDescFactory()
protected EntityListenerDescFactory createEntityListenerDescFactory()
protected DaoDescFactory createDaoDescFactory()
protected DaoDelegateDescFactory createDaoDelegateDescFactory()
protected SqlDescFactory createSqlDescFactory()
protected Generator createGenerator()
protected void doRun()
AbstractTask
の記述:
AbstractTask
内の doRun
protected void generateEntity(EntityDesc entityDesc)
entityDesc
- エンティティ記述protected void generateEntityListener(EntityListenerDesc entityListenerDesc)
protected void generateDao(DaoDesc daoDesc)
daoDesc
- Dao記述protected void generateDaoDelegate(DaoDelegateDesc daoDelegateDesc)
daoDelegateDesc
- Daoデリゲート記述protected void generateSql(DaoDesc daoDesc, SqlDesc sqlDesc)
daoDesc
- Dao記述sqlDesc
- SQL記述
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |