コード例 #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()));
 }
コード例 #5
0
 void addPropertyIndex(PropertyIndexData index) {
   propertyIndexManager.addPropertyIndex(index);
 }