Package com._1c.g5.v8.dt.search.core
Class Match
- java.lang.Object
-
- com._1c.g5.v8.dt.search.core.Match
-
- All Implemented Interfaces:
IMatchParentProvider
- Direct Known Subclasses:
BmObjectMatch
,BmReferenceMatch
,BslReferenceMatch
,TextSearchFileMatch
,TextSearchModelMatch
public abstract class Match extends Object implements IMatchParentProvider
A Model match in a given object. Subclasses must add states to determine element contain the match.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.search.core.provider.IMatchParentProvider
IMatchParentProvider.Factory, IMatchParentProvider.Registry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
abstract Object
getElement()
Returns the element that contains this match.long
getMetadataTopObjectId()
The top metadata object id that contain matchIBmModel
getModel()
Get parent BM modelint
hashCode()
boolean
isFiltered()
Returns whether this match is filtered or not.protected Optional<IBmObject>
resolveObjectById(long objectId)
Resolve object by bmIdvoid
setFiltered(boolean value)
Marks this match as filtered or not.
-
-
-
Field Detail
-
bmModel
protected final IBmModel bmModel
BM container of match
-
-
Constructor Detail
-
Match
protected Match(IBmModel bmModel)
Constructor- Parameters:
bmModel
- container of match, cannot benull
-
-
Method Detail
-
getModel
public IBmModel getModel()
Description copied from interface:IMatchParentProvider
Get parent BM model- Specified by:
getModel
in interfaceIMatchParentProvider
- Returns:
- the BM model contain matched object, never
null
-
isFiltered
public boolean isFiltered()
Returns whether this match is filtered or not.- Returns:
true
if the match is filtered, otherwisefalse
-
setFiltered
public void setFiltered(boolean value)
Marks this match as filtered or not.- Parameters:
value
-true
if the match is filtered, otherwisefalse
-
getMetadataTopObjectId
public long getMetadataTopObjectId()
Description copied from interface:IMatchParentProvider
The top metadata object id that contain match- Specified by:
getMetadataTopObjectId
in interfaceIMatchParentProvider
- Returns:
- BM id of top metadata object
-
getElement
public abstract Object getElement()
Returns the element that contains this match. The element is used to group the match.- Returns:
- the element that contains this match, cannot be
null
-
resolveObjectById
protected Optional<IBmObject> resolveObjectById(long objectId)
Resolve object by bmId- Parameters:
objectId
- bmId of resolving object- Returns:
- return the object with the specified ID or empty optional if it does not exist or if engine of BM model is disposed or not in 'running' state
-
-