Package org.infinispan.objectfilter.impl.syntax

Examples of org.infinispan.objectfilter.impl.syntax.BooleanExpr


      return registerFilter(filterQuery.getJpqlString(), callback);
   }

   public FilterSubscription registerFilter(String jpaQuery, final FilterCallback callback) {
      FilterParsingResult<TypeMetadata> parsingResult = queryParser.parseQuery(jpaQuery, createFilterProcessingChain(null)); //todo [anistor] query params not yet supported
      BooleanExpr normalizedFilter = booleanFilterNormalizer.normalize(parsingResult.getQuery());

      write.lock();
      try {
         FilterRegistry filterRegistry = filtersByType.get(parsingResult.getTargetEntityName());
         if (filterRegistry == null) {
View Full Code Here


   }

   @Override
   public ObjectFilter getObjectFilter(String jpaQuery) {
      FilterParsingResult<TypeMetadata> parsingResult = parse(jpaQuery);
      BooleanExpr normalizedFilter = booleanFilterNormalizer.normalize(parsingResult.getQuery());
      return new ObjectFilterImpl<TypeMetadata, AttributeMetadata, AttributeId>(this, createMetadataAdapter(parsingResult.getTargetEntityMetadata()), jpaQuery, parsingResult, normalizedFilter);
   }
View Full Code Here

   }

   @Override
   public FilterSubscription registerFilter(String jpaQuery, FilterCallback callback) {
      FilterParsingResult<TypeMetadata> parsingResult = parse(jpaQuery);
      BooleanExpr normalizedFilter = booleanFilterNormalizer.normalize(parsingResult.getQuery());

      write.lock();
      try {
         FilterRegistry<TypeMetadata, AttributeMetadata, AttributeId> filterRegistry = filtersByTypeName.get(parsingResult.getTargetEntityName());
         if (filterRegistry == null) {
View Full Code Here

   }

   @Override
   public BooleanExpr getQuery() {
      // we always expect children.size() >= 1
      BooleanExpr firstChild = children.get(0).getQuery();
      if (children.size() == 1) {
         return firstChild;
      }

      AndExpr andExpr = new AndExpr(firstChild);

      for (int i = 1; i < children.size(); i++) {
         BooleanExpr child = children.get(i).getQuery();
         andExpr.getChildren().add(child);
      }

      return andExpr;
   }
View Full Code Here

   }

   @Override
   public BooleanExpr getQuery() {
      // we always expect children.size() >= 1
      BooleanExpr firstChild = children.get(0).getQuery();
      if (children.size() == 1) {
         return firstChild;
      }

      OrExpr orExpr = new OrExpr(firstChild);

      for (int i = 1; i < children.size(); i++) {
         BooleanExpr child = children.get(i).getQuery();
         orExpr.getChildren().add(child);
      }

      return orExpr;
   }
View Full Code Here

   }

   @Override
   public ObjectFilter getObjectFilter(String jpaQuery) {
      FilterParsingResult<TypeMetadata> parsingResult = parse(jpaQuery);
      BooleanExpr normalizedFilter = booleanFilterNormalizer.normalize(parsingResult.getQuery());

      //todo [anistor] we need an efficient single-filter registry ...
      FilterRegistry filterRegistry = createFilterRegistryForType(parsingResult.getTargetEntityMetadata());
      FilterSubscriptionImpl filterSubscriptionImpl = filterRegistry.addFilter(normalizedFilter, parsingResult.getProjections(), parsingResult.getSortFields(), new FilterCallback() {
         @Override
View Full Code Here

   }

   @Override
   public FilterSubscription registerFilter(String jpaQuery, FilterCallback callback) {
      FilterParsingResult<TypeMetadata> parsingResult = parse(jpaQuery);
      BooleanExpr normalizedFilter = booleanFilterNormalizer.normalize(parsingResult.getQuery());

      write.lock();
      try {
         FilterRegistry<AttributeId> filterRegistry = filtersByType.get(parsingResult.getTargetEntityName());
         if (filterRegistry == null) {
View Full Code Here

TOP

Related Classes of org.infinispan.objectfilter.impl.syntax.BooleanExpr

Copyright © 2018 www.massapicom. 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.