Package com.webobjects.eoaccess

Examples of com.webobjects.eoaccess.EOSchemaSynchronization


   *
   * @return an array of EOSQLExpressions for renaming this table
   */
  @SuppressWarnings("unchecked")
  public NSArray<EOSQLExpression> _renameToExpressions(String newName) {
    EOSchemaSynchronization schemaSynchronization = _database.synchronizationFactory();
    NSArray<EOSQLExpression> expressions = schemaSynchronization.statementsToRenameTableNamed(name(), newName, NSDictionary.EmptyDictionary);
    ERXMigrationDatabase._ensureNotEmpty(expressions, "rename table", true);
    return expressions;
  }
View Full Code Here


   *
   * @return an array of EOSQLExpressions for creating this column
   */
  @SuppressWarnings("unchecked")
  public NSArray<EOSQLExpression> _createExpressions() {
    EOSchemaSynchronization schemaSynchronization = _table.database().synchronizationFactory();
    NSArray<EOSQLExpression> expressions = schemaSynchronization.statementsToInsertColumnForAttribute(_newAttribute(), NSDictionary.EmptyDictionary);
    ERXMigrationDatabase._ensureNotEmpty(expressions, "add column", true);
    return expressions;
  }
View Full Code Here

   *
   * @return an array of EOSQLExpressions for deleting this column
   */
  @SuppressWarnings("unchecked")
  public NSArray<EOSQLExpression> _deleteExpressions() {
    EOSchemaSynchronization schemaSynchronization = _table.database().synchronizationFactory();
    NSArray<EOSQLExpression> expressions = schemaSynchronization.statementsToDeleteColumnNamed(name(), _table.name(), NSDictionary.EmptyDictionary);
    ERXMigrationDatabase._ensureNotEmpty(expressions, "delete column", true);
    return expressions;
  }
View Full Code Here

   *            the new name of this column
   * @return an array of EOSQLExpressions for renaming this column
   */
  @SuppressWarnings("unchecked")
  public NSArray<EOSQLExpression> _renameToExpressions(String newName) {
    EOSchemaSynchronization schemaSynchronization = _table.database().synchronizationFactory();
    NSArray<EOSQLExpression> expressions = schemaSynchronization.statementsToRenameColumnNamed(name(), _table.name(), newName, NSDictionary.EmptyDictionary);
    ERXMigrationDatabase._ensureNotEmpty(expressions, "rename column", true);
    _setName(newName);
    return expressions;
  }
View Full Code Here

   * @throws SQLException
   *             if the change fails
   */
  @SuppressWarnings("unchecked")
  public void setAllowsNull(boolean allowsNull) throws SQLException {
    EOSchemaSynchronization schemaSynchronization = _table.database().synchronizationFactory();
    NSArray<EOSQLExpression> expressions = schemaSynchronization.statementsToModifyColumnNullRule(name(), _table.name(), allowsNull, NSDictionary.EmptyDictionary);
    ERXMigrationDatabase._ensureNotEmpty(expressions, "modify allows null", true);
    ERXJDBCUtilities.executeUpdateScript(_table.database().adaptorChannel(), ERXMigrationDatabase._stringsForExpressions(expressions));
  }
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  public void setDataType(int jdbcType, int scale, int precision, int width, NSDictionary options) throws SQLException {
    JDBCAdaptor adaptor = (JDBCAdaptor) _table.database().adaptor();
    String externalType = ERXSQLHelper.newSQLHelper(adaptor).externalTypeForJDBCType(adaptor, jdbcType);
    EOSchemaSynchronization schemaSynchronization = _table.database().synchronizationFactory();
    NSArray<EOSQLExpression> expressions = schemaSynchronization.statementsToConvertColumnType(_name, _table.name(), null, new _ColumnType(externalType, scale, precision, width), options);
    ERXMigrationDatabase._ensureNotEmpty(expressions, "convert column type", true);
    ERXJDBCUtilities.executeUpdateScript(_table.database().adaptorChannel(), ERXMigrationDatabase._stringsForExpressions(expressions));
    _jdbcType = jdbcType;
    _scale = scale;
    _precision = precision;
View Full Code Here

TOP

Related Classes of com.webobjects.eoaccess.EOSchemaSynchronization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.