org.objectweb.cjdbc.controller.cache.result.schema
Class CacheDatabaseColumn

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn

public class CacheDatabaseColumn
extends java.lang.Object

A CacheDatabaseColumn represents a column of a database table. It is composed of a DatabaseColumn object and an ArrayList of cache entries.

Version:
1.0
Author:
Emmanuel Cecchet , Julie Marguerite , Sara Bouchenak

Field Summary
private  java.util.ArrayList cacheEntries
           
private  java.lang.String name
           
 
Constructor Summary
CacheDatabaseColumn(java.lang.String name)
          Creates a new CacheDatabaseColumn instance.
 
Method Summary
 void addCacheEntry(AbstractResultCacheEntry ce)
          Adds an AbstractResultCacheEntry object whose consistency depends on this column.
 boolean equals(java.lang.Object other)
          Two CacheDatabaseColumn are equals if they have the same DatabaseColumn.
 java.lang.String getInformation()
          Returns the column name.
 java.lang.String getName()
          Gets the column name.
 void invalidateAll()
          Invalidates all cache entries depending on this column.
 void invalidateAllNonUnique()
          Invalidates all cache entries depending on this column that are non UNIQUE.
 void invalidateAllNonUniqueAndMarkDirtyUnique()
          Invalidates all cache entries depending on this column that are non UNIQUE and mark dirty UNIQUE queries.
 void invalidateAllUniqueWithValuesAndAllNonUnique(java.lang.String val, java.util.ArrayList columns, java.util.ArrayList values)
          Invalidates all cache entries depending on this column that are either non- unique or unique and associated with given values.
 void markDirtyAllNonUnique()
          Marks dirty all valid cache entries depending on this colum that are non unique.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name

cacheEntries

private java.util.ArrayList cacheEntries
Constructor Detail

CacheDatabaseColumn

public CacheDatabaseColumn(java.lang.String name)
Creates a new CacheDatabaseColumn instance.

Parameters:
name - name of the column
Method Detail

getName

public java.lang.String getName()
Gets the column name.

Returns:
the column name

equals

public boolean equals(java.lang.Object other)
Two CacheDatabaseColumn are equals if they have the same DatabaseColumn.

Parameters:
other - the object to compare with
Returns:
true if the objects are the same

addCacheEntry

public void addCacheEntry(AbstractResultCacheEntry ce)
Adds an AbstractResultCacheEntry object whose consistency depends on this column.

Parameters:
ce - a AbstractResultCacheEntry value

markDirtyAllNonUnique

public void markDirtyAllNonUnique()
Marks dirty all valid cache entries depending on this colum that are non unique.


invalidateAll

public void invalidateAll()
Invalidates all cache entries depending on this column.


invalidateAllNonUnique

public void invalidateAllNonUnique()
Invalidates all cache entries depending on this column that are non UNIQUE.


invalidateAllUniqueWithValuesAndAllNonUnique

public void invalidateAllUniqueWithValuesAndAllNonUnique(java.lang.String val,
                                                         java.util.ArrayList columns,
                                                         java.util.ArrayList values)
Invalidates all cache entries depending on this column that are either non- unique or unique and associated with given values.

Parameters:
val - a String representing the value of the current column.
columns - an ArrayList of CacheDatabaseColumn objects
values - an ArrayList of String objects representing values.

invalidateAllNonUniqueAndMarkDirtyUnique

public void invalidateAllNonUniqueAndMarkDirtyUnique()
Invalidates all cache entries depending on this column that are non UNIQUE and mark dirty UNIQUE queries.


getInformation

public java.lang.String getInformation()
Returns the column name.

Returns:
a String value


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.