|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mysema.query.sql.ddl.CreateTableClause
public class CreateTableClause
CreateTableClause defines a CREATE TABLE clause
Constructor Summary | |
---|---|
CreateTableClause(Connection conn,
SQLTemplates templates,
String table)
|
Method Summary | |
---|---|
CreateTableClause |
autoIncrement()
Set the last column to auto increment |
CreateTableClause |
column(String name,
Class<?> type)
Add a new column definition |
void |
execute()
Execute the clause |
ForeignKeyBuilder |
foreignKey(String name,
String... columns)
Add a foreign key |
CreateTableClause |
index(String name,
String... columns)
Add an index |
CreateTableClause |
notNull()
Set the last added column to not null |
CreateTableClause |
primaryKey(String name,
String... columns)
Set the primary key |
CreateTableClause |
size(int size)
Set the size of the last column's type |
CreateTableClause |
unique()
Set the last added index to unique |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CreateTableClause(Connection conn, SQLTemplates templates, String table)
Method Detail |
---|
public CreateTableClause column(String name, Class<?> type)
name
- type
-
public CreateTableClause notNull()
public CreateTableClause size(int size)
size
-
public CreateTableClause autoIncrement()
public CreateTableClause primaryKey(String name, String... columns)
name
- columns
-
public CreateTableClause index(String name, String... columns)
name
- columns
-
public CreateTableClause unique()
public ForeignKeyBuilder foreignKey(String name, String... columns)
name
- columns
-
public void execute()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |