public void addConstraintCommand(DefineCommand command){
  if (command instanceof CreateIndex) {
    constraintCommands.add(command);
  }
 else {
    AlterTableAddConstraint con=(AlterTableAddConstraint)command;
    boolean alreadySet;
    if (con.getType() == CommandInterface.ALTER_TABLE_ADD_CONSTRAINT_PRIMARY_KEY) {
      alreadySet=setPrimaryKeyColumns(con.getIndexColumns());
    }
 else {
      alreadySet=false;
    }
    if (!alreadySet) {
      constraintCommands.add(command);
    }
  }
}

public void addConstraintCommand ( DefineCommand command ) { if ( command instanceof CreateIndex ) { constraintCommands . add ( command ) ; } else { AlterTableAddConstraint con = ( AlterTableAddConstraint ) command ; boolean alreadySet ; if ( con . getType ( ) == CommandInterface . ALTER_TABLE_ADD_CONSTRAINT_PRIMARY_KEY ) { alreadySet = setPrimaryKeyColumns ( con . getIndexColumns ( ) ) ; } else { alreadySet = false ; } if ( ! alreadySet ) { constraintCommands . add ( command ) ; } } }
add a constraint statement to this statement . the primary key definition is one possible constraint statement .
