public void create( PropertyKeyTokenRecord token ) { token.setCreated(); update( new PropertyKeyTokenRecord( token.getIntId() ), token ); }
@Override public PropertyKeyTokenRecord clone() { PropertyKeyTokenRecord propertyKeyTokenRecord = new PropertyKeyTokenRecord( getIntId() ); propertyKeyTokenRecord.setInUse( inUse() ); if ( isCreated() ) { propertyKeyTokenRecord.setCreated(); } propertyKeyTokenRecord.setNameId( getNameId() ); propertyKeyTokenRecord.addNameRecords( getNameRecords() ); propertyKeyTokenRecord.setPropertyCount( getPropertyCount() ); return propertyKeyTokenRecord; } }
private int createNewPropertyKeyId( String stringKey ) { int keyId = (int) propertyKeyTokenStore.nextId(); PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( keyId ); record.setInUse( true ); record.setCreated(); Collection<DynamicRecord> keyRecords = propertyKeyTokenStore.allocateNameRecords( encodeString( stringKey ) ); record.setNameId( (int) Iterables.first( keyRecords ).getId() ); record.addNameRecords( keyRecords ); propertyKeyTokenStore.updateRecord( record ); tokenHolders.propertyKeyTokens().addToken( new NamedToken( stringKey, keyId ) ); return keyId; }
public void create( PropertyKeyTokenRecord token ) { token.setCreated(); update( token ); }
@Override public PropertyKeyTokenRecord clone() { PropertyKeyTokenRecord propertyKeyTokenRecord = new PropertyKeyTokenRecord( getIntId() ); propertyKeyTokenRecord.setInUse( inUse() ); if ( isCreated() ) { propertyKeyTokenRecord.setCreated(); } propertyKeyTokenRecord.setNameId( getNameId() ); propertyKeyTokenRecord.addNameRecords( getNameRecords() ); propertyKeyTokenRecord.setPropertyCount( getPropertyCount() ); return propertyKeyTokenRecord; } }
private int createNewPropertyKeyId( String stringKey ) { int keyId = (int) propertyKeyTokenStore.nextId(); PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( keyId ); record.setInUse( true ); record.setCreated(); Collection<DynamicRecord> keyRecords = propertyKeyTokenStore.allocateNameRecords( encodeString( stringKey ) ); record.setNameId( (int) Iterables.first( keyRecords ).getId() ); record.addNameRecords( keyRecords ); propertyKeyTokenStore.updateRecord( record ); tokenHolders.propertyKeyTokens().addToken( new NamedToken( stringKey, keyId ) ); return keyId; }