|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.schema.NameSet org.apache.openjpa.jdbc.schema.SchemaGroup
public class SchemaGroup
Represents a grouping of schemas used in a database.
Constructor Summary | |
---|---|
SchemaGroup()
|
Method Summary | |
---|---|
Schema |
addSchema()
Add a schema to the group. |
Schema |
addSchema(java.lang.String name)
Add a schema to the group. |
java.lang.Object |
clone()
|
protected void |
copy(SchemaGroup group)
Copy cloneable state from the given instance. |
ForeignKey[] |
findExportedForeignKeys(PrimaryKey pk)
Find all foreign keys exported by a given primary key (all foreign keys that link to the primary key). |
Sequence |
findSequence(Sequence seq)
Find the equivalent of the given sequence in this schema group. |
Sequence |
findSequence(java.lang.String name)
Find the sequence with the given name in the group, using '.' as the catalog separator. |
Table |
findTable(java.lang.String name)
Find the table with the given name in the group, using '.' as the catalog separator. |
Table |
findTable(Table table)
Find the equivalent of the given table in this schema group. |
Schema |
getSchema(java.lang.String name)
Return the schema with the given name, or null if none. |
Schema[] |
getSchemas()
Return all schemas. |
Schema |
importSchema(Schema schema)
Import a schema from another group. |
boolean |
isKnownSequence(Sequence seq)
Return true if the given sequence is known to exist. |
boolean |
isKnownSequence(java.lang.String name)
Return true if the given sequence is known to exist. |
boolean |
isKnownTable(java.lang.String name)
Return true if the given table is known to exist. |
boolean |
isKnownTable(Table table)
Return true if the given table is known to exist. |
protected Column |
newColumn(java.lang.String name,
Table table)
Return a new column with the given name and owner table. |
protected ForeignKey |
newForeignKey(java.lang.String name,
Table table)
Return a new foreign key with the given name and owner table. |
protected Index |
newIndex(java.lang.String name,
Table table)
Return a new index with the given name and owner table. |
protected SchemaGroup |
newInstance()
Create a new instance of this class. |
protected PrimaryKey |
newPrimaryKey(java.lang.String name,
Table table)
Return a new primary key with the given name and owner table. |
protected Schema |
newSchema(java.lang.String name)
Return a new schema with the given name. |
protected Sequence |
newSequence(java.lang.String name,
Schema schema)
Return a new sequence with the given name and owner schema. |
protected Table |
newTable(java.lang.String name,
Schema schema)
Return a new table with the given name and owner schema. |
protected Unique |
newUnique(java.lang.String name,
Table table)
Return a new unique constraint with the given name and owner table. |
boolean |
removeSchema(Schema schema)
Remove the given schema from the group. |
void |
removeUnusedComponents()
Remove unreferenced or emtpy components from the schema. |
Methods inherited from class org.apache.openjpa.jdbc.schema.NameSet |
---|
addName, isNameTaken, removeName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaGroup()
Method Detail |
---|
public Schema[] getSchemas()
public Schema getSchema(java.lang.String name)
public Schema addSchema()
public Schema addSchema(java.lang.String name)
public boolean removeSchema(Schema schema)
public Schema importSchema(Schema schema)
public boolean isKnownTable(Table table)
findTable(org.apache.openjpa.jdbc.schema.Table)
may exhibit dynamic behavior in some schema group
implementations, this method only returns true if the table has been
added to this group or is known to exist in the database.
public boolean isKnownTable(java.lang.String name)
findTable(org.apache.openjpa.jdbc.schema.Table)
may exhibit dynamic behavior in some schema group
implementations, this method only returns true if the table has been
added to this group or is known to exist in the database.
public Table findTable(Table table)
public Table findTable(java.lang.String name)
public boolean isKnownSequence(Sequence seq)
findSequence(org.apache.openjpa.jdbc.schema.Sequence)
may exhibit dynamic behavior in some schema group
implementations, this method only returns true if the sequence has been
added to this group or is known to exist in the database.
public boolean isKnownSequence(java.lang.String name)
findSequence(org.apache.openjpa.jdbc.schema.Sequence)
may exhibit dynamic behavior in some schema group
implementations, this method only returns true if the sequence has been
added to this group or is known to exist in the database.
public Sequence findSequence(Sequence seq)
public Sequence findSequence(java.lang.String name)
public ForeignKey[] findExportedForeignKeys(PrimaryKey pk)
public void removeUnusedComponents()
public java.lang.Object clone()
clone
in class java.lang.Object
protected SchemaGroup newInstance()
protected void copy(SchemaGroup group)
protected Schema newSchema(java.lang.String name)
protected Sequence newSequence(java.lang.String name, Schema schema)
protected Table newTable(java.lang.String name, Schema schema)
protected Column newColumn(java.lang.String name, Table table)
protected PrimaryKey newPrimaryKey(java.lang.String name, Table table)
protected Index newIndex(java.lang.String name, Table table)
protected Unique newUnique(java.lang.String name, Table table)
protected ForeignKey newForeignKey(java.lang.String name, Table table)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |