Package org.apache.openjpa.jdbc.schema
Class Schema
java.lang.Object
org.apache.openjpa.jdbc.schema.Schema
- All Implemented Interfaces:
Serializable
,Comparable<Schema>
Represents a database schema.
- Author:
- Abe White
- See Also:
-
Constructor Summary
ConstructorDescriptionSchema()
Default constructor.Schema
(String name, SchemaGroup group) Deprecated.Schema
(DBIdentifier name, SchemaGroup group) -
Method Summary
Modifier and TypeMethodDescriptionaddSequence
(String name) Deprecated.addSequence
(DBIdentifier name) Deprecated.Deprecated.addTable
(DBIdentifier name) addTable
(DBIdentifier name, DBIdentifier validName) int
getName()
Deprecated.Return the schema's group.getSequence
(String name) Deprecated.getSequence
(DBIdentifier name) Sequence[]
Return the schema's sequences.Deprecated.getTable
(DBIdentifier name) Table[]
Return the schema's tables.importSequence
(Sequence seq) Import a sequence from another schema.importTable
(Table table) Import a table from another schema.boolean
removeSequence
(Sequence seq) Remove the given sequence from the schema.boolean
removeTable
(Table tab) Remove the given table from the schema.void
setIdentifier
(DBIdentifier name) void
Deprecated.toString()
-
Constructor Details
-
Schema
public Schema()Default constructor. -
Schema
Deprecated.Constructor.- Parameters:
name
- the schema name, if anygroup
- the schema's owning group
-
Schema
-
-
Method Details
-
getSchemaGroup
Return the schema's group. -
getName
Deprecated.Return the name of the schema, or null if none. -
getIdentifier
-
setName
Deprecated.Set the name of the schema. This method can only be used for schemas not attached to a group. -
setIdentifier
-
getTables
Return the schema's tables. -
getTable
Deprecated.Return the table with the given name, or null if none. -
getTable
-
addTable
Deprecated.Add a table to the schema. -
addTable
-
addTable
Deprecated.Add a table with a shortened (i.e., validated) name to the schema -
addTable
-
removeTable
Remove the given table from the schema.- Returns:
- true if the table was removed, false if not in the schema
-
importTable
Import a table from another schema. Note that this method does not import foreign keys, indexes, or unique constraints. -
getSequences
Return the schema's sequences. -
getSequence
Deprecated.Return the sequence with the given name, or null if none. -
getSequence
-
addSequence
Deprecated.Add a sequence to the schema. -
addSequence
-
removeSequence
Remove the given sequence from the schema.- Returns:
- true if the sequence was removed, false if not in the schema
-
importSequence
Import a sequence from another schema. -
compareTo
- Specified by:
compareTo
in interfaceComparable<Schema>
-
toString
-