void commit(Transaction tx) { if (tx != null) { TxCommitHook hook = txCommitHooks.remove(tx); if (hook != null) { for (PropertyIndex index : hook.getAddedPropertyIndexes()) { addPropertyIndex(index); } } } }
public PropertyIndex getIndexFor(int keyId) { PropertyIndex index = idToIndexMap.get(keyId); if (index == null) { TxCommitHook commitHook = txCommitHooks.get(getTransaction()); if (commitHook != null) { index = commitHook.getIndex(keyId); if (index != null) { return index; } } String indexString; indexString = persistenceManager.loadIndex(keyId); if (indexString == null) { throw new NotFoundException("Index not found [" + keyId + "]"); } index = new PropertyIndex(indexString, keyId); addPropertyIndex(index); } return index; }
void addPropertyIndexes(NameData[] indexes) { for (NameData rawIndex : indexes) { addPropertyIndex(new PropertyIndex(rawIndex.getName(), rawIndex.getId())); } }
void addPropertyIndex(NameData rawIndex) { addPropertyIndex(new PropertyIndex(rawIndex.getName(), rawIndex.getId())); }
void addPropertyIndex(PropertyIndexData index) { propertyIndexManager.addPropertyIndex(index); }