|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema
A CacheDatabaseSchema
describes all the tables and columns of
a database and its associated cache entries.
Field Summary | |
private java.util.ArrayList |
tables
Database tables. |
Constructor Summary | |
CacheDatabaseSchema(DatabaseSchema dbs)
Creates a new CacheDatabaseSchema instance by cloning an
existing DatabaseSchema . |
Method Summary | |
void |
addTable(CacheDatabaseTable table)
Adds a CacheDatabaseTable describing a table of the
database. |
boolean |
equals(java.lang.Object other)
Two CacheDatabaseSchema are equals if they have the same
tables. |
java.lang.String |
getInformation(boolean longFormat)
Returns information about the database schema. |
CacheDatabaseTable |
getTable(java.lang.String tableName)
Returns the CacheDatabaseTable object matching the given
table name or null if not found. |
java.util.ArrayList |
getTables()
Returns an ArrayList of CacheDatabaseTable
objects describing the database. |
boolean |
hasTable(java.lang.String tableName)
Returns true if the given TableName is found
in this schema. |
void |
mergeSchema(CacheDatabaseSchema databaseSchema)
Merge the given schema with the current one. |
void |
removeTable(CacheDatabaseTable table)
Removes a CacheDatabaseTable describing a table of the
database. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.ArrayList tables
Constructor Detail |
public CacheDatabaseSchema(DatabaseSchema dbs)
CacheDatabaseSchema
instance by cloning an
existing DatabaseSchema
.
dbs
- the DatabaseSchema
to cloneMethod Detail |
public void addTable(CacheDatabaseTable table)
CacheDatabaseTable
describing a table of the
database.
table
- the table to addpublic void removeTable(CacheDatabaseTable table)
CacheDatabaseTable
describing a table of the
database.
table
- the table to removepublic void mergeSchema(CacheDatabaseSchema databaseSchema) throws java.sql.SQLException
databaseSchema
- the schema to merge
java.sql.SQLException
- if the schemas conflictpublic java.util.ArrayList getTables()
ArrayList
of CacheDatabaseTable
objects describing the database.
ArrayList
of CacheDatabaseTable
public CacheDatabaseTable getTable(java.lang.String tableName)
CacheDatabaseTable
object matching the given
table name or null
if not found.
tableName
- the table name to look for
CacheDatabaseTable
value or nullpublic boolean hasTable(java.lang.String tableName)
true
if the given TableName
is found
in this schema.
tableName
- the name of the table you are looking for
true
if the table has been foundpublic boolean equals(java.lang.Object other)
CacheDatabaseSchema
are equals if they have the same
tables.
other
- the object to compare with
public java.lang.String getInformation(boolean longFormat)
longFormat
- true
for a long format, false for a short
summary
String
value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |