クラス TableSchema
- java.lang.Object
-
- org.nkjmlab.sorm4j.sql.schema.TableSchema
-
public abstract class TableSchema extends Object
-
-
ネストされたクラスの概要
ネストされたクラス 修飾子とタイプ クラス 説明 protected static interfaceTableSchema.GrammarUtilsprotected static classTableSchema.IndexSchemaGrammarprotected static interfaceTableSchema.TableSchemaGrammarprotected static interfaceTableSchema.TableSchemaKeyword
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 TableSchema(String name)
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 protected voidaddColumnDefinition(String columnName, String... dataTypeAndOptions)Adds an unique constraint.protected voidaddUniqueConstraint(String... uniqueColumnPair)Adds an unique constraint.List<String>getColumnNames()StringgetIndexSchema(String... columns)StringgetName()StringgetTableSchema()Gets a table schema.protected voidsetPrimaryKey(String... attributes)Sets attributes as primary key attributes.
-
-
-
コンストラクタの詳細
-
TableSchema
public TableSchema(String name)
-
-
メソッドの詳細
-
addColumnDefinition
protected void addColumnDefinition(String columnName, String... dataTypeAndOptions)
Adds an unique constraint.For example,
addUniqueConstraint("id","name") converted to "UNIQUE (id, name)"- パラメータ:
columnName-dataTypeAndOptions-
-
addUniqueConstraint
protected void addUniqueConstraint(String... uniqueColumnPair)
Adds an unique constraint.For example,
addUniqueConstraint("id","name") converted to "UNIQUE (id, name)"- パラメータ:
uniqueColumnPair-
-
getName
public String getName()
-
getTableSchema
public String getTableSchema()
Gets a table schema.- 戻り値:
-
setPrimaryKey
protected void setPrimaryKey(String... attributes)
Sets attributes as primary key attributes.For example,
setPrimaryKey("id","name") converted to "PRIMARY KEY (id, name)"- パラメータ:
attributes-
-
-