return propertyRecord.getType().getValue( propertyRecord, getPropertyStore() );
}
void nodeRemoveProperty( long nodeId, long propertyId )
{
NodeRecord nodeRecord = getNodeRecord( nodeId );
if ( nodeRecord == null )
{
nodeRecord = getNodeStore().getRecord( nodeId );
}
if ( !nodeRecord.inUse() )
{
throw new IllegalStateException( "Property remove on node[" +
nodeId + "] illegal since it has been deleted." );
}
PropertyRecord propRecord = getPropertyRecord( propertyId );
if ( propRecord == null )
{
propRecord = getPropertyStore().getRecord( propertyId );
addPropertyRecord( propRecord );
}
if ( !propRecord.inUse() )
{
throw new IllegalStateException( "Unable to delete property[" +
propertyId + "] since it is already deleted." );
}
propRecord.setNodeId( nodeId );
if ( propRecord.isLight() )
{
getPropertyStore().makeHeavy( propRecord );
}
propRecord.setInUse( false );
// TODO: update count on property index record
for ( DynamicRecord valueRecord : propRecord.getValueRecords() )
{
if ( valueRecord.inUse() )
{
valueRecord.setInUse( false, propRecord.getType().intValue() );
}
}
long prevProp = propRecord.getPrevProp();
long nextProp = propRecord.getNextProp();
if ( nodeRecord.getNextProp() == propertyId )
{
nodeRecord.setNextProp( nextProp );
// re-adding not a problem
addNodeRecord( nodeRecord );
}
if ( prevProp != Record.NO_PREVIOUS_PROPERTY.intValue() )
{