)
throws DBException,
RSException,
RecordStoreFullException
{
final Log log = Table.log;
try
{
open();
final byte[] data;
try
{
data = rs.getRecord( recordId );
}
catch( InvalidRecordIDException e )
{
log.error( "Row does not exist: " + recordId );
ErrorLog.addError(
"Table",
"getRowFromStore",
new Object[] { new Integer( recordId ) },
tableInfo.getName(),
e
);
throw new RecordNotFoundException(
Constants.ERR_TBL_GET_ROW_FROM_STORE,
"table.getRowFromStore(): " +
Integer.toString( recordId )
);
}
if( !fetchDeleted && data[Row.STATUS_BYTE] == Row.STATUS_DELETED )
{
log.warn( "Deleted row: " + recordId );
ErrorLog.addError(
"Table",
"getRowFromStore",
new Object[] { new Integer( recordId ) },
tableInfo.getName() + ": status deleted",
null
);
throw new RecordNotFoundException(
Constants.ERR_TBL_GET_ROW_FROM_STORE,
"table.getRowFromStore(): " +
Integer.toString( recordId )
);
}
final Row row = new Row( this );
row.setRecordId( recordId );
row.deserialize( new SerializerInputStream( new ByteArrayInputStream(
data
) ) );
return row;
}
catch( SerializationException e )
{
log.error( e );
ErrorLog.addError(
"Table",
"getRowFromStore",
new Object[] { new Integer( recordId ) },
tableInfo.getName(),