|
|||||||||||
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.CacheDatabaseTable
A CacheDatabaseTable
represents a database table and its
associated cache entries. It has an array of CacheDatabaseColumn
objects.
Keep it mind that ArrayList
and HashMap
are not
synchronized...
Field Summary | |
private java.util.ArrayList |
cacheEntries
|
private java.util.ArrayList |
columns
|
private java.lang.String |
name
|
private java.util.HashMap |
pkCacheEntries
|
Constructor Summary | |
CacheDatabaseTable(DatabaseTable databaseTable)
Creates a new CacheDatabaseTable instance. |
Method Summary | |
void |
addCacheEntry(AbstractResultCacheEntry ce)
Adds an AbstractResultCacheEntry object whose consistency
depends on this table. |
void |
addColumn(CacheDatabaseColumn column)
Adds a CacheDatabaseColumn object to this table.
|
void |
addPkCacheEntry(java.lang.String pk,
AbstractResultCacheEntry ce)
Adds an AbstractResultCacheEntry object associated to a pk
entry. |
boolean |
equals(java.lang.Object other)
Two CacheDatabaseColumn are equals if they have the same
name and the same columns. |
CacheDatabaseColumn |
getColumn(java.lang.String columnName)
Returns the CacheDatabaseColumn object matching the given
column name or null if not found. |
java.util.ArrayList |
getColumns()
Returns a list of CacheDatabaseColumn objects describing the
columns of this table.
|
java.lang.String |
getInformation(boolean longFormat)
Returns information about the database table and its columns. |
java.lang.String |
getName()
Gets the name of the table. |
AbstractResultCacheEntry |
getPkResultCacheEntry(java.lang.String pk)
Gets a CacheEntry object associated to a pk entry. |
void |
invalidateAll()
Invalidates all cache entries of every column of this table. |
void |
invalidateAllExceptPk()
Invalidates all cache entries of every column of this table. |
void |
mergeColumns(CacheDatabaseTable t)
Merge the given table's columns with the current table. |
void |
removePkResultCacheEntry(java.lang.Object pk)
Remove a CacheEntry object associated to a pk entry. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String name
private java.util.ArrayList columns
private java.util.ArrayList cacheEntries
private java.util.HashMap pkCacheEntries
Constructor Detail |
public CacheDatabaseTable(DatabaseTable databaseTable)
CacheDatabaseTable
instance.
databaseTable
- the database table to cacheMethod Detail |
public java.lang.String getName()
public void addColumn(CacheDatabaseColumn column)
CacheDatabaseColumn
object to this table.
Warning! The underlying ArrayList
is not synchronized.
column
- a CacheDatabaseColumn
valuepublic void mergeColumns(CacheDatabaseTable t) throws java.sql.SQLException
t
- the table to merge
java.sql.SQLException
- if the schemas conflictpublic java.util.ArrayList getColumns()
CacheDatabaseColumn
objects describing the
columns of this table.
Warning! The underlying ArrayList
is not synchronized.
ArrayList
of CacheDatabaseColumn
public CacheDatabaseColumn getColumn(java.lang.String columnName)
CacheDatabaseColumn
object matching the given
column name or null
if not found.
columnName
- column name to look for
CacheDatabaseColumn
value or null
public boolean equals(java.lang.Object other)
CacheDatabaseColumn
are equals if they have the same
name and the same columns.
other
- the object to compare with
public void addCacheEntry(AbstractResultCacheEntry ce)
AbstractResultCacheEntry
object whose consistency
depends on this table.
ce
- an AbstractResultCacheEntry
valuepublic void addPkCacheEntry(java.lang.String pk, AbstractResultCacheEntry ce)
AbstractResultCacheEntry
object associated to a pk
entry.
pk
- the pk entryce
- an AbstractResultCacheEntry
valuepublic AbstractResultCacheEntry getPkResultCacheEntry(java.lang.String pk)
CacheEntry
object associated to a pk entry.
pk
- the pk entry
public void removePkResultCacheEntry(java.lang.Object pk)
CacheEntry
object associated to a pk entry.
pk
- the pk entrypublic void invalidateAll()
public void invalidateAllExceptPk()
public java.lang.String getInformation(boolean longFormat)
longFormat
- true for a long format, false for a short summary
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |