@Override public String toString() { return "Relationship[" + getId() + ",used=" + inUse() + ",source=" + firstNode + ",target=" + secondNode + ",type=" + type + (firstInFirstChain ? ",sCount=" : ",sPrev=") + firstPrevRel + ",sNext=" + firstNextRel + (firstInSecondChain ? ",tCount=" : ",tPrev=") + secondPrevRel + ",tNext=" + secondNextRel + ",prop=" + getNextProp() + ",secondaryUnitId=" + getSecondaryUnitId() + (firstInFirstChain ? ", sFirst" : ",!sFirst") + (firstInSecondChain ? ", tFirst" : ",!tFirst") + "]"; }
@Override public RelationshipRecord clone() { RelationshipRecord record = new RelationshipRecord( getId() ).initialize( inUse(), nextProp, firstNode, secondNode, type, firstPrevRel, firstNextRel, secondPrevRel, secondNextRel, firstInFirstChain, firstInSecondChain ); record.setSecondaryUnitId( getSecondaryUnitId() ); return record; }
private void writeRelationshipRecord( WritableChannel channel, RelationshipRecord record ) throws IOException { byte flags = bitFlags( bitFlag( record.inUse(), Record.IN_USE.byteValue() ), bitFlag( record.isCreated(), Record.CREATED_IN_TX ), bitFlag( record.requiresSecondaryUnit(), Record.REQUIRE_SECONDARY_UNIT ), bitFlag( record.hasSecondaryUnitId(), Record.HAS_SECONDARY_UNIT ), bitFlag( record.isUseFixedReferences(), Record.USES_FIXED_REFERENCE_FORMAT ) ); channel.put( flags ); if ( record.inUse() ) { channel.putLong( record.getFirstNode() ).putLong( record.getSecondNode() ).putInt( record.getType() ) .putLong( record.getFirstPrevRel() ).putLong( record.getFirstNextRel() ) .putLong( record.getSecondPrevRel() ).putLong( record.getSecondNextRel() ) .putLong( record.getNextProp() ) .put( (byte) ((record.isFirstInFirstChain() ? 1 : 0) | (record.isFirstInSecondChain() ? 2 : 0)) ); if ( record.hasSecondaryUnitId() ) { channel.putLong( record.getSecondaryUnitId() ); } } else { channel.putInt( record.getType() ); } } }
assertEquals( relationship.getSecondaryUnitId() + 1, neoStores.getRelationshipStore().getHighId() ); assertEquals( relationshipGroup.getSecondaryUnitId() + 1, neoStores.getRelationshipGroupStore().getHighId() );
@Override public String toString() { return "Relationship[" + getId() + ",used=" + inUse() + ",source=" + firstNode + ",target=" + secondNode + ",type=" + type + (firstInFirstChain ? ",sCount=" : ",sPrev=") + firstPrevRel + ",sNext=" + firstNextRel + (firstInSecondChain ? ",tCount=" : ",tPrev=") + secondPrevRel + ",tNext=" + secondNextRel + ",prop=" + getNextProp() + ",secondaryUnitId=" + getSecondaryUnitId() + (firstInFirstChain ? ", sFirst" : ",!sFirst") + (firstInSecondChain ? ", tFirst" : ",!tFirst") + "]"; }
@Override public RelationshipRecord clone() { RelationshipRecord record = new RelationshipRecord( getId() ).initialize( inUse(), nextProp, firstNode, secondNode, type, firstPrevRel, firstNextRel, secondPrevRel, secondNextRel, firstInFirstChain, firstInSecondChain ); record.setSecondaryUnitId( getSecondaryUnitId() ); return record; }
private void writeRelationshipRecord( WritableChannel channel, RelationshipRecord record ) throws IOException { byte flags = bitFlags( bitFlag( record.inUse(), Record.IN_USE.byteValue() ), bitFlag( record.isCreated(), Record.CREATED_IN_TX ), bitFlag( record.requiresSecondaryUnit(), Record.REQUIRE_SECONDARY_UNIT ), bitFlag( record.hasSecondaryUnitId(), Record.HAS_SECONDARY_UNIT ), bitFlag( record.isUseFixedReferences(), Record.USES_FIXED_REFERENCE_FORMAT ) ); channel.put( flags ); if ( record.inUse() ) { channel.putLong( record.getFirstNode() ).putLong( record.getSecondNode() ).putInt( record.getType() ) .putLong( record.getFirstPrevRel() ).putLong( record.getFirstNextRel() ) .putLong( record.getSecondPrevRel() ).putLong( record.getSecondNextRel() ) .putLong( record.getNextProp() ) .put( (byte) ((record.isFirstInFirstChain() ? 1 : 0) | (record.isFirstInSecondChain() ? 2 : 0)) ); if ( record.hasSecondaryUnitId() ) { channel.putLong( record.getSecondaryUnitId() ); } } else { channel.putInt( record.getType() ); } } }