Class IndexSlicesManager
- java.lang.Object
-
- com._1c.g5.modeling.xtext.scoping.IndexSlicesManager
-
- All Implemented Interfaces:
IIndexSlicesManager
public class IndexSlicesManager extends Object implements IIndexSlicesManager
Default implementation ofIIndexSlicesManager
.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<ISliceFilter,IIndexSlice>
slices
-
Constructor Summary
Constructors Constructor Description IndexSlicesManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addItem(long id, org.eclipse.xtext.resource.IEObjectDescription item)
Tries to add index element to each index slicevoid
addSlices(Collection<ISliceFilter> predicates)
Adds new supporting index slices for this managervoid
clear()
Clear all index slicesSet<Long>
getIndexSliceItems()
Gets unique ids of index elements contained in all index slicesSet<Long>
getIndexSliceItems(Collection<ISliceFilter> predicates)
Gets unique ids of index elements contained in index slice corresponding to allpredicates
Collection<ISliceFilter>
getPredicates()
Gets specialPredicate
s that determine all supporting index slices by this managerboolean
removeItem(long id)
Tries to delete index element from each index slice
-
-
-
Field Detail
-
slices
protected Map<ISliceFilter,IIndexSlice> slices
-
-
Method Detail
-
getIndexSliceItems
public Set<Long> getIndexSliceItems()
Description copied from interface:IIndexSlicesManager
Gets unique ids of index elements contained in all index slices- Specified by:
getIndexSliceItems
in interfaceIIndexSlicesManager
- Returns:
- unique ids of index elements contained in all index slices, never
null
-
getIndexSliceItems
public Set<Long> getIndexSliceItems(Collection<ISliceFilter> predicates)
Description copied from interface:IIndexSlicesManager
Gets unique ids of index elements contained in index slice corresponding to allpredicates
- Specified by:
getIndexSliceItems
in interfaceIIndexSlicesManager
- Parameters:
predicates
- ids of index slices, can't benull
- Returns:
- unique ids of index elements contained in index slice corresponding to all
predicates
, nevernull
-
addItem
public boolean addItem(long id, org.eclipse.xtext.resource.IEObjectDescription item)
Description copied from interface:IIndexSlicesManager
Tries to add index element to each index slice- Specified by:
addItem
in interfaceIIndexSlicesManager
- Parameters:
id
- special unique id for adding index elementitem
- index element for adding to each index slice, can't benull
- Returns:
true
if index element was added to even one slice,false
if index element is not supported of this index slice. Supporting index items are determined by predicates fromIIndexSlicesManager.getPredicates()
-
removeItem
public boolean removeItem(long id)
Description copied from interface:IIndexSlicesManager
Tries to delete index element from each index slice- Specified by:
removeItem
in interfaceIIndexSlicesManager
- Parameters:
id
- special unique id for deleting index element- Returns:
true
if item was succeeded deleted,false
otherwise
-
addSlices
public void addSlices(Collection<ISliceFilter> predicates)
Description copied from interface:IIndexSlicesManager
Adds new supporting index slices for this manager- Specified by:
addSlices
in interfaceIIndexSlicesManager
- Parameters:
predicates
- new ids of index slices, can't benull
-
getPredicates
public Collection<ISliceFilter> getPredicates()
Description copied from interface:IIndexSlicesManager
Gets specialPredicate
s that determine all supporting index slices by this manager- Specified by:
getPredicates
in interfaceIIndexSlicesManager
- Returns:
- special
Predicate
s that determine all supporting index slices by this manager, can't benull
-
clear
public void clear()
Description copied from interface:IIndexSlicesManager
Clear all index slices- Specified by:
clear
in interfaceIIndexSlicesManager
-
-