private boolean groupIsEmpty( RelationshipGroupRecord group ) { return group.getFirstOut() == Record.NO_NEXT_RELATIONSHIP.intValue() && group.getFirstIn() == Record.NO_NEXT_RELATIONSHIP.intValue() && group.getFirstLoop() == Record.NO_NEXT_RELATIONSHIP.intValue(); }
private static void populateTokenRecord( TokenRecord record, int nameId ) { record.setInUse( true ); record.setNameId( nameId ); record.setCreated(); DynamicRecord dynamicRecord = new DynamicRecord( nameId ); dynamicRecord.setInUse( true ); dynamicRecord.setData( new byte[10] ); dynamicRecord.setCreated(); record.addNameRecord( dynamicRecord ); }
private RelationshipTypeTokenRecord createRelationshipTypeTokenRecord( int id ) { RelationshipTypeTokenRecord relationshipTypeTokenRecord = new RelationshipTypeTokenRecord( id ); relationshipTypeTokenRecord.setInUse( true ); relationshipTypeTokenRecord.setNameId( 333 ); relationshipTypeTokenRecord.addNameRecord( new DynamicRecord( 43 ) ); return relationshipTypeTokenRecord; }
private LabelTokenRecord createLabelTokenRecord( int id ) { LabelTokenRecord labelTokenRecord = new LabelTokenRecord( id ); labelTokenRecord.setInUse( true ); labelTokenRecord.setNameId( 333 ); labelTokenRecord.addNameRecord( new DynamicRecord( 43 ) ); return labelTokenRecord; }
@Override long get( RelationshipRecord rel ) { return rel.isFirstInFirstChain() ? Record.NO_NEXT_RELATIONSHIP.intValue() : rel.getFirstPrevRel(); }
public static DirectionWrapper wrapDirection( RelationshipRecord rel, NodeRecord startNode ) { boolean isOut = rel.getFirstNode() == startNode.getId(); boolean isIn = rel.getSecondNode() == startNode.getId(); assert isOut | isIn; if ( isOut & isIn ) { return DirectionWrapper.BOTH; } return isOut ? DirectionWrapper.OUTGOING : DirectionWrapper.INCOMING; } }
private static RelationshipRecord relationship( long id, long startNodeId, long endNodeId ) { return new RelationshipRecord( id ).initialize( true, Record.NO_NEXT_PROPERTY.longValue(), startNodeId, endNodeId, 0, NULL_REFERENCE.longValue(), NULL_REFERENCE.longValue(), NULL_REFERENCE.longValue(), NULL_REFERENCE.longValue(), false, false ); } }
@Override public boolean endOfChain( RelationshipRecord rel ) { return rel.getFirstNextRel() == Record.NO_NEXT_RELATIONSHIP.intValue(); } },
@Override public boolean endOfChain( RelationshipRecord rel ) { return rel.getSecondNextRel() == Record.NO_NEXT_RELATIONSHIP.intValue(); } },
public void setPropertyBlock( PropertyBlock block ) { removePropertyBlock( block.getKeyIndexId() ); addPropertyBlock( block ); }
@Override public void clear() { initialize( false, NO_NEXT_PROPERTY.intValue(), -1, -1, -1, 1, NO_NEXT_RELATIONSHIP.intValue(), 1, NO_NEXT_RELATIONSHIP.intValue(), true, true ); }
@Override public void clear() { initialize( false, true, Record.NO_NEXT_BLOCK.intValue(), -1, 0 ); }
@Override public void clear() { super.initialize( false ); this.entityId = -1; this.entityType = 0; this.prevProp = NO_PREVIOUS_PROPERTY.intValue(); this.nextProp = NO_NEXT_PROPERTY.intValue(); this.deletedRecords = null; this.blockRecordsCursor = blocksCursor = 0; this.blocksLoaded = false; }
@Override public void clear() { initialize( false, Record.NO_NEXT_BLOCK.intValue() ); }
private void assertEqualityByDescriptor( UniquenessConstraintDescriptor descriptor ) { ConstraintRule rule1 = ConstraintRule.constraintRule( RULE_ID, descriptor, RULE_ID_2 ); ConstraintRule rule2 = ConstraintRule.constraintRule( RULE_ID_2, descriptor ); assertEquality( rule1, rule2 ); }
private RelationshipRecord getRelationship( long relId, boolean inUse, int type ) { return new RelationshipRecord( relId ).initialize( inUse, NO_NEXT_PROPERTY.longValue(), 0, 0, type, NO_NEXT_RELATIONSHIP.longValue(), NO_NEXT_RELATIONSHIP.longValue(), NO_NEXT_RELATIONSHIP.longValue(), NO_NEXT_RELATIONSHIP.longValue(), true, false ); } }