Interface ODocumentFieldVisitor

All Known Implementing Classes:
OLinksRewriter

public interface ODocumentFieldVisitor
Is used in together with ODocumentFieldWalker to visit all fields of current document.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    goDeeper(OType type, OType linkedType, Object value)
    If currently processed value is collection or map of embedded documents or embedded document itself then current method is called if it returns false then this collection will not be visited.
    boolean
    goFurther(OType type, OType linkedType, Object value, Object newValue)
    Indicates whether we continue to visit document fields after current one or should stop fields processing.
    boolean
     
    visitField(OType type, OType linkedType, Object value)
    Visits currently processed field.
  • Method Details

    • visitField

      Object visitField(OType type, OType linkedType, Object value)
      Visits currently processed field.
      Parameters:
      type - Filed type. May be null if absent in DB schema.
      linkedType - Linked type in case collection is processed. May be null if absent in DB schema.
      value - Field value.
      Returns:
      New value of this field. If the same value is returned document content will not be changed.
    • goFurther

      boolean goFurther(OType type, OType linkedType, Object value, Object newValue)
      Indicates whether we continue to visit document fields after current one or should stop fields processing.
      Parameters:
      type - Filed type. May be null if absent in DB schema.
      linkedType - Linked type in case collection is processed. May be null if absent in DB schema.
      value - Field value.
      newValue - New value returned by visitField(OType, OType, Object) method.
      Returns:
      If false document processing will be stopped.
    • goDeeper

      boolean goDeeper(OType type, OType linkedType, Object value)
      If currently processed value is collection or map of embedded documents or embedded document itself then current method is called if it returns false then this collection will not be visited.
      Parameters:
      type - Filed type. May be null if absent in DB schema.
      linkedType - Linked type in case collection is processed. May be null if absent in DB schema.
      value - Field value.
      Returns:
      If false currently processed collection of embedded documents will not be visited.
    • updateMode

      boolean updateMode()
      Returns:
      If false value returned by method visitField(OType, OType, Object) will not be taken in account and field value will not be updated.