.append( ",used=" ).append( inUse() ).append( ',' ) .append( '(' ).append( length ).append( "),type=" ); PropertyType type = getType(); if ( type == null )
static PropertyBlock propertyBlock( PropertyKeyTokenRecord key, DynamicRecord value ) { PropertyType type = value.getType(); if ( value.getType() != PropertyType.STRING && value.getType() != PropertyType.ARRAY ) { fail( "Dynamic record must be either STRING or ARRAY" ); return null; } return propertyBlock( key, type, value.getId() ); }
private void updateDynamicRecords( List<DynamicRecord> records ) { for ( DynamicRecord valueRecord : records ) { PropertyType recordType = valueRecord.getType(); if ( recordType == PropertyType.STRING ) { stringStore.updateRecord( valueRecord ); } else if ( recordType == PropertyType.ARRAY ) { arrayStore.updateRecord( valueRecord ); } else { throw new InvalidRecordException( "Unknown dynamic record" + valueRecord ); } } }
@Override protected void assertRecordsEqual( DynamicRecord actualRecord, DynamicRecord expectedRecord ) { assertNotNull( "actualRecord", actualRecord ); assertNotNull( "expectedRecord", expectedRecord ); assertThat( "getData", actualRecord.getData(), is( expectedRecord.getData() ) ); assertThat( "getLength", actualRecord.getLength(), is( expectedRecord.getLength() ) ); assertThat( "getNextBlock", actualRecord.getNextBlock(), is( expectedRecord.getNextBlock() ) ); assertThat( "getType", actualRecord.getType(), is( expectedRecord.getType() ) ); assertThat( "getId", actualRecord.getId(), is( expectedRecord.getId() ) ); assertThat( "getLongId", actualRecord.getId(), is( expectedRecord.getId() ) ); assertThat( "isStartRecord", actualRecord.isStartRecord(), is( expectedRecord.isStartRecord() ) ); } }
assertThat( "[" + i + "]getLength", actualNameRecord.getLength(), is( expectedNameRecord.getLength() ) ); assertThat( "[" + i + "]getNextBlock", actualNameRecord.getNextBlock(), is( expectedNameRecord.getNextBlock() ) ); assertThat( "[" + i + "]getType", actualNameRecord.getType(), is( expectedNameRecord.getType() ) ); assertThat( "[" + i + "]getId", actualNameRecord.getId(), is( expectedNameRecord.getId() ) ); assertThat( "[" + i + "]getLongId", actualNameRecord.getId(), is( expectedNameRecord.getId() ) );
assertThat( "[" + index + "]getValueRecords[" + i + "]getNextBlock", actualValueRecord.getNextBlock(), is( expectedValueRecord.getNextBlock() ) ); assertThat( "[" + index + "]getValueRecords[" + i + "]getType", actualValueRecord.getType(), is( expectedValueRecord.getType() ) ); assertThat( "[" + index + "]getValueRecords[" + i + "]getId", actualValueRecord.getId(), is( expectedValueRecord.getId() ) );
.append( ",used=" ).append( inUse() ).append( ',' ) .append( '(' ).append( length ).append( "),type=" ); PropertyType type = getType(); if ( type == null )
private void updateDynamicRecords( List<DynamicRecord> records ) { for ( DynamicRecord valueRecord : records ) { PropertyType recordType = valueRecord.getType(); if ( recordType == PropertyType.STRING ) { stringStore.updateRecord( valueRecord ); } else if ( recordType == PropertyType.ARRAY ) { arrayStore.updateRecord( valueRecord ); } else { throw new InvalidRecordException( "Unknown dynamic record" + valueRecord ); } } }
static PropertyBlock propertyBlock( PropertyKeyTokenRecord key, DynamicRecord value ) { PropertyType type; if ( value.getType() == PropertyType.STRING.intValue() ) { type = PropertyType.STRING; } else if ( value.getType() == PropertyType.ARRAY.intValue() ) { type = PropertyType.ARRAY; } else { fail( "Dynamic record must be either STRING or ARRAY" ); return null; } return propertyBlock( key, type, value.getId() ); }