Class WriteSchemaToDatabaseCommand


public class WriteSchemaToDatabaseCommand extends DatabaseCommandWithCreationParameters
Parses the schema XML files specified for the enclosing task, and creates the corresponding schema in the database.
Version:
$Revision: 289996 $
  • Constructor Details

    • WriteSchemaToDatabaseCommand

      public WriteSchemaToDatabaseCommand()
  • Method Details

    • isAlterDatabase

      protected boolean isAlterDatabase()
      Determines whether to alter the database if it already exists, or re-set it.
      Returns:
      true if to alter the database
    • setAlterDatabase

      public void setAlterDatabase(boolean alterTheDb)
      Specifies whether DdlUtils shall alter an existing database rather than clearing it and creating it new.
      Parameters:
      alterTheDb - true if to alter the database
    • isDoDrops

      protected boolean isDoDrops()
      Determines whether to drop tables and the associated constraints before re-creating them (this implies alterDatabase is false).
      Returns:
      true if drops shall be performed
    • setDoDrops

      public void setDoDrops(boolean doDrops)
      Specifies whether tables, external constraints, etc. can be dropped if necessary. Note that this is only relevant when alterDatabase is false.
      Parameters:
      doDrops - true if drops shall be performed
    • execute

      public void execute(DatabaseTaskBase task, Database model) throws org.apache.tools.ant.BuildException
      Executes this command.
      Specified by:
      execute in class Command
      Parameters:
      task - The executing task
      model - The database model
      Throws:
      org.apache.tools.ant.BuildException