*/
public synchronized Row fetch( final int recordId )
throws DBException,
RSException, RecordStoreFullException
{
final SimpleCache cache = this.cache;
Row row = (Row) cache.get( Integer.toString( recordId ) );
if( row != null )
{
// Sanitiy check, if for any reason the cache returns an invalid object
if(
row.getRecordId() != null &&
row.getRecordId().intValue() == recordId
)
{
return row.cloneRow();
}
else
{
cache.clear();
}
}
row = getRowFromStore( recordId, false );
cache.add( Integer.toString( recordId ), row );
return row.cloneRow();
}