return propertyMap;
}
ArrayMap<Integer,PropertyData> relDelete( long id )
{
RelationshipRecord record = getRelationshipRecord( id );
if ( record == null )
{
record = getRelationshipStore().getRecord( id );
addRelationshipRecord( record );
}
if ( !record.inUse() )
{
throw new IllegalStateException( "Unable to delete relationship[" +
id + "] since it is already deleted." );
}
ArrayMap<Integer,PropertyData> propertyMap =
new ArrayMap<Integer,PropertyData>( 9, false, true );
long nextProp = record.getNextProp();
while ( nextProp != Record.NO_NEXT_PROPERTY.intValue() )
{
PropertyRecord propRecord = getPropertyRecord( nextProp );
if ( propRecord == null )
{
propRecord = getPropertyStore().getRecord( nextProp );
addPropertyRecord( propRecord );
}
if ( propRecord.isLight() )
{
getPropertyStore().makeHeavy( propRecord );
}
if ( !propRecord.isCreated() )
{
if ( !propRecord.isChanged() )
{
propertyMap.put( propRecord.getKeyIndexId(),
new PropertyData( propRecord.getId(),
propertyGetValueOrNull( propRecord ) ) );
}
else
{
// we have to re-read committed value since property has
// changed and old value is erased in memory
PropertyRecord diskValue = getPropertyStore().getRecord( propRecord.getId() );
getPropertyStore().makeHeavy( diskValue );
propertyMap.put( diskValue.getKeyIndexId(), new PropertyData(
diskValue.getId(), propertyGetValueOrNull( diskValue ) ) );
}
}
nextProp = propRecord.getNextProp();
propRecord.setInUse( false );
// TODO: update count on property index record
for ( DynamicRecord valueRecord : propRecord.getValueRecords() )
{
valueRecord.setInUse( false );
}
}
disconnectRelationship( record );
updateNodes( record );
record.setInUse( false );
return propertyMap;
}