1 package com.quantum.model;
3 import java.sql.SQLException;
8 public interface Entity extends BookmarkHolder, Comparable {
10 public static final String TABLE_TYPE = "TABLE";
11 public static final String VIEW_TYPE = "VIEW";
12 public static final String SEQUENCE_TYPE = "SEQUENCE";
14 public String getName();
15 public String getSchema();
16 public String getType();
17 public Column[] getColumns() throws NotConnectedException, SQLException;
18 public Index[] getIndexes() throws NotConnectedException, SQLException;
19 public Column getColumn(String columnName) throws NotConnectedException, SQLException;
21 * Returns a String with the qualified name of the Entity in the
22 * format "schema.name".
24 public String getQualifiedName();
27 * @return - TRUE if the entity exists in the database<br />
28 * - FALSE if the entity does not exist in the database<br />
29 * - null if it's not known whether or not the
30 * entity exists in the database.
32 public Boolean exists();
34 * Some databases support mixed-case table names. Queries issued
35 * against these tables must be quoted.
38 public String getQuotedTableName();
39 public ForeignKey[] getExportedKeys() throws NotConnectedException, SQLException;
40 public ForeignKey[] getImportedKeys() throws NotConnectedException, SQLException;
41 public ForeignKey[] getReferences() throws NotConnectedException, SQLException;