Package com._1c.g5.v8.dt.bm.index.emf
Interface IBmEmfIndexProvider
-
public interface IBmEmfIndexProvider
Service that manages the EMF index lifecycle.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_NAME
Service name (using in recovery orchestrator)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearEObjectIndex(long bmObjectId)
Clears index from obsolete data.void
close(boolean delete)
Closes the provider.Iterable<org.eclipse.xtext.resource.IResourceDescription>
getAllResourceDescriptions()
Gets all resource descriptions registered in this manager.List<org.eclipse.xtext.resource.IEObjectDescription>
getBmObjectDescriptors(long bmObjectId)
Gets the list of BM object-related descriptors (only direct index belonging to this object, no descendant indexes is being returned).Collection<org.eclipse.xtext.resource.IEObjectDescription>
getEObjectFilteredIndexByEClasses(Collection<org.eclipse.emf.ecore.EClass> eClasses, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
Gets cached collection ofIEObjectDescription
.Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getEObjectIndex(org.eclipse.emf.ecore.EObject eObject)
Gets the EObject index for the given root object UID.Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getEObjectIndexByType(org.eclipse.emf.ecore.EClass type)
Gets the EObject index for the given class type.Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getEObjectIndexByType(org.eclipse.emf.ecore.EClass type, Collection<ISliceFilter> slices)
Gets the EObject index for the given class type and special index slices (seeIIndexSlicePredicateService
)Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getEObjectIndexByType(org.eclipse.emf.ecore.EClass type, org.eclipse.xtext.naming.QualifiedName name, boolean ignoreCase)
Gets EObject index by given type and filtering criteria.Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getEObjectIndexByType(org.eclipse.emf.ecore.EClass type, org.eclipse.xtext.naming.QualifiedName name, boolean ignoreCase, Collection<ISliceFilter> slices)
Gets EObject index by given type, special index slices (seeIIndexSlicePredicateService
) and filtering criteria.Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getFullEObjectIndex()
Gets the full EObject index for the given manager.org.eclipse.xtext.resource.IResourceDescription
getResourceDescription(org.eclipse.emf.common.util.URI uri)
Gets the resource description for the given URI.boolean
isEObjectIndexEmpty()
Checks if the index is empty.void
start(boolean cleanStart)
Starts the provider.void
updateEObjectIndex(org.eclipse.emf.ecore.EObject eObject, List<org.eclipse.xtext.resource.IEObjectDescription> updatedEObjectIndexes)
Updates EObject index for the given root object.
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
Service name (using in recovery orchestrator)- See Also:
- Constant Field Values
-
-
Method Detail
-
clearEObjectIndex
void clearEObjectIndex(long bmObjectId)
Clears index from obsolete data.- Parameters:
bmObjectId
- The top BM object to remove index for.
-
getAllResourceDescriptions
Iterable<org.eclipse.xtext.resource.IResourceDescription> getAllResourceDescriptions()
Gets all resource descriptions registered in this manager.- Returns:
- The iterable set of resource descriptions.
-
getEObjectFilteredIndexByEClasses
Collection<org.eclipse.xtext.resource.IEObjectDescription> getEObjectFilteredIndexByEClasses(Collection<org.eclipse.emf.ecore.EClass> eClasses, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
Gets cached collection ofIEObjectDescription
. The cached collection identified by the given filter and exists until DD is changed.IEObjectDescription
will be collected from specified classes if they are defined.- Parameters:
eClasses
- Restrictive type sets, can benull
filter
- The filter that define the specific collection ofIEObjectDescription
- Returns:
- cached collection of
IEObjectDescription
-
getEObjectIndex
Iterable<org.eclipse.xtext.resource.IEObjectDescription> getEObjectIndex(org.eclipse.emf.ecore.EObject eObject)
Gets the EObject index for the given root object UID.- Parameters:
eObject
- The top object.- Returns:
- The list of the descriptors.
-
getEObjectIndexByType
Iterable<org.eclipse.xtext.resource.IEObjectDescription> getEObjectIndexByType(org.eclipse.emf.ecore.EClass type)
Gets the EObject index for the given class type.- Parameters:
type
- The requested type.- Returns:
- The iterable which provides descriptions.
-
getEObjectIndexByType
Iterable<org.eclipse.xtext.resource.IEObjectDescription> getEObjectIndexByType(org.eclipse.emf.ecore.EClass type, Collection<ISliceFilter> slices)
Gets the EObject index for the given class type and special index slices (seeIIndexSlicePredicateService
)- Parameters:
type
- The requested type, can't benull
slices
- list of index slices, can't benull
- Returns:
- the iterable which provides descriptions, never
null
-
getEObjectIndexByType
Iterable<org.eclipse.xtext.resource.IEObjectDescription> getEObjectIndexByType(org.eclipse.emf.ecore.EClass type, org.eclipse.xtext.naming.QualifiedName name, boolean ignoreCase)
Gets EObject index by given type and filtering criteria.- Parameters:
type
- Target object type.name
- Qualified name of the object to filter.ignoreCase
- Ignore- Returns:
-
getEObjectIndexByType
Iterable<org.eclipse.xtext.resource.IEObjectDescription> getEObjectIndexByType(org.eclipse.emf.ecore.EClass type, org.eclipse.xtext.naming.QualifiedName name, boolean ignoreCase, Collection<ISliceFilter> slices)
Gets EObject index by given type, special index slices (seeIIndexSlicePredicateService
) and filtering criteria.- Parameters:
type
- target object type, can't benull
name
- qualified name of the object to filter, can't benull
ignoreCase
-true
ifname
should be equals with ignoring letters case- Returns:
- the iterable which provides descriptions, never
null
-
getFullEObjectIndex
Iterable<org.eclipse.xtext.resource.IEObjectDescription> getFullEObjectIndex()
Gets the full EObject index for the given manager.- Returns:
- The iterable set of EObject index items.
-
getResourceDescription
org.eclipse.xtext.resource.IResourceDescription getResourceDescription(org.eclipse.emf.common.util.URI uri)
Gets the resource description for the given URI.- Parameters:
uri
- The uri which addresses the corresponding resource.- Returns:
- The resource description (if available).
-
isEObjectIndexEmpty
boolean isEObjectIndexEmpty()
Checks if the index is empty. Used for optimizing calls from external clients.- Returns:
- True if the index is empty.
-
updateEObjectIndex
void updateEObjectIndex(org.eclipse.emf.ecore.EObject eObject, List<org.eclipse.xtext.resource.IEObjectDescription> updatedEObjectIndexes)
Updates EObject index for the given root object.- Parameters:
eObject
- Unique identifier of the top indexable object.updatedEObjectIndexes
- The list of updated indexes.
-
getBmObjectDescriptors
List<org.eclipse.xtext.resource.IEObjectDescription> getBmObjectDescriptors(long bmObjectId)
Gets the list of BM object-related descriptors (only direct index belonging to this object, no descendant indexes is being returned).- Parameters:
bmObjectId
- The unique identifier of the BM object.- Returns:
- The list of object descriptors (if any); null otherwise.
-
start
void start(boolean cleanStart)
Starts the provider.- Parameters:
cleanStart
- The flag showing whether all the previously stored data must be cleaned.
-
close
void close(boolean delete)
Closes the provider.- Parameters:
delete
- The flag showing whether all the stored data must be deleted.
-
-