private int createNewPropertyIndex( String stringKey )
{
PropertyIndexStore idxStore = getPropertyIndexStore();
int keyId = (int) idxStore.nextId();
PropertyIndexRecord record = new PropertyIndexRecord( keyId );
record.setInUse( true );
record.setCreated();
int keyBlockId = idxStore.nextKeyBlockId();
record.setKeyBlockId( keyBlockId );
int length = stringKey.length();
char[] chars = new char[length];
stringKey.getChars( 0, length, chars, 0 );
Collection<DynamicRecord> keyRecords =
idxStore.allocateKeyRecords( keyBlockId, chars );
for ( DynamicRecord keyRecord : keyRecords )
{
record.addKeyRecord( keyRecord );
}
idxStore.updateRecord( record );
indexHolder.addPropertyIndex( stringKey, keyId );
return keyId;
}