|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.avaje.ebean.config.dbplatform.DbDdlSyntax
public class DbDdlSyntax
Used to support DB specific syntax for DDL generation.
Constructor Summary | |
---|---|
DbDdlSyntax()
|
Method Summary | |
---|---|
int |
getColumnNameWidth()
Return the width for padding whitespace after column names. |
String |
getDisableReferentialIntegrity()
Return the DB specific command to disable referential integrity |
String |
getDropIfExists()
Typically returns IF EXISTS (if that is supported by the database platform) or null. |
String |
getDropTableCascade()
Return the cascade option for the drop table command. |
String |
getEnableReferentialIntegrity()
Return the DB specific command to enable referential integrity |
String |
getForeignKeyName(String table,
String propName,
int fkCount)
|
String |
getForeignKeySuffix()
Return the foreign key suffix. |
String |
getIdentity()
Return the identity clause for DB's that have identities. |
String |
getIndexName(String table,
String propName,
int ixCount)
|
int |
getMaxConstraintNameLength()
Return the maximum length that constraint names can be for this database. |
String |
getNewLine()
Return the new line character. |
String |
getPkPrefix()
Return the prefix used in naming primary keys. |
String |
getPrimaryKeyName(String tableName)
Return the primary key name for a given bean descriptor. |
boolean |
isAddOneToOneUniqueContraint()
Return true if imported side of OneToOne's should have unique constraints generated. |
boolean |
isRenderIndexForFkey()
Return true if indexes should be created for the foreign keys. |
void |
setAddOneToOneUniqueContraint(boolean addOneToOneUniqueContraint)
Set to false for DB's that don't want both a unique and index on the imported OneToOne. |
void |
setColumnNameWidth(int columnNameWidth)
Set the amount of padding to write after the column name. |
void |
setDisableReferentialIntegrity(String disableReferentialIntegrity)
Set the DB specific command to disable referential integrity |
void |
setDropIfExists(String dropIfExists)
Set the IF EXISTS clause for dropping tables if that is supported by the database platform. |
void |
setDropTableCascade(String dropTableCascade)
Set the cascade option for the drop table command. |
void |
setEnableReferentialIntegrity(String enableReferentialIntegrity)
Set the DB specific command to enable referential integrity |
void |
setForeignKeySuffix(String foreignKeySuffix)
Set the foreign key suffix. |
void |
setIdentity(String identity)
Set the identity clause. |
void |
setMaxConstraintNameLength(int maxFkeyLength)
Set the maximum length that constraint names can be for this database. |
void |
setNewLine(String newLine)
Set the new line character. |
void |
setPkPrefix(String pkPrefix)
Set the prefix used in naming primary keys. |
void |
setRenderIndexForFkey(boolean renderIndexForFkey)
Set whether indexes should be created for the foreign keys. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbDdlSyntax()
Method Detail |
---|
public String getPrimaryKeyName(String tableName)
public String getIdentity()
public void setIdentity(String identity)
public int getColumnNameWidth()
public void setColumnNameWidth(int columnNameWidth)
public String getNewLine()
public void setNewLine(String newLine)
public String getPkPrefix()
public void setPkPrefix(String pkPrefix)
public String getDisableReferentialIntegrity()
public void setDisableReferentialIntegrity(String disableReferentialIntegrity)
public String getEnableReferentialIntegrity()
public void setEnableReferentialIntegrity(String enableReferentialIntegrity)
public boolean isRenderIndexForFkey()
public void setRenderIndexForFkey(boolean renderIndexForFkey)
public String getDropIfExists()
public void setDropIfExists(String dropIfExists)
public String getDropTableCascade()
public void setDropTableCascade(String dropTableCascade)
public String getForeignKeySuffix()
public void setForeignKeySuffix(String foreignKeySuffix)
public int getMaxConstraintNameLength()
public void setMaxConstraintNameLength(int maxFkeyLength)
public boolean isAddOneToOneUniqueContraint()
public void setAddOneToOneUniqueContraint(boolean addOneToOneUniqueContraint)
public String getIndexName(String table, String propName, int ixCount)
public String getForeignKeyName(String table, String propName, int fkCount)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |