@Override public long valueFrom( RECORD record ) { return record.getNextProp(); }
@Override public void check( RECORD record, CheckerEngine<RECORD, REPORT> engine, RecordAccess records ) { if ( !record.inUse() ) { return; } for ( RecordField<RECORD, REPORT> field : fields ) { field.checkConsistency( record, engine, records ); } }
@Override public boolean equals( Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } if ( !super.equals( o ) ) { return false; } RelationshipRecord that = (RelationshipRecord) o; return firstNode == that.firstNode && secondNode == that.secondNode && type == that.type && firstPrevRel == that.firstPrevRel && firstNextRel == that.firstNextRel && secondPrevRel == that.secondPrevRel && secondNextRel == that.secondNextRel && firstInFirstChain == that.firstInFirstChain && firstInSecondChain == that.firstInSecondChain; }
public void deletePropertyChain( PrimitiveRecord primitive, RecordAccess<PropertyRecord, PrimitiveRecord> propertyRecords ) { long nextProp = primitive.getNextProp(); while ( nextProp != Record.NO_NEXT_PROPERTY.intValue() ) { RecordProxy<PropertyRecord, PrimitiveRecord> propertyChange = propertyRecords.getOrLoad( nextProp, primitive ); // TODO forChanging/forReading piggy-backing PropertyRecord propRecord = propertyChange.forChangingData(); deletePropertyRecordIncludingValueRecords( propRecord ); nextProp = propRecord.getNextProp(); propRecord.setChanged( primitive ); } primitive.setNextProp( Record.NO_NEXT_PROPERTY.intValue() ); }
@Override @SuppressWarnings( "unchecked" ) public void check( RECORD record, CheckerEngine<RECORD, REPORT> engine, RecordAccess records ) { if ( record.inUse() ) { long prop = record.getNextProp(); if ( !Record.NO_NEXT_PROPERTY.is( prop ) ) { PropertyOwner previous = owners.put( prop, owner( record ) ); if ( previous != null ) { engine.comparativeCheck( previous.record( records ), checker.ownerCheck() ); } } } checker.check( record, engine, records ); }
public PropertyRecord( long id, PrimitiveRecord primitive ) { super( id ); primitive.setIdTo( this ); }
@Override public NeoStoreRecord initialize( boolean inUse, long nextProp ) { super.initialize( inUse, nextProp ); return this; }
@Override public int hashCode() { return Objects.hash( super.hashCode(), firstNode, secondNode, type, firstPrevRel, firstNextRel, secondPrevRel, secondNextRel, firstInFirstChain, firstInSecondChain ); } }
long prop = primitive.getNextProp(); while ( prop != Record.NO_NEXT_PROPERTY.intValue() ) // <-- (4) if ( primitive.getNextProp() != Record.NO_NEXT_PROPERTY.intValue() ) PropertyRecord prevProp = propertyRecords.getOrLoad( primitive.getNextProp(), primitive ).forChangingLinkage(); assert prevProp.getPrevProp() == Record.NO_PREVIOUS_PROPERTY.intValue(); primitiveRecordChange.forChangingLinkage().setNextProp( freeHost.getId() );
if ( !entity.inUse() ) long firstPropertyId = entity.getNextProp(); if ( firstPropertyId == Record.NO_NEXT_PROPERTY.intValue() )
private void setOwner( PropertyRecord record, PrimitiveRecord owner ) { if ( owner != null ) { owner.setIdTo( record ); } }
public RelationshipRecord initialize( boolean inUse, long nextProp, long firstNode, long secondNode, int type, long firstPrevRel, long firstNextRel, long secondPrevRel, long secondNextRel, boolean firstInFirstChain, boolean firstInSecondChain ) { super.initialize( inUse, nextProp ); this.firstNode = firstNode; this.secondNode = secondNode; this.type = type; this.firstPrevRel = firstPrevRel; this.firstNextRel = firstNextRel; this.secondPrevRel = secondPrevRel; this.secondNextRel = secondNextRel; this.firstInFirstChain = firstInFirstChain; this.firstInSecondChain = firstInSecondChain; return this; }
@Override public int hashCode() { return Objects.hash( super.hashCode(), firstNode, secondNode, type, firstPrevRel, firstNextRel, secondPrevRel, secondNextRel, firstInFirstChain, firstInSecondChain ); } }
long prevProp = propRecord.getPrevProp(); long nextProp = propRecord.getNextProp(); if ( primitive.getNextProp() == propRecord.getId() ) primitiveRecordChange.forChangingLinkage().setNextProp( nextProp );
if ( !entity.inUse() ) long firstPropertyId = entity.getNextProp(); if ( firstPropertyId == Record.NO_NEXT_PROPERTY.intValue() )
long nextIdToFetch = primitive.getNextProp(); while ( nextIdToFetch != Record.NO_NEXT_PROPERTY.intValue() ) assert primitive.getNextProp() == Record.NO_NEXT_PROPERTY.intValue() : primitive; return true;
public void setChanged( PrimitiveRecord primitive ) { primitive.setIdTo( this ); }
public NodeRecord initialize( boolean inUse, long nextProp, boolean dense, long nextRel, long labels ) { super.initialize( inUse, nextProp ); this.nextRel = nextRel; this.dense = dense; this.labels = labels; this.dynamicLabelRecords = emptyList(); this.isLight = true; return this; }
@Override public boolean equals( Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } if ( !super.equals( o ) ) { return false; } RelationshipRecord that = (RelationshipRecord) o; return firstNode == that.firstNode && secondNode == that.secondNode && type == that.type && firstPrevRel == that.firstPrevRel && firstNextRel == that.firstNextRel && secondPrevRel == that.secondPrevRel && secondNextRel == that.secondNextRel && firstInFirstChain == that.firstInFirstChain && firstInSecondChain == that.firstInSecondChain; }
public void deletePropertyChain( PrimitiveRecord primitive, RecordAccess<PropertyRecord, PrimitiveRecord> propertyRecords ) { long nextProp = primitive.getNextProp(); while ( nextProp != Record.NO_NEXT_PROPERTY.intValue() ) { RecordProxy<PropertyRecord, PrimitiveRecord> propertyChange = propertyRecords.getOrLoad( nextProp, primitive ); // TODO forChanging/forReading piggy-backing PropertyRecord propRecord = propertyChange.forChangingData(); deletePropertyRecordIncludingValueRecords( propRecord ); nextProp = propRecord.getNextProp(); propRecord.setChanged( primitive ); } primitive.setNextProp( Record.NO_NEXT_PROPERTY.intValue() ); }