Examples of RelationshipTypeRecord


Examples of org.neo4j.kernel.impl.nioneo.store.RelationshipTypeRecord

    private int createNewRelationshipType( String name )
    {
        RelationshipTypeStore typeStore = getRelationshipTypeStore();
        int id = (int) typeStore.nextId();
        RelationshipTypeRecord record = new RelationshipTypeRecord( id );
        record.setInUse( true );
        record.setCreated();
        int nameId = typeStore.nextNameId();
        record.setNameId( nameId );
        Collection<DynamicRecord> nameRecords = typeStore.allocateNameRecords( nameId, encodeString( name ) );
        for ( DynamicRecord typeRecord : nameRecords )
        {
            record.addNameRecord( typeRecord );
        }
        typeStore.updateRecord( record );
        typeHolder.addRelationshipType( name, id );
        return id;
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.RelationshipTypeRecord

    private int createNewRelationshipType( String name )
    {
        RelationshipTypeStore typeStore = getRelationshipTypeStore();
        int id = (int) typeStore.nextId();
        RelationshipTypeRecord record = new RelationshipTypeRecord( id );
        record.setInUse( true );
        record.setCreated();
        int nameId = typeStore.nextNameId();
        record.setNameId( nameId );
        Collection<DynamicRecord> nameRecords = typeStore.allocateNameRecords( nameId, encodeString( name ) );
        for ( DynamicRecord typeRecord : nameRecords )
        {
            record.addNameRecord( typeRecord );
        }
        typeStore.updateRecord( record );
        typeHolder.addRelationshipType(name, id);
        return id;
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.RelationshipTypeRecord

        }
        else if ( inUseFlag != Record.NOT_IN_USE.byteValue() )
        {
            throw new IOException( "Illegal in use flag: " + inUseFlag );
        }
        RelationshipTypeRecord record = new RelationshipTypeRecord( id );
        record.setInUse( inUse );
        record.setTypeBlock( buffer.getInt() );
        int nrTypeRecords = buffer.getInt();
        for ( int i = 0; i < nrTypeRecords; i++ )
        {
            DynamicRecord dr = readDynamicRecord( byteChannel, buffer );
            if ( dr == null )
            {
                return null;
            }
            record.addTypeRecord( dr );
        }
        return new Command( record );
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.RelationshipTypeRecord

            }
            else if ( inUseFlag != Record.NOT_IN_USE.byteValue() )
            {
                throw new IOException( "Illegal in use flag: " + inUseFlag );
            }
            RelationshipTypeRecord record = new RelationshipTypeRecord( id );
            record.setInUse( inUse );
            record.setTypeBlock( buffer.getInt() );
            int nrTypeRecords = buffer.getInt();
            for ( int i = 0; i < nrTypeRecords; i++ )
            {
                DynamicRecord dr = readDynamicRecord( byteChannel, buffer );
                if ( dr == null )
                {
                    return null;
                }
                record.addTypeRecord( dr );
            }
            return new RelationshipTypeCommand(
                neoStore.getRelationshipTypeStore(), record );
        }
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.RelationshipTypeRecord

    private int createNewRelationshipType( String name )
    {
        RelationshipTypeStore typeStore = getRelationshipTypeStore();
        int id = (int) typeStore.nextId();
        RelationshipTypeRecord record = new RelationshipTypeRecord( id );
        record.setInUse( true );
        record.setCreated();
        int typeBlockId = (int) typeStore.nextBlockId();
        record.setTypeBlock( typeBlockId );
        int length = name.length();
        char[] chars = new char[length];
        name.getChars( 0, length, chars, 0 );
        Collection<DynamicRecord> typeRecords =
            typeStore.allocateTypeNameRecords( typeBlockId, chars );
        for ( DynamicRecord typeRecord : typeRecords )
        {
            record.addTypeRecord( typeRecord );
        }
        typeStore.updateRecord( record );
        typeHolder.addRelationshipType( name, id );
        return id;
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.RelationshipTypeRecord

        addPropertyIndexRecord( record );
    }

    void relationshipTypeAdd( int id, String name )
    {
        RelationshipTypeRecord record = new RelationshipTypeRecord( id );
        record.setInUse( true );
        record.setCreated();
        int blockId = (int) getRelationshipTypeStore().nextBlockId();
        record.setTypeBlock( blockId );
        int length = name.length();
        char[] chars = new char[length];
        name.getChars( 0, length, chars, 0 );
        Collection<DynamicRecord> typeNameRecords =
            getRelationshipTypeStore().allocateTypeNameRecords( blockId, chars );
        for ( DynamicRecord typeRecord : typeNameRecords )
        {
            record.addTypeRecord( typeRecord );
        }
        addRelationshipTypeRecord( record );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.