|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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(CacheEntry ce)
Adds a CacheEntry object whose consistency depends on this
table. |
void |
addColumn(CacheDatabaseColumn column)
Adds a CacheDatabaseColumn object to this table.
|
void |
addPkCacheEntry(java.lang.String pk,
CacheEntry ce)
Adds a CacheEntry 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. |
ResultCacheEntry |
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 cache| Method 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 value
public 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 CacheDatabaseColumnpublic 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 nullpublic 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(CacheEntry ce)
CacheEntry object whose consistency depends on this
table.
ce - a CacheEntry value
public void addPkCacheEntry(java.lang.String pk,
CacheEntry ce)
CacheEntry object associated to a pk entry.
pk - the pk entryce - a CacheEntry valuepublic ResultCacheEntry 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 | ||||||||||