1 24 package org.riotfamily.revolt.definition; 25 26 import java.util.ArrayList ; 27 import java.util.HashSet ; 28 import java.util.List ; 29 import java.util.Set ; 30 31 35 public class Database { 36 37 private List tables = new ArrayList (); 38 39 private Set sequences = new HashSet (); 40 41 public List getTables() { 42 return this.tables; 43 } 44 45 public void addTable(Table table) { 46 tables.add(table); 47 } 48 49 public Table getTable(String name) { 50 return (Table) tables.get(tables.indexOf(new Identifier(name))); 51 } 52 53 public void removeTable(String name) { 54 tables.remove(new Identifier(name)); 55 } 56 57 public void addSequence(String name) { 58 sequences.add(name); 59 } 60 61 public Set getSequences() { 62 return this.sequences; 63 } 64 65 } 66 | Popular Tags |