| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentHashMap | |
| private final ConcurrentHashMap | |
| private final ConcurrentHashMap | |
| private final ConcurrentHashMap | |
| private final ConcurrentHashMap | |
| private RightOwner | |
| private final ConcurrentHashMap | |
| private final ConcurrentHashMap | |
| private final boolean | |
| private ArrayList | |
| private final ConcurrentHashMap | |
| private final HashSet | temporaryUniqueNames
The set of returned unique names that are not yet stored. |
| private final ConcurrentHashMap |
| Access | Constructor and Description |
|---|---|
| public | Schema(Database
the database database, int the object id id, String the schema name schemaName, RightOwner the owner of the schema owner, boolean if this is a system schema (such a schema can not be
dropped) system)Create a new schema object. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | |
| public TableSynonym | Returns: the createdTableSynonym objectthe create synonym information data)Add a table synonym to the schema. |
| public Table | Returns: the createdTable objectthe create table information data)Add a table to the schema. |
| public TableLink | Returns: theTableLink objectthe object id id, String the table name of the alias tableName, String the driver class name driver, String the database URL url, String the user name user, String the password password, String the schema name of the target table originalSchema, String the table name of the target table originalTable, boolean if updates should be emitted instead of delete/insert emitUpdates, boolean create the object even if the database can not be accessed force)Add a linked table to the schema. |
| public UserAggregate | Returns: the aggregate function or nullthe name of the user defined aggregate function name)Get the user defined aggregate function if it exists. |
| public Constant | Returns: the object or nullthe object name constantName)Try to find a user defined constant with this name. |
| public Constraint | Returns: the object or nullthe session session, String the object name name)Try to find a constraint with this name. |
| public Domain | Returns: the domain or nullthe name of the domain name)Get the domain if it exists, or null if not. |
| public FunctionAlias | Returns: the object or nullthe object name functionAlias)Try to find a user defined function with this name. |
| public UserDefinedFunction | Returns: the object or nullthe object name name)Try to find a user defined function or aggregate function with the specified name. |
| public Index | Returns: the object or nullthe session session, String the object name name)Try to find an index with this name. |
| public Sequence | Returns: the object or nullthe object name sequenceName)Try to find a sequence with this name. |
| public Table | Returns: the object or nullthe session session, String the object name name)Try to find a table or view with this name. |
| public TriggerObject | Returns: the object or nullthe object name name)Try to find a trigger with this name. |
| public void | |
| public ArrayList | Returns: the specified list with added objects, or a new (possibly empty) list with all objectslist to add objects to, or addTo)null to allocate a new
listGet all objects. |
| public void | getAll(int
the object type type, ArrayList<SchemaObject> list to add objects to addTo)Get all objects of the given type. |
| public Collection | |
| public Collection | |
| public Collection | |
| public Collection | |
| public Collection | |
| public Collection | |
| public Collection | |
| public Collection | Returns: a (possible empty) list of all objectsthe session, session)null to exclude meta tablesGet all tables and views. |
| public Collection | |
| public ArrayList | getChildren()
Overrides org. Get the list of dependent children (for tables, this includes indexes and so on). |
| public Constant | Returns: the constantthe constant name constantName)Get the user defined constant with the given name. |
| public Constraint | Returns: the constraintthe constraint name name)Get the constraint with the given name. |
| public String | |
| public Domain | |
| public Index | |
| private Map | |
| public RightOwner | |
| public Sequence | Returns: the sequencethe sequence name sequenceName)Get the sequence with the given name. |
| public TableSynonym | Returns: the object or nullthe object name name)Try to find a synonym with this name. |
| public ArrayList | |
| public Table | Returns: the table or viewthe session session, String the table or view name name)Get the table or view with the given name. |
| public Table | Returns: the table or null if not foundthe session session, String the table name name)Get the table with the given name, if any. |
| public int | |
| public String | Returns: the unique namethe session session, Table the constraint table table)Create a unique constraint name. |
| public String | Returns: the unique namethe session session, Domain the constraint domain domain)Create a unique constraint name. |
| public String | Returns: the unique namethe session session, Table the indexed table table, String the index name prefix prefix)Create a unique index name. |
| private String | |
| public boolean | Returns: true if this schema is empty, false otherwiseReturn whether is this schema is empty (does not contain any objects). |
| public void | |
| public void | removeChildrenAndResources(SessionLocal
the session session)Implements abstract org. Delete all dependent children objects and resources of this object. |
| private void | |
| public void | |
| public void | |
| public Table | Returns: the object or nullthe session session, String the object name name)Try to find a table or view with this name. |
| public Table | Returns: the object or nullthe session session, String the object name name, boolean if true, and the object is a materialized
view, return the underlying Table object. resolveMaterializedView)Try to find a table or view with this name. |
| public void | setTableEngineParams(ArrayList<String>
default table engine params tableEngineParams)Set table engine params of this schema. |
| constants | back to summary |
|---|---|
| private final ConcurrentHashMap<String, Constant> constants | |
| constraints | back to summary |
|---|---|
| private final ConcurrentHashMap<String, Constraint> constraints | |
| domains | back to summary |
|---|---|
| private final ConcurrentHashMap<String, Domain> domains | |
| functionsAndAggregates | back to summary |
|---|---|
| private final ConcurrentHashMap<String, UserDefinedFunction> functionsAndAggregates | |
| indexes | back to summary |
|---|---|
| private final ConcurrentHashMap<String, Index> indexes | |
| owner | back to summary |
|---|---|
| private RightOwner owner | |
| sequences | back to summary |
|---|---|
| private final ConcurrentHashMap<String, Sequence> sequences | |
| synonyms | back to summary |
|---|---|
| private final ConcurrentHashMap<String, TableSynonym> synonyms | |
| system | back to summary |
|---|---|
| private final boolean system | |
| tableEngineParams | back to summary |
|---|---|
| private ArrayList<String> tableEngineParams | |
| tablesAndViews | back to summary |
|---|---|
| private final ConcurrentHashMap<String, Table> tablesAndViews | |
| temporaryUniqueNames | back to summary |
|---|---|
| private final HashSet<String> temporaryUniqueNames The set of returned unique names that are not yet stored. It is used to avoid returning the same unique name twice when multiple threads concurrently create objects. | |
| triggers | back to summary |
|---|---|
| private final ConcurrentHashMap<String, TriggerObject> triggers | |
| Schema | back to summary |
|---|---|
| public Schema(Database database, int id, String schemaName, RightOwner owner, boolean system) Create a new schema object.
| |
| add | back to summary |
|---|---|
| public void add(SchemaObject obj) Add an object to this schema. This method must not be called within CreateSchemaObject; use Database.addSchemaObject() instead
| |
| canDrop | back to summary |
|---|---|
| public boolean canDrop() Check if this schema can be dropped. System schemas can not be dropped.
| |
| createSynonym | back to summary |
|---|---|
| public TableSynonym createSynonym(CreateSynonymData data) Add a table synonym to the schema.
| |
| createTable | back to summary |
|---|---|
| public Table createTable(CreateTableData data) Add a table to the schema.
| |
| createTableLink | back to summary |
|---|---|
| public TableLink createTableLink(int id, String tableName, String driver, String url, String user, String password, String originalSchema, String originalTable, boolean emitUpdates, boolean force) Add a linked table to the schema.
| |
| findAggregate | back to summary |
|---|---|
| public UserAggregate findAggregate(String name) Get the user defined aggregate function if it exists. This method returns null if no object with this name exists.
| |
| findConstant | back to summary |
|---|---|
| public Constant findConstant(String constantName) Try to find a user defined constant with this name. This method returns null if no object with this name exists. | |
| findConstraint | back to summary |
|---|---|
| public Constraint findConstraint(SessionLocal session, String name) Try to find a constraint with this name. This method returns null if no object with this name exists.
| |
| findDomain | back to summary |
|---|---|
| public Domain findDomain(String name) Get the domain if it exists, or null if not. | |
| findFunction | back to summary |
|---|---|
| public FunctionAlias findFunction(String functionAlias) Try to find a user defined function with this name. This method returns null if no object with this name exists.
| |
| findFunctionOrAggregate | back to summary |
|---|---|
| public UserDefinedFunction findFunctionOrAggregate(String name) Try to find a user defined function or aggregate function with the specified name. This method returns null if no object with this name exists.
| |
| findIndex | back to summary |
|---|---|
| public Index findIndex(SessionLocal session, String name) Try to find an index with this name. This method returns null if no object with this name exists.
| |
| findSequence | back to summary |
|---|---|
| public Sequence findSequence(String sequenceName) Try to find a sequence with this name. This method returns null if no object with this name exists. | |
| findTableOrView | back to summary |
|---|---|
| public Table findTableOrView(SessionLocal session, String name) Try to find a table or view with this name. This method returns null if no object with this name exists. Local temporary tables are also returned. Synonyms are not returned or resolved.
| |
| findTrigger | back to summary |
|---|---|
| public TriggerObject findTrigger(String name) Try to find a trigger with this name. This method returns null if no object with this name exists.
| |
| freeUniqueName | back to summary |
|---|---|
| public void freeUniqueName(String name) Release a unique object name.
| |
| getAll | back to summary |
|---|---|
| public ArrayList Get all objects.
| |
| getAll | back to summary |
|---|---|
| public void getAll(int type, ArrayList<SchemaObject> addTo) Get all objects of the given type.
| |
| getAllConstants | back to summary |
|---|---|
| public Collection | |
| getAllConstraints | back to summary |
|---|---|
| public Collection | |
| getAllDomains | back to summary |
|---|---|
| public Collection | |
| getAllFunctionsAndAggregates | back to summary |
|---|---|
| public Collection | |
| getAllIndexes | back to summary |
|---|---|
| public Collection | |
| getAllSequences | back to summary |
|---|---|
| public Collection | |
| getAllSynonyms | back to summary |
|---|---|
| public Collection | |
| getAllTablesAndViews | back to summary |
|---|---|
| public Collection Get all tables and views.
| |
| getAllTriggers | back to summary |
|---|---|
| public Collection | |
| getChildren | back to summary |
|---|---|
| public ArrayList Overrides org. Doc from org. Get the list of dependent children (for tables, this includes indexes and so on). | |
| getConstant | back to summary |
|---|---|
| public Constant getConstant(String constantName) Get the user defined constant with the given name.
| |
| getConstraint | back to summary |
|---|---|
| public Constraint getConstraint(String name) Get the constraint with the given name.
| |
| getCreateSQL | back to summary |
|---|---|
| public String getCreateSQL() Implements abstract org. Doc from org. Construct the CREATE ... SQL statement for this object. | |
| getDomain | back to summary |
|---|---|
| public Domain getDomain(String name) Get the domain with the given name.
| |
| getIndex | back to summary |
|---|---|
| public Index getIndex(String name) Get the index with the given name.
| |
| getMap | back to summary |
|---|---|
private Map
| |
| getOwner | back to summary |
|---|---|
| public RightOwner getOwner() Get the owner of this schema.
| |
| getSequence | back to summary |
|---|---|
| public Sequence getSequence(String sequenceName) Get the sequence with the given name.
| |
| getSynonym | back to summary |
|---|---|
| public TableSynonym getSynonym(String name) Try to find a synonym with this name. This method returns null if no object with this name exists.
| |
| getTableEngineParams | back to summary |
|---|---|
| public ArrayList Get table engine params of this schema. | |
| getTableOrView | back to summary |
|---|---|
| public Table getTableOrView(SessionLocal session, String name) Get the table or view with the given name. Local temporary tables are also returned.
| |
| getTableOrViewByName | back to summary |
|---|---|
| public Table getTableOrViewByName(SessionLocal session, String name) Get the table with the given name, if any.
| |
| getType | back to summary |
|---|---|
| public int getType() Implements abstract org. Doc from org. Get the object type.
| |
| getUniqueConstraintName | back to summary |
|---|---|
| public String getUniqueConstraintName(SessionLocal session, Table table) Create a unique constraint name.
| |
| getUniqueDomainConstraintName | back to summary |
|---|---|
| public String getUniqueDomainConstraintName(SessionLocal session, Domain domain) Create a unique constraint name.
| |
| getUniqueIndexName | back to summary |
|---|---|
| public String getUniqueIndexName(SessionLocal session, Table table, String prefix) Create a unique index name.
| |
| getUniqueName | back to summary |
|---|---|
| private String getUniqueName(DbObject obj, Map<String, ? extends SchemaObject> map, String prefix) | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Return whether is this schema is empty (does not contain any objects).
| |
| remove | back to summary |
|---|---|
| public void remove(SchemaObject obj) Remove an object from this schema.
| |
| removeChildrenAndResources | back to summary |
|---|---|
| public void removeChildrenAndResources(SessionLocal session) Implements abstract org. Doc from org. Delete all dependent children objects and resources of this object.
| |
| removeChildrenFromMap | back to summary |
|---|---|
| private void removeChildrenFromMap(SessionLocal session, ConcurrentHashMap<String, ? extends SchemaObject> map) | |
| rename | back to summary |
|---|---|
| public void rename(SchemaObject obj, String newName) Rename an object.
| |
| reserveUniqueName | back to summary |
|---|---|
| public void reserveUniqueName(String name) Reserve a unique object name.
| |
| resolveTableOrView | back to summary |
|---|---|
| public Table resolveTableOrView(SessionLocal session, String name) Try to find a table or view with this name. This method returns null if no object with this name exists. Local temporary tables are also returned. If a synonym with this name exists, the backing table of the synonym is returned
| |
| resolveTableOrView | back to summary |
|---|---|
| public Table resolveTableOrView(SessionLocal session, String name, boolean resolveMaterializedView) Try to find a table or view with this name. This method returns null if no object with this name exists. Local temporary tables are also returned. If a synonym with this name exists, the backing table of the synonym is returned
| |
| setTableEngineParams | back to summary |
|---|---|
| public void setTableEngineParams(ArrayList<String> tableEngineParams) Set table engine params of this schema. | |