|
Project Wonder 5.0 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objecter.extensions.migration.ERXMigrationTable
public class ERXMigrationTable
ERXMigrationTable provides table-level migration API's. To obtain a table, you should call ERXMigrationDatabase.existingTableNamed or ERXMigrationDatabase.newTableNamed. Note: The .newXxxColumn API's cannot reference prototypes for the same reason that migrations in general cannot reference EOModels.
| Constructor Summary | |
|---|---|
protected |
ERXMigrationTable(ERXMigrationDatabase database,
java.lang.String name)
Constructs an ERXMigrationTable. |
| Method Summary | |
|---|---|
com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> |
_addForeignKeyExpressions(ERXMigrationColumn sourceColumn,
ERXMigrationColumn destinationColumn)
Returns an array of EOSQLExpressions for adding a foreign key constraint to this table (only supports single attribute FK's right now). |
com.webobjects.eoaccess.EOEntity |
_blankEntity()
Returns an EOEntity representing this table with no EOAttributes in it. |
void |
_columnDeleted(ERXMigrationColumn column)
Callback method for ERXMigrationColumn to notify the table that it has been deleted. |
com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> |
_createExpressions()
Returns an array of EOSQLExpressions for creating this table and all of its ERXMigrationColumns. |
com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> |
_dropExpressions()
Returns an array of EOSQLExpressions for dropping this table. |
com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> |
_dropPrimaryKeyExpressions(ERXMigrationColumn... columns)
Returns an array of EOSQLExpressions for removing the primary key constraint of this table (only supports single attribute PK's right now). |
ERXMigrationColumn |
_newColumn(java.lang.String name,
int jdbcType,
int width,
int precision,
int scale,
boolean allowsNull,
java.lang.String overrideValueType,
java.lang.Object defaultValue,
boolean autocreate)
Returns a new ERXMigrationColumn with the given attributes. |
com.webobjects.eoaccess.EOEntity |
_newEntity()
Returns an EOEntity representing this table that contains all of the EOAttributes for any ERXMigrationColumn that has been created or retrieved from this table. |
com.webobjects.eoaccess.EORelationship |
_newRelationship(ERXMigrationColumn sourceColumn,
ERXMigrationColumn destinationColumn)
Returns a simple single-attribute-mapping EORelationship between two columns. |
com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> |
_renameToExpressions(java.lang.String newName)
Returns an array of EOSQLExpressions for renaming this table. |
void |
_setName(java.lang.String name)
Sets the name of this table. |
void |
_setNew(boolean isNew)
Sets whether or not this table has been created in the database. |
com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> |
_setPrimaryKeyExpressions(ERXMigrationColumn... columns)
Returns an array of EOSQLExpressions for setting the primary key constraint of this table |
void |
addForeignKey(boolean create,
ERXMigrationColumn sourceColumn,
ERXMigrationColumn destinationColumn)
Executes the SQL operations to add this foreign key constraint (only supports single attribute FK's right now). |
void |
addForeignKey(ERXMigrationColumn sourceColumn,
ERXMigrationColumn destinationColumn)
Executes the SQL operations to add this foreign key constraint (only supports single attribute FK's right now). |
void |
addForeignKey(java.lang.String sourceColumnName,
ERXMigrationColumn destinationColumn)
Executes the SQL operations to add this foreign key constraint (only supports single attribute FK's right now). |
void |
addForeignKey(java.lang.String sourceColumnName,
java.lang.String destinationTableName,
java.lang.String destinationColumnName)
Executes the SQL operations to add this foreign key constraint (only supports single attribute FK's right now). |
void |
addIndex(boolean create,
ERXMigrationIndex index)
Executes the SQL operations to add an index. |
void |
addIndex(boolean create,
java.lang.String indexName,
ERXSQLHelper.ColumnIndex... columnIndexes)
Executes the SQL operations to add an index. |
void |
addIndex(ERXMigrationIndex index)
Executes the SQL operations to add an index. |
void |
addIndex(java.lang.String columnName)
Executes the SQL operations to add this index. |
void |
addIndex(java.lang.String indexName,
ERXMigrationColumn... columns)
Executes the SQL operations to add an index. |
void |
addIndex(java.lang.String indexName,
ERXSQLHelper.ColumnIndex... columnIndexes)
Executes the SQL operations to add an index. |
void |
addIndex(java.lang.String indexName,
java.lang.String columnName)
Executes the SQL operations to add this index. |
void |
addIndex(java.lang.String indexName,
java.lang.String columnName,
int width)
Executes the SQL operations to add this index. |
void |
addUniqueIndex(boolean create,
java.lang.String indexName,
ERXSQLHelper.ColumnIndex... columnIndexes)
Executes the SQL operations to add a unique index. |
void |
addUniqueIndex(java.lang.String columnName)
Executes the SQL operations to add this unique index. |
void |
addUniqueIndex(java.lang.String indexName,
ERXMigrationColumn... columns)
Executes the SQL operations to add a unique index. |
void |
addUniqueIndex(java.lang.String indexName,
ERXSQLHelper.ColumnIndex... columnIndexes)
Executes the SQL operations to add a unique index. |
void |
addUniqueIndex(java.lang.String indexName,
java.lang.String columnName)
Executes the SQL operations to add this unique index. |
void |
addUniqueIndex(java.lang.String indexName,
java.lang.String columnName,
int width)
Executes the SQL operations to add this unique index. |
void |
create()
Executes the SQL operations to create this table. |
ERXMigrationDatabase |
database()
Returns the ERXMigrationDatabase parent of this table. |
void |
drop()
Executes the SQL operations to drop this table. |
void |
dropPrimaryKey(ERXMigrationColumn... columns)
Executes the SQL operations to drop this primary key constraint (only supports single attribute PK's right now). |
ERXMigrationColumn |
existingColumnNamed(java.lang.String name)
Returns the ERMigrationColumn for the column with the given name. |
boolean |
isNew()
Returns true if this table has not yet been created in the database. |
com.webobjects.foundation.NSArray<java.lang.String> |
languages()
Returns the configured default languages for this migration. |
java.lang.String |
name()
Returns the name of this table. |
ERXMigrationColumn |
newBigDecimalColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull)
Returns a new BigDecimal column. |
ERXMigrationColumn |
newBigDecimalColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull,
java.math.BigDecimal defaultValue)
Returns a new BigDecimal column. |
ERXMigrationColumn |
newBigIntegerColumn(java.lang.String name,
boolean allowsNull)
Returns a new long column. |
ERXMigrationColumn |
newBigIntegerColumn(java.lang.String name,
boolean allowsNull,
java.lang.Long defaultValue)
Returns a new long column. |
ERXMigrationColumn |
newBlobColumn(java.lang.String name,
boolean allowsNull)
Returns a new Blob column. |
ERXMigrationColumn |
newBlobColumn(java.lang.String name,
int width,
boolean allowsNull)
Returns a new Blob column. |
ERXMigrationColumn |
newBlobColumn(java.lang.String name,
int width,
boolean allowsNull,
com.webobjects.foundation.NSData defaultValue)
Returns a new Blob column. |
ERXMigrationColumn |
newBooleanColumn(java.lang.String name,
boolean allowsNull)
Returns a new varchar(5) boolean column. |
ERXMigrationColumn |
newBooleanColumn(java.lang.String name,
boolean allowsNull,
java.lang.Boolean defaultValue)
Returns a new varchar(5) boolean column. |
ERXMigrationColumn |
newClobColumn(java.lang.String name,
boolean allowsNull)
Returns a new string blob column. |
ERXMigrationColumn |
newColumn(java.lang.String name,
int jdbcType,
int width,
int precision,
int scale,
boolean allowsNull,
java.lang.String overrideValueType)
Returns a new ERXMigrationColumn with the given attributes. |
ERXMigrationColumn |
newColumn(java.lang.String name,
int jdbcType,
int width,
int precision,
int scale,
boolean allowsNull,
java.lang.String overrideValueType,
java.lang.Object defaultValue)
Returns a new ERXMigrationColumn with the given attributes. |
ERXMigrationColumn |
newDateColumn(java.lang.String name,
boolean allowsNull)
Returns a new date column. |
ERXMigrationColumn |
newDateColumn(java.lang.String name,
boolean allowsNull,
com.webobjects.foundation.NSTimestamp defaultValue)
Returns a new date column. |
ERXMigrationColumn |
newDoubleColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull)
Returns a new double column. |
ERXMigrationColumn |
newDoubleColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull,
java.lang.Double defaultValue)
Returns a new double column. |
ERXMigrationColumn |
newFlagBooleanColumn(java.lang.String name,
boolean allowsNull)
Returns a new flag boolean column. |
ERXMigrationColumn |
newFlagBooleanColumn(java.lang.String name,
boolean allowsNull,
java.lang.Boolean defaultValue)
Returns a new flag boolean column. |
ERXMigrationColumn |
newFloatColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull)
Returns a new float column. |
ERXMigrationColumn |
newFloatColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull,
java.lang.Float defaultValue)
Returns a new float column. |
ERXMigrationColumn |
newIntBooleanColumn(java.lang.String name,
boolean allowsNull)
Returns a new integer boolean column. |
ERXMigrationColumn |
newIntBooleanColumn(java.lang.String name,
boolean allowsNull,
java.lang.Boolean defaultValue)
Returns a new integer boolean column. |
ERXMigrationColumn |
newIntegerColumn(java.lang.String name,
boolean allowsNull)
Returns a new integer column. |
ERXMigrationColumn |
newIntegerColumn(java.lang.String name,
boolean allowsNull,
java.lang.Integer defaultValue)
Returns a new integer column. |
ERXMigrationColumn |
newIntegerColumn(java.lang.String name,
int scale,
boolean allowsNull)
Returns a new integer column. |
ERXMigrationColumn |
newIntegerColumn(java.lang.String name,
int scale,
boolean allowsNull,
java.lang.Integer defaultValue)
Returns a new integer column. |
ERXMigrationColumn |
newIntegerColumn(java.lang.String name,
int scale,
int precision,
boolean allowsNull)
Returns a new integer column. |
ERXMigrationColumn |
newIntegerColumn(java.lang.String name,
int scale,
int precision,
boolean allowsNull,
java.lang.Object defaultValue)
Returns a new integer column. |
ERXMigrationColumn |
newIpAddressColumn(java.lang.String name,
boolean allowsNull)
Returns a new ipaddress column. |
ERXMigrationColumn |
newIpAddressColumn(java.lang.String name,
boolean allowsNull,
java.lang.String defaultValue)
Returns a new ipaddress column. |
ERXMigrationColumn |
newLargeStringColumn(java.lang.String name,
boolean allowsNull)
Returns a new String column (VARCHAR) that corresponds to the varcharLarge prototype. |
com.webobjects.foundation.NSArray<ERXMigrationColumn> |
newLocalizedClobColumns(java.lang.String name,
boolean allowsNull)
Returns a new localized string blob column. |
com.webobjects.foundation.NSArray<ERXMigrationColumn> |
newLocalizedStringColumns(java.lang.String name,
int width,
boolean allowsNull)
Returns a new localized String column (VARCHAR). |
com.webobjects.foundation.NSArray<ERXMigrationColumn> |
newLocalizedStringColumns(java.lang.String name,
int width,
boolean allowsNull,
java.lang.String defaultValue)
Returns a new localized String column (VARCHAR). |
com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.Object> |
newPrimaryKey()
Returns a dictionary that represents the primary key for an entity described by this table. |
com.webobjects.foundation.NSArray<com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.Object>> |
newPrimaryKeys(int count)
Returns an array of dictionaries that represent the primary keys for an entity described by this table. |
ERXMigrationColumn |
newSmallIntegerColumn(java.lang.String name,
boolean allowsNull)
Returns a new small integer column. |
ERXMigrationColumn |
newSmallIntegerColumn(java.lang.String name,
boolean allowsNull,
java.lang.Short defaultValue)
Returns a new small integer column. |
ERXMigrationColumn |
newStringColumn(java.lang.String name,
boolean allowsNull)
Returns a new String column (VARCHAR) with an unbounded length. |
ERXMigrationColumn |
newStringColumn(java.lang.String name,
boolean allowsNull,
java.lang.String defaultValue)
Returns a new String column (VARCHAR) that corresponds to the varcharLarge prototype. |
ERXMigrationColumn |
newStringColumn(java.lang.String name,
int width,
boolean allowsNull)
Returns a new String column (VARCHAR). |
ERXMigrationColumn |
newStringColumn(java.lang.String name,
int width,
boolean allowsNull,
java.lang.String defaultValue)
Returns a new String column (VARCHAR). |
ERXMigrationColumn |
newTimestampColumn(java.lang.String name,
boolean allowsNull)
Returns a new timestamp column. |
ERXMigrationColumn |
newTimestampColumn(java.lang.String name,
boolean allowsNull,
com.webobjects.foundation.NSTimestamp defaultValue)
Returns a new timestamp column. |
void |
renameTo(java.lang.String newName)
Executes the SQL operations to rename this table. |
void |
setPrimaryKey(boolean create,
ERXMigrationColumn... columns)
Executes the SQL operations to add this primary key constraint. |
void |
setPrimaryKey(ERXMigrationColumn... columns)
Executes the SQL operations to add this primary key constraint. |
void |
setPrimaryKey(java.lang.String... columnNames)
Executes the SQL operations to add this primary key constraint. |
void |
setPrimaryKey(java.lang.String columnName)
Executes the SQL operations to add this primary key constraint. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ERXMigrationTable(ERXMigrationDatabase database,
java.lang.String name)
database - the database this table is withinname - the name of this table| Method Detail |
|---|
public ERXMigrationDatabase database()
public com.webobjects.foundation.NSArray<java.lang.String> languages()
public void _setName(java.lang.String name)
name - the name of this tablepublic java.lang.String name()
public boolean isNew()
public void _setNew(boolean isNew)
isNew - if true, the table has been createdpublic com.webobjects.eoaccess.EOEntity _blankEntity()
public com.webobjects.eoaccess.EOEntity _newEntity()
public ERXMigrationColumn existingColumnNamed(java.lang.String name)
name - the name of the column to retrieve
public com.webobjects.eoaccess.EORelationship _newRelationship(ERXMigrationColumn sourceColumn,
ERXMigrationColumn destinationColumn)
sourceColumn - the source attribute of the relationshipdestinationColumn - the destination attribute of the relationship
public ERXMigrationColumn _newColumn(java.lang.String name,
int jdbcType,
int width,
int precision,
int scale,
boolean allowsNull,
java.lang.String overrideValueType,
java.lang.Object defaultValue,
boolean autocreate)
throws java.sql.SQLException
name - the name of the column to createjdbcType - the JDBC type of the column (see java.sql.Types)width - the width of the column (or 0 for unspecified)precision - the precision of the column (or 0 for unspecified)scale - the scale of the column (or 0 for unspecified)allowsNull - if true, the column will allow null valuesdefaultValue - the default value for the column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newColumn(java.lang.String name,
int jdbcType,
int width,
int precision,
int scale,
boolean allowsNull,
java.lang.String overrideValueType,
java.lang.Object defaultValue)
throws java.sql.SQLException
name - the name of the column to createjdbcType - the JDBC type of the column (see java.sql.Types)width - the width of the column (or 0 for unspecified)precision - the precision of the column (or 0 for unspecified)scale - the scale of the column (or 0 for unspecified)allowsNull - if true, the column will allow null valuesdefaultValue - the default value for the column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newColumn(java.lang.String name,
int jdbcType,
int width,
int precision,
int scale,
boolean allowsNull,
java.lang.String overrideValueType)
throws java.sql.SQLException
name - the name of the column to createjdbcType - the JDBC type of the column (see java.sql.Types)width - the width of the column (or 0 for unspecified)precision - the precision of the column (or 0 for unspecified)scale - the scale of the column (or 0 for unspecified)allowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newStringColumn(java.lang.String name,
int width,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnwidth - the max width of the varcharallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newStringColumn(java.lang.String name,
int width,
boolean allowsNull,
java.lang.String defaultValue)
throws java.sql.SQLException
name - the name of the columnwidth - the max width of the varcharallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newStringColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newLargeStringColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newStringColumn(java.lang.String name,
boolean allowsNull,
java.lang.String defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public com.webobjects.foundation.NSArray<ERXMigrationColumn> newLocalizedStringColumns(java.lang.String name,
int width,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnwidth - the max width of the varcharallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public com.webobjects.foundation.NSArray<ERXMigrationColumn> newLocalizedStringColumns(java.lang.String name,
int width,
boolean allowsNull,
java.lang.String defaultValue)
throws java.sql.SQLException
name - the name of the columnwidth - the max width of the varcharallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public com.webobjects.foundation.NSArray<ERXMigrationColumn> newLocalizedClobColumns(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIntegerColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIntegerColumn(java.lang.String name,
boolean allowsNull,
java.lang.Integer defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIntegerColumn(java.lang.String name,
int scale,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the integerallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIntegerColumn(java.lang.String name,
int scale,
boolean allowsNull,
java.lang.Integer defaultValue)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the integerallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIntegerColumn(java.lang.String name,
int scale,
int precision,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the integerprecision - the precision of the integerallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIntegerColumn(java.lang.String name,
int scale,
int precision,
boolean allowsNull,
java.lang.Object defaultValue)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the integerprecision - the precision of the integerallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newSmallIntegerColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newSmallIntegerColumn(java.lang.String name,
boolean allowsNull,
java.lang.Short defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBigIntegerColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBigIntegerColumn(java.lang.String name,
boolean allowsNull,
java.lang.Long defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newFloatColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the floatprecision - the precision of the floatallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newFloatColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull,
java.lang.Float defaultValue)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the floatprecision - the precision of the floatallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newDoubleColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the doubleprecision - the precision of the doubleallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newDoubleColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull,
java.lang.Double defaultValue)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the doubleprecision - the precision of the doubleallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBigDecimalColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the BigDecimalprecision - the precision of the BigDecimalallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBigDecimalColumn(java.lang.String name,
int precision,
int scale,
boolean allowsNull,
java.math.BigDecimal defaultValue)
throws java.sql.SQLException
name - the name of the columnscale - the scale of the BigDecimalprecision - the precision of the BigDecimalallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBooleanColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBooleanColumn(java.lang.String name,
boolean allowsNull,
java.lang.Boolean defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIntBooleanColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIntBooleanColumn(java.lang.String name,
boolean allowsNull,
java.lang.Boolean defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newFlagBooleanColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newFlagBooleanColumn(java.lang.String name,
boolean allowsNull,
java.lang.Boolean defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newClobColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBlobColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBlobColumn(java.lang.String name,
int width,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnwidth - the width of the bloballowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newBlobColumn(java.lang.String name,
int width,
boolean allowsNull,
com.webobjects.foundation.NSData defaultValue)
throws java.sql.SQLException
name - the name of the columnwidth - the width of the bloballowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newTimestampColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newTimestampColumn(java.lang.String name,
boolean allowsNull,
com.webobjects.foundation.NSTimestamp defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newDateColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newDateColumn(java.lang.String name,
boolean allowsNull,
com.webobjects.foundation.NSTimestamp defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIpAddressColumn(java.lang.String name,
boolean allowsNull)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null values
java.sql.SQLException - if the column cannot be created
public ERXMigrationColumn newIpAddressColumn(java.lang.String name,
boolean allowsNull,
java.lang.String defaultValue)
throws java.sql.SQLException
name - the name of the columnallowsNull - if true, the column will allow null valuesdefaultValue - the default value of this column
java.sql.SQLException - if the column cannot be createdpublic void _columnDeleted(ERXMigrationColumn column)
column - the column that has been deletedpublic com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> _createExpressions()
public void create()
throws java.sql.SQLException
java.sql.SQLException - if the creation failspublic com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> _dropExpressions()
public void drop()
throws java.sql.SQLException
java.sql.SQLException - if the drop failspublic com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> _renameToExpressions(java.lang.String newName)
public void renameTo(java.lang.String newName)
throws java.sql.SQLException
java.sql.SQLException - if the rename failspublic com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> _setPrimaryKeyExpressions(ERXMigrationColumn... columns)
public void addUniqueIndex(java.lang.String columnName)
throws java.sql.SQLException
columnName - the name of the column to add a unique index on
java.sql.SQLException - if the constraint fails
public void addUniqueIndex(java.lang.String indexName,
java.lang.String columnName)
throws java.sql.SQLException
indexName - the name of the indexcolumnName - the name of the column to add a unique index on
java.sql.SQLException - if the constraint fails
public void addUniqueIndex(java.lang.String indexName,
java.lang.String columnName,
int width)
throws java.sql.SQLException
indexName - the name of the indexcolumnName - the name of the column to add a unique index on
java.sql.SQLException - if the constraint fails
public void addUniqueIndex(java.lang.String indexName,
ERXMigrationColumn... columns)
throws java.sql.SQLException
indexName - the name of the indexcolumns - the columns to add a unique index on
java.sql.SQLException - if the constraint fails
public void addUniqueIndex(java.lang.String indexName,
ERXSQLHelper.ColumnIndex... columnIndexes)
throws java.sql.SQLException
indexName - the name of the indexcolumnIndexes - the column indexes to unique index on
java.sql.SQLException - if the constraint fails
public void addUniqueIndex(boolean create,
java.lang.String indexName,
ERXSQLHelper.ColumnIndex... columnIndexes)
throws java.sql.SQLException
create - if true, the index is created immediatelyindexName - the name of the indexcolumnIndexes - the column indexes to unique index on
java.sql.SQLException - if the constraint fails
public void addIndex(java.lang.String columnName)
throws java.sql.SQLException
columnName - the name of the column to add a unique index on
java.sql.SQLException - if the constraint fails
public void addIndex(java.lang.String indexName,
java.lang.String columnName)
throws java.sql.SQLException
indexName - the name of the indexcolumnName - the name of the column to add a unique index on
java.sql.SQLException - if the constraint fails
public void addIndex(java.lang.String indexName,
java.lang.String columnName,
int width)
throws java.sql.SQLException
indexName - the name of the indexcolumnName - the name of the column to add a unique index on
java.sql.SQLException - if the constraint fails
public void addIndex(java.lang.String indexName,
ERXMigrationColumn... columns)
throws java.sql.SQLException
indexName - the name of the indexcolumns - the columns to add a unique index on
java.sql.SQLException - if the constraint fails
public void addIndex(java.lang.String indexName,
ERXSQLHelper.ColumnIndex... columnIndexes)
throws java.sql.SQLException
indexName - the name of the indexcolumnIndexes - the column indexes to unique index on
java.sql.SQLException - if the constraint fails
public void addIndex(boolean create,
java.lang.String indexName,
ERXSQLHelper.ColumnIndex... columnIndexes)
throws java.sql.SQLException
create - if true, the index is created immediatelyindexName - the name of the indexcolumnIndexes - the column indexes to unique index on
java.sql.SQLException - if the constraint fails
public void addIndex(ERXMigrationIndex index)
throws java.sql.SQLException
index - the index to add
java.sql.SQLException - if the constraint fails
public void addIndex(boolean create,
ERXMigrationIndex index)
throws java.sql.SQLException
create - if true, the index is created immediatelyindex - the index to add
java.sql.SQLException - if the constraint fails
public void setPrimaryKey(java.lang.String columnName)
throws java.sql.SQLException
columnName - the name of the column to set as the primary key
java.sql.SQLException - if the constraint fails
public void setPrimaryKey(java.lang.String... columnNames)
throws java.sql.SQLException
columnNames - the names of the columns to set as the primary key
java.sql.SQLException - if the constraint fails
public void setPrimaryKey(ERXMigrationColumn... columns)
throws java.sql.SQLException
columns - the primary key columns to designate as primary keys
java.sql.SQLException - if the constraint fails
public void setPrimaryKey(boolean create,
ERXMigrationColumn... columns)
throws java.sql.SQLException
create - if create is true, execute this now (vs just flag the ERXMigrationColumn)columns - the primary key columns to designate as primary keys
java.sql.SQLException - if the constraint fails
public com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> _addForeignKeyExpressions(ERXMigrationColumn sourceColumn,
ERXMigrationColumn destinationColumn)
public void addForeignKey(java.lang.String sourceColumnName,
java.lang.String destinationTableName,
java.lang.String destinationColumnName)
throws java.sql.SQLException
sourceColumnName - the source column name of the relationshipdestinationTableName - the destination table of the relationship (should be the PK of the destination table)destinationColumnName - the destination column of the relationship (should be the PK of the destination table)
java.sql.SQLException - if the add fails
public void addForeignKey(java.lang.String sourceColumnName,
ERXMigrationColumn destinationColumn)
throws java.sql.SQLException
sourceColumnName - the source column name of the relationshipdestinationColumn - the destination column of the relationship (should be the PK of the destination table)
java.sql.SQLException - if the add fails
public void addForeignKey(ERXMigrationColumn sourceColumn,
ERXMigrationColumn destinationColumn)
throws java.sql.SQLException
sourceColumn - the source column of the relationshipdestinationColumn - the destination column of the relationship (should be the PK of the destination table)
java.sql.SQLException - if the add fails
public void addForeignKey(boolean create,
ERXMigrationColumn sourceColumn,
ERXMigrationColumn destinationColumn)
throws java.sql.SQLException
sourceColumn - the source column of the relationshipdestinationColumn - the destination column of the relationship (should be the PK of the destination table)
java.sql.SQLException - if the add failspublic com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOSQLExpression> _dropPrimaryKeyExpressions(ERXMigrationColumn... columns)
columns - the primary key columns to drop
public void dropPrimaryKey(ERXMigrationColumn... columns)
throws java.sql.SQLException
columns - the primary key columns
java.sql.SQLException - if the drop failspublic com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.Object> newPrimaryKey()
public com.webobjects.foundation.NSArray<com.webobjects.foundation.NSDictionary<java.lang.String,java.lang.Object>> newPrimaryKeys(int count)
count - the number of primary keys desired
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||