private RelationshipTypeTokenRecord createRelationshipTypeTokenRecord( int id ) { RelationshipTypeTokenRecord relationshipTypeTokenRecord = new RelationshipTypeTokenRecord( id ); relationshipTypeTokenRecord.setInUse( true ); relationshipTypeTokenRecord.setNameId( 333 ); relationshipTypeTokenRecord.addNameRecord( new DynamicRecord( 43 ) ); return relationshipTypeTokenRecord; }
private RelationshipTypeTokenRecord readRelationshipTypeTokenRecord( int id, ReadableChannel channel ) throws IOException { // in_use(byte)+type_blockId(int)+nr_type_records(int) byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord( id ); record.setInUse( inUse ); record.setNameId( channel.getInt() ); int nrTypeRecords = channel.getInt(); for ( int i = 0; i < nrTypeRecords; i++ ) { DynamicRecord dr = readDynamicRecord( channel ); if ( dr == null ) { return null; } record.addNameRecord( dr ); } return record; }
private RelationshipTypeTokenRecord readRelationshipTypeTokenRecord( int id, ReadableChannel channel ) throws IOException { // in_use(byte)+type_blockId(int)+nr_type_records(int) byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord( id ); record.setInUse( inUse ); record.setNameId( channel.getInt() ); int nrTypeRecords = channel.getInt(); for ( int i = 0; i < nrTypeRecords; i++ ) { DynamicRecord dr = readDynamicRecord( channel ); if ( dr == null ) { return null; } record.addNameRecord( dr ); } return record; }
private Command visitRelationshipTypeTokenCommand( ReadableChannel channel ) throws IOException { // id+in_use(byte)+type_blockId(int)+nr_type_records(int) int id = channel.getInt(); byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord( id ); record.setInUse( inUse ); record.setNameId( channel.getInt() ); int nrTypeRecords = channel.getInt(); for ( int i = 0; i < nrTypeRecords; i++ ) { DynamicRecord dr = readDynamicRecord( channel ); if ( dr == null ) { return null; } record.addNameRecord( dr ); } return new Command.RelationshipTypeTokenCommand( null, record ); }
private Command visitRelationshipTypeTokenCommand( ReadableChannel channel ) throws IOException { // id+in_use(byte)+type_blockId(int)+nr_type_records(int) int id = channel.getInt(); byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord( id ); record.setInUse( inUse ); record.setNameId( channel.getInt() ); int nrTypeRecords = channel.getInt(); for ( int i = 0; i < nrTypeRecords; i++ ) { DynamicRecord dr = readDynamicRecord( channel ); if ( dr == null ) { return null; } record.addNameRecord( dr ); } return new Command.RelationshipTypeTokenCommand( null, record ); }
private RelationshipTypeTokenRecord readRelationshipTypeTokenRecord( int id, ReadableChannel channel ) throws IOException { // in_use(byte)+type_blockId(int)+nr_type_records(int) byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord( id ); record.setInUse( inUse ); record.setNameId( channel.getInt() ); int nrTypeRecords = channel.getInt(); for ( int i = 0; i < nrTypeRecords; i++ ) { DynamicRecord dr = readDynamicRecord( channel ); if ( dr == null ) { return null; } record.addNameRecord( dr ); } return record; }
private RelationshipTypeTokenRecord readRelationshipTypeTokenRecord( int id, ReadableChannel channel ) throws IOException { // in_use(byte)+type_blockId(int)+nr_type_records(int) byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord( id ); record.setInUse( inUse ); record.setNameId( channel.getInt() ); int nrTypeRecords = channel.getInt(); for ( int i = 0; i < nrTypeRecords; i++ ) { DynamicRecord dr = readDynamicRecord( channel ); if ( dr == null ) { return null; } record.addNameRecord( dr ); } return record; }
private Command visitRelationshipTypeTokenCommand( ReadableChannel channel ) throws IOException { // id+in_use(byte)+type_blockId(int)+nr_type_records(int) int id = channel.getInt(); byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord( id ); record.setInUse( inUse ); record.setNameId( channel.getInt() ); int nrTypeRecords = channel.getInt(); for ( int i = 0; i < nrTypeRecords; i++ ) { DynamicRecord dr = readDynamicRecord( channel ); if ( dr == null ) { return null; } record.addNameRecord( dr ); } return new Command.RelationshipTypeTokenCommand( null, record ); }
private Command visitRelationshipTypeTokenCommand( ReadableChannel channel ) throws IOException { // id+in_use(byte)+type_blockId(int)+nr_type_records(int) int id = channel.getInt(); byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } RelationshipTypeTokenRecord record = new RelationshipTypeTokenRecord( id ); record.setInUse( inUse ); record.setNameId( channel.getInt() ); int nrTypeRecords = channel.getInt(); for ( int i = 0; i < nrTypeRecords; i++ ) { DynamicRecord dr = readDynamicRecord( channel ); if ( dr == null ) { return null; } record.addNameRecord( dr ); } return new Command.RelationshipTypeTokenCommand( null, record ); }