Class Match

java.lang.Object
com._1c.g5.v8.dt.search.core.Match
All Implemented Interfaces:
IMatchParentProvider
Direct Known Subclasses:
BmObjectMatch, BmReferenceMatch, BslReferenceMatch, OutdatedBmModelMatch, 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.
  • Field Details

    • bmModel

      protected final IBmModel bmModel
      BM container of match
  • Constructor Details

    • Match

      protected Match(IBmModel bmModel)
      Constructor
      Parameters:
      bmModel - container of match, cannot be null
  • Method Details

    • getModel

      public IBmModel getModel()
      Description copied from interface: IMatchParentProvider
      Get parent BM model
      Specified by:
      getModel in interface IMatchParentProvider
      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, otherwise false
    • setFiltered

      public void setFiltered(boolean value)
      Marks this match as filtered or not.
      Parameters:
      value - true if the match is filtered, otherwise false
    • getMetadataTopObjectId

      public long getMetadataTopObjectId()
      Description copied from interface: IMatchParentProvider
      The top metadata object id that contain match
      Specified by:
      getMetadataTopObjectId in interface IMatchParentProvider
      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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object