Пример #1
0
 private int createNewPropertyKeyId(String stringKey) {
   PropertyKeyTokenStore idxStore = getPropertyKeyTokenStore();
   int keyId = (int) idxStore.nextId();
   PropertyKeyTokenRecord record = new PropertyKeyTokenRecord(keyId);
   record.setInUse(true);
   record.setCreated();
   Collection<DynamicRecord> keyRecords = idxStore.allocateNameRecords(encodeString(stringKey));
   record.setNameId((int) first(keyRecords).getId());
   record.addNameRecords(keyRecords);
   idxStore.updateRecord(record);
   propertyKeyTokens.addToken(stringKey, keyId);
   return keyId;
 }