예제 #1
0
 void commit(Transaction tx) {
   if (tx != null) {
     TxCommitHook hook = txCommitHooks.remove(tx);
     if (hook != null) {
       for (PropertyIndex index : hook.getAddedPropertyIndexes()) {
         addPropertyIndex(index);
       }
     }
   }
 }
예제 #2
0
 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;
 }
예제 #3
0
 void addPropertyIndexes(NameData[] indexes) {
   for (NameData rawIndex : indexes) {
     addPropertyIndex(new PropertyIndex(rawIndex.getName(), rawIndex.getId()));
   }
 }
예제 #4
0
 void addPropertyIndex(NameData rawIndex) {
   addPropertyIndex(new PropertyIndex(rawIndex.getName(), rawIndex.getId()));
 }
 void addPropertyIndex(PropertyIndexData index) {
   propertyIndexManager.addPropertyIndex(index);
 }