1 package com.quantum.model;
3 import java.sql.SQLException;
5 import com.quantum.IQuantumConstants;
10 public interface Entity extends BookmarkHolder, Comparable {
12 public static final String TABLE_TYPE = IQuantumConstants.Table;
13 public static final String VIEW_TYPE = IQuantumConstants.View;
14 public static final String SEQUENCE_TYPE = IQuantumConstants.Sequence;
16 public String getName();
17 public String getSchema();
18 public String getType();
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;