Class IndexSlicePredicateService

java.lang.Object
com._1c.g5.modeling.xtext.scoping.IndexSlicePredicateService
All Implemented Interfaces:
IIndexSlicePredicateService

public class IndexSlicePredicateService extends Object implements IIndexSlicePredicateService
Default implementation of IIndexSlicePredicateService. Reads registered index slices form extension point "com._1c.g5.modeling.xtext.indexSlicePredicate"
  • Constructor Details

    • IndexSlicePredicateService

      public IndexSlicePredicateService()
  • Method Details

    • getPredicate

      public ISliceFilter getPredicate(String name)
      Description copied from interface: IIndexSlicePredicateService
      Gets index slice predicate by name. See extension point "com._1c.g5.v8.dt.core.indexSlicePredicate" and IIndexSlice
      Specified by:
      getPredicate in interface IIndexSlicePredicateService
      Parameters:
      name - name of the registered index slice predicate, can't be null
      Returns:
      index slice predicate or null if predicate wasn't registered for this name.
    • getAllPredicates

      public Map<String,ISliceFilter> getAllPredicates()
      Description copied from interface: IIndexSlicePredicateService
      Gets all registered predicates with its names from extension point "com._1c.g5.v8.dt.core.indexSlicePredicate". Also see IIndexSlice
      Specified by:
      getAllPredicates in interface IIndexSlicePredicateService
      Returns:
      map of registered predicates with its names from extension point "com._1c.g5.v8.dt.core.indexSlicePredicate", never null
    • separateSlices

      public org.eclipse.xtext.util.Pair<Collection<ISliceFilter>,com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription>> separateSlices(Collection<com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription>> predicates)
      Description copied from interface: IIndexSlicePredicateService
      Separates slices predicates from colletion of the predicates
      Specified by:
      separateSlices in interface IIndexSlicePredicateService
      Parameters:
      predicates - separating predicates, can't be null
      Returns:
      pair - the first is index slices predicates, the second is remaining predicate, never null
    • separateSlices

      public org.eclipse.xtext.util.Pair<Collection<ISliceFilter>,com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription>> separateSlices(AndPredicate<org.eclipse.xtext.resource.IEObjectDescription> predicates)
      Description copied from interface: IIndexSlicePredicateService
      Separates slices predicates from AndPredicate
      Specified by:
      separateSlices in interface IIndexSlicePredicateService
      Parameters:
      predicates - separating predicates, can't be null
      Returns:
      pair - the first is index slices predicates, the second is remaining predicate, never null
    • internalGetAllPredicates

      protected Map<String,ISliceFilter> internalGetAllPredicates()
      Reads index slices predicates from extension point "com._1c.g5.modeling.xtext.indexSlicePredicate"
      Returns:
      dictionary with key - name of the index slice predicate, value - Predicate of the index slice, never null