Examples of CacheIndex


Examples of com.cetsoft.imcache.cache.search.index.CacheIndex

   *
   * @param criteria the criteria
   * @return the list
   */
  protected List<Object> executeArithmetic(ArithmeticCriteria arithmeticCriteria) {
    CacheIndex cacheIndex = indexes.get(arithmeticCriteria.getAttributeName());
    if (cacheIndex == null) {
      throw new IndexNotFoundException();
    }
    return arithmeticCriteria.meets(cacheIndex);
  }
View Full Code Here

Examples of com.cetsoft.imcache.cache.search.index.CacheIndex

  }
 
  protected List<Object> execute(Criteria criteria){
    if(criteria instanceof ArithmeticCriteria){
      ArithmeticCriteria arithmeticCriteria = ((ArithmeticCriteria)criteria);
      CacheIndex cacheIndex = indexes.get(arithmeticCriteria.getAttributeName());
      if(cacheIndex==null){
        throw new IndexNotFoundException();
      }
      return arithmeticCriteria.meets(cacheIndex);
    }
View Full Code Here

Examples of org.eclipse.persistence.descriptors.CacheIndex

     */
    public void process(MetadataDescriptor descriptor, String defaultColumnName) {
        if (m_columnNames.isEmpty() && (defaultColumnName != null)) {
            descriptor.getClassDescriptor().getCachePolicy().addCacheIndex(defaultColumnName);
        } else {
            CacheIndex index = new CacheIndex();
            if (this.updateable != null) {
                index.setIsUpdateable(this.updateable);
            }
            for (String column : m_columnNames) {
                index.addFieldName(column);
            }
            descriptor.getClassDescriptor().getCachePolicy().addCacheIndex(index);           
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.descriptors.CacheIndex

     */
    public void process(MetadataDescriptor descriptor, String defaultColumnName) {
        if (m_columnNames.isEmpty() && (defaultColumnName != null)) {
            descriptor.getClassDescriptor().getCachePolicy().addCacheIndex(defaultColumnName);
        } else {
            CacheIndex index = new CacheIndex();
            if (this.updateable != null) {
                index.setIsUpdateable(this.updateable);
            }
            for (String column : m_columnNames) {
                index.addFieldName(column);
            }
            descriptor.getClassDescriptor().getCachePolicy().addCacheIndex(index);           
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.descriptors.CacheIndex

            } else if (m_project.getShouldForceFieldNamesToUpperCase() && !field.shouldUseDelimiters()) {
                field.useUpperCaseForComparisons(true);
            }
            cachePolicy.addCacheIndex(new DatabaseField[] {field});
        } else {
            CacheIndex index = new CacheIndex();
            if (this.updateable != null) {
                index.setIsUpdateable(this.updateable);
            }
            for (String column : m_columnNames) {
                index.addFieldName(column);
            }
            descriptor.getClassDescriptor().getCachePolicy().addCacheIndex(index);           
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.descriptors.CacheIndex

                        databaseSession.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_change_event", changeEvent);
                        if (changeEvent.getTableChangeDescription() != null) {
                            for (TableChangeDescription tableChange : changeEvent.getTableChangeDescription()) {
                                ClassDescriptor descriptor = OracleChangeNotificationListener.this.descriptorsByTable.get(new DatabaseTable(tableChange.getTableName()));
                                if (descriptor != null) {
                                    CacheIndex index = descriptor.getCachePolicy().getCacheIndex(fields);                               
                                    for (RowChangeDescription rowChange : tableChange.getRowChangeDescription()) {
                                        CacheId id = new CacheId(new Object[]{rowChange.getRowid().stringValue()});
                                        CacheKey key = databaseSession.getIdentityMapAccessorInstance().getIdentityMapManager().getCacheKeyByIndex(
                                                index, id, true, descriptor);
                                        if (key != null) {
View Full Code Here

Examples of org.eclipse.persistence.descriptors.CacheIndex

        }
        final DatabaseField rowId = descriptor.buildField(new DatabaseField(ROWID));
        final List<DatabaseField> fields = new ArrayList<DatabaseField>();
        fields.add(rowId);
        // May already have the index if has inheritance.
        CacheIndex existingIndex = descriptor.getCachePolicy().getCacheIndex(fields);
        if (existingIndex == null) {
            if (descriptor.isChildDescriptor()) {
                existingIndex = descriptor.getInheritancePolicy().getRootParentDescriptor().getCachePolicy().getCacheIndex(fields);
            }
            if (existingIndex == null) {
                existingIndex = new CacheIndex(fields);
                existingIndex.setIsUpdateable(false);
                existingIndex.setIsInsertable(false);
            }
            descriptor.getCachePolicy().addCacheIndex(existingIndex);
        }
       
        final CacheIndex index = existingIndex;
        rowId.setInsertable(false);
        rowId.setUpdatable(false);
        rowId.setCreatable(false);
        descriptor.getFields().add(rowId);
        descriptor.getAllFields().add(rowId);
View Full Code Here

Examples of org.eclipse.persistence.descriptors.CacheIndex

     */
    public void process(MetadataDescriptor descriptor, String defaultColumnName) {
        if (m_columnNames.isEmpty() && (defaultColumnName != null)) {
            descriptor.getClassDescriptor().getCachePolicy().addCacheIndex(defaultColumnName);
        } else {
            CacheIndex index = new CacheIndex();
            if (this.updateable != null) {
                index.setIsUpdateable(this.updateable);
            }
            for (String column : m_columnNames) {
                index.addFieldName(column);
            }
            descriptor.getClassDescriptor().getCachePolicy().addCacheIndex(index);           
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.descriptors.CacheIndex

                        databaseSession.log(SessionLog.FINEST, SessionLog.CONNECTION, "dcn_change_event", changeEvent);
                        if (changeEvent.getTableChangeDescription() != null) {
                            for (TableChangeDescription tableChange : changeEvent.getTableChangeDescription()) {
                                ClassDescriptor descriptor = OracleChangeNotificationListener.this.descriptorsByTable.get(new DatabaseTable(tableChange.getTableName()));
                                if (descriptor != null) {
                                    CacheIndex index = descriptor.getCachePolicy().getCacheIndex(fields);                               
                                    for (RowChangeDescription rowChange : tableChange.getRowChangeDescription()) {
                                        CacheId id = new CacheId(new Object[]{rowChange.getRowid().stringValue()});
                                        CacheKey key = databaseSession.getIdentityMapAccessorInstance().getIdentityMapManager().getCacheKeyByIndex(
                                                index, id, true, descriptor);
                                        if (key != null) {
View Full Code Here

Examples of org.eclipse.persistence.descriptors.CacheIndex

        }
        final DatabaseField rowId = descriptor.buildField(new DatabaseField(ROWID));
        final List<DatabaseField> fields = new ArrayList<DatabaseField>();
        fields.add(rowId);
        // May already have the index if has inheritance.
        CacheIndex existingIndex = descriptor.getCachePolicy().getCacheIndex(fields);
        if (existingIndex == null) {
            if (descriptor.isChildDescriptor()) {
                existingIndex = descriptor.getInheritancePolicy().getRootParentDescriptor().getCachePolicy().getCacheIndex(fields);
            }
            if (existingIndex == null) {
                existingIndex = new CacheIndex(fields);
                existingIndex.setIsUpdateable(false);
                existingIndex.setIsInsertable(false);
            }
            descriptor.getCachePolicy().addCacheIndex(existingIndex);
        }
       
        final CacheIndex index = existingIndex;
        rowId.setInsertable(false);
        rowId.setUpdatable(false);
        rowId.setCreatable(false);
        descriptor.getFields().add(rowId);
        descriptor.getAllFields().add(rowId);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.