!newValue.equals( oldValue )
);
}
if( changed )
{
final Index index = (Index) indexMap.get(
tableInfo.getIndexInfo()[i].getFieldExpression()
);
index.delete( buildIndexValue( rowOld, fieldNames ), oldRecordId );
index.insert( buildIndexValue( rowNew, fieldNames ), newRecordId );
}
}
}
else if( rowNew != null )
{
// Add row to all indexes
for( int i = 0; i < indexCount; i++ )
{
final Index index = (Index) indexMap.get(
tableInfo.getIndexInfo()[i].getFieldExpression()
);
if( index != null )
{
index.insert(
buildIndexValue(
rowNew,
tableInfo.getIndexInfo()[i].getFieldNames()
),
newRecordId
);
}
}
}
else
{
// Remove from all indexes
for( int i = 0; i < indexCount; i++ )
{
final Index index = (Index) indexMap.get(
tableInfo.getIndexInfo()[i].getFieldExpression()
);
if( index != null )
{
index.delete(
buildIndexValue(
rowOld,
tableInfo.getIndexInfo()[i].getFieldNames()
),
oldRecordId