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 boolean isSynonym();
19 public Column[] getColumns() throws NotConnectedException, SQLException;
20 public Index[] getIndexes() throws NotConnectedException, SQLException;
21 public Column getColumn(String columnName) throws NotConnectedException, SQLException;
23 * Returns a String with the qualified name of the Entity in the
24 * format "schema.name".
26 public String getQualifiedName();
29 * @return - TRUE if the entity exists in the database<br />
30 * - FALSE if the entity does not exist in the database<br />
31 * - null if it's not known whether or not the
32 * entity exists in the database.
34 public Boolean exists();
36 * Some databases support mixed-case table names. Queries issued
37 * against these tables must be quoted.
40 public String getQuotedTableName();
41 public ForeignKey[] getExportedKeys() throws NotConnectedException, SQLException;
42 public ForeignKey[] getImportedKeys() throws NotConnectedException, SQLException;
43 public ForeignKey[] getReferences() throws NotConnectedException, SQLException;