}
@Override
public void setNodeProperties( long node, Map<String, Object> properties )
{
NodeRecord record = getNodeRecord( node );
if ( record.getNextProp() != Record.NO_NEXT_PROPERTY.intValue() )
{
deletePropertyChain( record.getNextProp() );
/*
* Batch inserter does not make any attempt to maintain the store's
* integrity. It makes sense however to keep some things intact where
* the cost is relatively low. So here, when we delete the property
* chain we first make sure that the node record (or the relationship
* record below) does not point anymore to the deleted properties. This
* way, if during creation, something goes wrong, it will not have the properties
* expected instead of throwing invalid record exceptions.
*/
record.setNextProp( Record.NO_NEXT_PROPERTY.intValue() );
getNodeStore().updateRecord( record );
}
record.setNextProp( createPropertyChain( properties ) );
getNodeStore().updateRecord( record );
}