|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectorg.seasar.extension.jdbc.gen.internal.command.AbstractCommand
org.seasar.extension.jdbc.gen.internal.command.GenerateEntityCommand
public class GenerateEntityCommand
エンティティクラスのJavaファイルを生成するCommand
の実装クラスです。
このコマンドは、データベースのメタデータからエンティティクラスのJavaファイルを生成します。
テーブル1つにつき、1つのエンティティクラスのJavaファイルを生成します。
フィールドの概要 | |
---|---|
protected java.lang.Integer |
allocationSize
エンティティの識別子の割り当てサイズ、指定しない場合は null |
protected boolean |
applyDbCommentToJava
データベースのコメントをJavaコードに適用する場合 true |
protected DbTableMetaReader |
dbTableMetaReader
テーブルメタデータのリーダ |
protected GenDialect |
dialect
方言 |
protected EntityModelFactory |
entityModelFactory
エンティティのモデルのファクトリ |
protected java.lang.String |
entityPackageName
エンティティクラスのパッケージ名 |
protected EntitySetDescFactory |
entitySetDescFactory
エンティティセット記述のファクトリ |
protected java.lang.String |
entitySuperclassName
エンティティのスーパークラスの名前 |
protected java.lang.String |
entityTemplateFileName
エンティティクラスのテンプレート名 |
protected java.lang.String |
genDialectClassName
GenDialect の実装クラス名 |
protected GenerationType |
generationType
エンティティの識別子の生成方法を示す列挙型、生成しない場合は null 。 |
protected Generator |
generator
ジェネレータ |
protected java.lang.String |
ignoreTableNamePattern
Javaコード生成の対象としないテーブル名の正規表現 |
protected java.lang.Integer |
initialValue
エンティティの識別子の初期値、指定しない場合は null |
protected java.io.File |
javaFileDestDir
生成するJavaファイルの出力先ディレクトリ |
protected java.lang.String |
javaFileEncoding
Javaファイルのエンコーディング |
protected static Logger |
logger
ロガー |
protected boolean |
overwrite
上書きをする場合 true 、しない場合false |
protected java.io.File |
pluralFormFile
単語を複数系に変換するための辞書ファイル |
protected java.lang.String |
rootPackageName
ルートパッケージ名 |
protected java.lang.String |
schemaName
スキーマ名 |
protected boolean |
showCatalogName
カタログ名を表示する場合 true |
protected boolean |
showColumnDefinition
カラム定義を表示する場合 true |
protected boolean |
showColumnName
カラム名を表示する場合 true |
protected boolean |
showJoinColumn
JoinColumn を表示する場合true |
protected boolean |
showSchemaName
スキーマ名を表示する場合 true |
protected boolean |
showTableName
テーブル名を表示する場合 true |
protected java.lang.String |
tableNamePattern
Javaコード生成の対象とするテーブル名の正規表現 |
protected java.lang.String |
templateFileEncoding
テンプレートファイルのエンコーディング |
protected java.io.File |
templateFilePrimaryDir
テンプレートファイルを格納するプライマリディレクトリ |
protected boolean |
useAccessor
エンティティクラスでアクセサを使用する場合 true |
protected boolean |
useTemporalType
TemporalType を使用する場合true |
protected java.lang.String |
versionColumnNamePattern
バージョンカラム名のパターン |
クラス org.seasar.extension.jdbc.gen.internal.command.AbstractCommand から継承されたフィールド |
---|
configPath, containerFactorySupport, env, factory, factoryClassName, jdbcManager, jdbcManagerName |
コンストラクタの概要 | |
---|---|
GenerateEntityCommand()
インスタンスを構築します。 |
メソッドの概要 | |
---|---|
protected DbTableMetaReader |
createDbTableMetaReader()
DbTableMetaReader の実装を作成します。 |
protected EntityModelFactory |
createEntityModelFactory()
EntityModelFactory の実装を作成します。 |
protected EntitySetDescFactory |
createEntitySetDescFactory()
EntitySetDescFactory の実装を作成します。 |
protected GenerationContext |
createGenerationContext(ClassModel model,
java.lang.String templateName)
GenerationContext の実装を作成します。 |
protected Generator |
createGenerator()
Generator の実装を作成します。 |
protected void |
doDestroy()
サブクラスで破棄します。 |
protected void |
doExecute()
サブクラスで実行します。 |
protected void |
doInit()
初期化します。 |
protected void |
doValidate()
サブクラスで検証します。 |
protected void |
generateEntity(EntityDesc entityDesc)
エンティティクラスのJavaファイルを生成します。 |
java.lang.Integer |
getAllocationSize()
エンティティの識別子の割り当てサイズを返します。 |
java.lang.String |
getEntityPackageName()
エンティティクラスのパッケージ名を返します。 |
java.lang.String |
getEntitySuperclassName()
エンティティのスーパークラスの名前を返します。 |
java.lang.String |
getEntityTemplateFileName()
エンティティクラスのテンプレート名を返します。 |
java.lang.String |
getGenDialectClassName()
GenDialect の実装クラス名を返します。 |
GenerationType |
getGenerationType()
エンティティの識別子の生成方法を示す列挙型を返します。 |
java.lang.String |
getIgnoreTableNamePattern()
Javaコード生成の対象としないテーブル名の正規表現を返します。 |
java.lang.Integer |
getInitialValue()
エンティティの識別子の初期値を返します。 |
java.io.File |
getJavaFileDestDir()
生成するJavaファイルの出力先ディレクトリを返します。 |
java.lang.String |
getJavaFileEncoding()
Javaファイルのエンコーディングを返します。 |
protected Logger |
getLogger()
ロガーを返します。 |
java.io.File |
getPluralFormFile()
単語を複数系に変換するための辞書ファイルを返します。 |
java.lang.String |
getRootPackageName()
ルートパッケージ名を返します。 |
java.lang.String |
getSchemaName()
スキーマ名を返します。 |
java.lang.String |
getTableNamePattern()
Javaコード生成の対象とするテーブル名の正規表現を返します。 |
java.lang.String |
getTemplateFileEncoding()
テンプレートファイルのエンコーディングを返します。 |
java.io.File |
getTemplateFilePrimaryDir()
テンプレートファイルを格納するプライマリディレクトリを返します。 |
java.lang.String |
getVersionColumnNamePattern()
バージョンカラム名のパターンを返します。 |
boolean |
isApplyDbCommentToJava()
データベースのコメントをJavaコードに適用する場合 true を返します。 |
boolean |
isOverwrite()
上書きをする場合 true 、しない場合false を返します。 |
boolean |
isShowCatalogName()
カタログ名を表示する場合 true を返します。 |
boolean |
isShowColumnDefinition()
カラム定義を表示する場合 true を返します。 |
boolean |
isShowColumnName()
カラム名を表示する場合 true を返します。 |
boolean |
isShowJoinColumn()
JoinColumn を表示する場合true を返します。 |
boolean |
isShowSchemaName()
スキーマ名を表示する場合 true を返します。 |
boolean |
isShowTableName()
テーブル名を表示する場合 true を返します。 |
boolean |
isUseAccessor()
エンティティクラスでアクセサを使用する場合 true を返します。 |
boolean |
isUseTemporalType()
TemporalType を使用する場合true を返します。 |
void |
setAllocationSize(java.lang.Integer allocationSize)
エンティティの識別子の割り当てサイズを設定します。 |
void |
setApplyDbCommentToJava(boolean applyDbCommentToJava)
データベースのコメントをJavaコードに適用する場合 true を設定します。 |
void |
setEntityPackageName(java.lang.String entityPackageName)
エンティティクラスのパッケージ名を設定します。 |
void |
setEntitySuperclassName(java.lang.String entitySuperclassName)
エンティティのスーパークラスの名前を設定します。 |
void |
setEntityTemplateFileName(java.lang.String entityTemplateFileName)
エンティティクラスのテンプレート名を設定します。 |
void |
setGenDialectClassName(java.lang.String genDialectClassName)
GenDialect の実装クラス名を設定します。 |
void |
setGenerationType(GenerationType generationType)
エンティティの識別子の生成方法を示す列挙型を設定します。 |
void |
setIgnoreTableNamePattern(java.lang.String ignoreTableNamePattern)
Javaコード生成の対象としないテーブル名の正規表現を設定します。 |
void |
setInitialValue(java.lang.Integer initialValue)
エンティティの識別子の初期値を設定します。 |
void |
setJavaFileDestDir(java.io.File javaFileDestDir)
生成するJavaファイルの出力先ディレクトリを設定します。 |
void |
setJavaFileEncoding(java.lang.String javaFileEncoding)
Javaファイルのエンコーディングを設定します。 |
void |
setOverwrite(boolean overwrite)
上書きをする場合 true 、しない場合false を設定します。 |
void |
setPluralFormFile(java.io.File pluralFormFile)
単語を複数系に変換するための辞書ファイルを設定します。 |
void |
setRootPackageName(java.lang.String rootPackageName)
ルートパッケージ名を設定します。 |
void |
setSchemaName(java.lang.String schemaName)
スキーマ名を設定します。 |
void |
setShowCatalogName(boolean showCatalogName)
カタログ名を表示する場合 true を設定します。 |
void |
setShowColumnDefinition(boolean showColumnDefinition)
カラム定義を表示する場合 true を設定します。 |
void |
setShowColumnName(boolean showColumnName)
カラム名を表示する場合 true を設定します。 |
void |
setShowJoinColumn(boolean showJoinColumn)
JoinColumn を表示する場合true を設定します。 |
void |
setShowSchemaName(boolean showSchemaName)
スキーマ名を表示する場合 true を設定します。 |
void |
setShowTableName(boolean showTableName)
テーブル名を表示する場合 true を設定します。 |
void |
setTableNamePattern(java.lang.String tableNamePattern)
Javaコード生成の対象とするテーブル名の正規表現を設定します。 |
void |
setTemplateFileEncoding(java.lang.String templateFileEncoding)
テンプレートファイルのエンコーディングを設定します。 |
void |
setTemplateFilePrimaryDir(java.io.File templateFilePrimaryDir)
テンプレートファイルを格納するプライマリディレクトリを設定します。 |
void |
setUseAccessor(boolean useAccessor)
エンティティクラスでアクセサを使用する場合 true を設定します。 |
void |
setUseTemporalType(boolean useTemporalType)
TemporalType を使用する場合true を設定します。 |
void |
setVersionColumnNamePattern(java.lang.String versionColumnNamePattern)
バージョンカラム名のパターンを設定します。 |
クラス org.seasar.extension.jdbc.gen.internal.command.AbstractCommand から継承されたメソッド |
---|
destroy, execute, getConfigPath, getEnv, getFactoryClassName, getGenDialect, getJdbcManagerName, getRdbmsName, init, logRdbmsAndGenDialect, logWritableProperties, setConfigPath, setEnv, setFactoryClassName, setJdbcManagerName, validate |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected static Logger logger
protected java.lang.String schemaName
protected java.lang.String tableNamePattern
protected java.lang.String ignoreTableNamePattern
protected java.lang.String versionColumnNamePattern
protected java.io.File pluralFormFile
protected boolean useTemporalType
TemporalType
を使用する場合true
protected boolean useAccessor
true
protected GenerationType generationType
null
。
protected java.lang.Integer initialValue
null
protected java.lang.Integer allocationSize
null
protected boolean showCatalogName
true
protected boolean showSchemaName
true
protected boolean showTableName
true
protected boolean showColumnName
true
protected boolean showColumnDefinition
true
protected boolean showJoinColumn
JoinColumn
を表示する場合true
protected java.lang.String entityTemplateFileName
protected java.lang.String templateFileEncoding
protected java.io.File templateFilePrimaryDir
protected java.lang.String rootPackageName
protected java.lang.String entityPackageName
protected java.lang.String entitySuperclassName
protected java.io.File javaFileDestDir
protected java.lang.String javaFileEncoding
protected boolean overwrite
true
、しない場合false
protected boolean applyDbCommentToJava
true
protected java.lang.String genDialectClassName
GenDialect
の実装クラス名
protected GenDialect dialect
protected DbTableMetaReader dbTableMetaReader
protected EntitySetDescFactory entitySetDescFactory
protected Generator generator
protected EntityModelFactory entityModelFactory
コンストラクタの詳細 |
---|
public GenerateEntityCommand()
メソッドの詳細 |
---|
public java.lang.String getEntityPackageName()
public void setEntityPackageName(java.lang.String entityPackageName)
entityPackageName
- エンティティクラスのパッケージ名public java.lang.String getEntityTemplateFileName()
public void setEntityTemplateFileName(java.lang.String entityTemplateFileName)
entityTemplateFileName
- エンティティクラスのテンプレート名public java.io.File getJavaFileDestDir()
public void setJavaFileDestDir(java.io.File javaFileDestDir)
javaFileDestDir
- 生成するJavaファイルの出力先ディレクトリpublic java.lang.String getJavaFileEncoding()
public void setJavaFileEncoding(java.lang.String javaFileEncoding)
javaFileEncoding
- Javaファイルのエンコーディングpublic boolean isOverwrite()
true
、しない場合false
を返します。
true
、しない場合false
public void setOverwrite(boolean overwrite)
true
、しない場合false
を設定します。
overwrite
- 上書きをする場合true
、しない場合false
public java.lang.String getRootPackageName()
public void setRootPackageName(java.lang.String rootPackageName)
rootPackageName
- ルートパッケージ名public java.lang.String getSchemaName()
public void setSchemaName(java.lang.String schemaName)
schemaName
- スキーマ名public java.lang.String getTemplateFileEncoding()
public void setTemplateFileEncoding(java.lang.String templateFileEncoding)
templateFileEncoding
- テンプレートファイルのエンコーディングpublic java.io.File getTemplateFilePrimaryDir()
public void setTemplateFilePrimaryDir(java.io.File templateFilePrimaryDir)
templateFilePrimaryDir
- テンプレートファイルを格納するプライマリディレクトリpublic java.lang.String getTableNamePattern()
public void setTableNamePattern(java.lang.String tableNamePattern)
tableNamePattern
- Javaコード生成の対象とするテーブル名の正規表現public java.lang.String getIgnoreTableNamePattern()
public void setIgnoreTableNamePattern(java.lang.String ignoreTableNamePattern)
ignoreTableNamePattern
- Javaコード生成の対象としないテーブル名の正規表現public java.lang.String getVersionColumnNamePattern()
public void setVersionColumnNamePattern(java.lang.String versionColumnNamePattern)
versionColumnNamePattern
- バージョンカラム名のパターンpublic java.io.File getPluralFormFile()
public void setPluralFormFile(java.io.File pluralFormFile)
pluralFormFile
- 単語を複数系に変換するための辞書ファイルpublic boolean isShowCatalogName()
true
を返します。
true
public void setShowCatalogName(boolean showCatalogName)
true
を設定します。
showCatalogName
- カタログ名を表示する場合true
public boolean isShowSchemaName()
true
を返します。
true
public void setShowSchemaName(boolean showSchemaName)
true
を設定します。
showSchemaName
- スキーマ名を表示する場合true
public boolean isShowTableName()
true
を返します。
true
public void setShowTableName(boolean showTableName)
true
を設定します。
showTableName
- テーブル名を表示する場合true
public boolean isShowColumnName()
true
を返します。
true
public void setShowColumnName(boolean showColumnName)
true
を設定します。
showColumnName
- カラム名を表示する場合true
public boolean isShowColumnDefinition()
true
を返します。
true
public void setShowColumnDefinition(boolean showColumnDefinition)
true
を設定します。
showColumnDefinition
- カラム定義を表示する場合true
を設定します。public boolean isShowJoinColumn()
JoinColumn
を表示する場合true
を返します。
JoinColumn
を表示する場合true
public void setShowJoinColumn(boolean showJoinColumn)
JoinColumn
を表示する場合true
を設定します。
showJoinColumn
- JoinColumn
を表示する場合true
public java.lang.String getGenDialectClassName()
GenDialect
の実装クラス名を返します。
GenDialect
の実装クラス名public void setGenDialectClassName(java.lang.String genDialectClassName)
GenDialect
の実装クラス名を設定します。
genDialectClassName
- GenDialect
の実装クラス名public GenerationType getGenerationType()
null
public void setGenerationType(GenerationType generationType)
generationType
- エンティティの識別子の生成方法を示す列挙型、生成しない場合はnull
public java.lang.Integer getInitialValue()
null
public void setInitialValue(java.lang.Integer initialValue)
initialValue
- エンティティの識別子の初期値、指定しない場合はnull
public java.lang.Integer getAllocationSize()
null
public void setAllocationSize(java.lang.Integer allocationSize)
allocationSize
- エンティティの識別子の割り当てサイズ、指定しない場合はnull
public java.lang.String getEntitySuperclassName()
public void setEntitySuperclassName(java.lang.String entitySuperclassName)
entitySuperclassName
- エンティティのスーパークラスの名前public boolean isUseAccessor()
true
を返します。
true
public void setUseAccessor(boolean useAccessor)
true
を設定します。
useAccessor
- エンティティクラスでアクセサを使用する場合true
public boolean isApplyDbCommentToJava()
true
を返します。
true
public void setApplyDbCommentToJava(boolean applyDbCommentToJava)
true
を設定します。
applyDbCommentToJava
- データベースのコメントをJavaコードに適用する場合true
public boolean isUseTemporalType()
TemporalType
を使用する場合true
を返します。
TemporalType
を使用する場合true
public void setUseTemporalType(boolean useTemporalType)
TemporalType
を使用する場合true
を設定します。
useTemporalType
- TemporalType
を使用する場合true
protected void doValidate()
AbstractCommand
の記述:
AbstractCommand
内の doValidate
protected void doInit()
AbstractCommand
内の doInit
protected void doExecute()
AbstractCommand
の記述:
AbstractCommand
内の doExecute
protected void doDestroy()
AbstractCommand
の記述:
AbstractCommand
内の doDestroy
protected void generateEntity(EntityDesc entityDesc)
entityDesc
- エンティティ記述protected DbTableMetaReader createDbTableMetaReader()
DbTableMetaReader
の実装を作成します。
DbTableMetaReader
の実装protected EntitySetDescFactory createEntitySetDescFactory()
EntitySetDescFactory
の実装を作成します。
EntitySetDescFactory
の実装protected EntityModelFactory createEntityModelFactory()
EntityModelFactory
の実装を作成します。
EntityModelFactory
の実装protected Generator createGenerator()
Generator
の実装を作成します。
Generator
の実装protected GenerationContext createGenerationContext(ClassModel model, java.lang.String templateName)
GenerationContext
の実装を作成します。
model
- モデルtemplateName
- テンプレート名
GenerationContext
の実装protected Logger getLogger()
AbstractCommand
の記述:
AbstractCommand
内の getLogger
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |