Example #1
0
  public void setOption(Attributes attributes) {
    // Look thru supported model elements in reverse order to
    // find one that this option statement applies to.

    String key = attributes.getValue("key");
    String value = attributes.getValue("value");
    if (currUnique != null) {
      currUnique.addOption(key, value);
    } else if (currIndex != null) {
      currIndex.addOption(key, value);
    } else if (currFK != null) {
      currFK.addOption(key, value);
    } else if (currColumn != null) {
      currColumn.addOption(key, value);
    } else if (currTable != null) {
      currTable.addOption(key, value);
    } else { // Must be a db level option.
      database.addOption(key, value);
    }
  }