java.lang.Object
com.orientechnologies.orient.core.db.tool.importer.OLinksRewriter
All Implemented Interfaces:
ODocumentFieldVisitor

public final class OLinksRewriter extends Object implements ODocumentFieldVisitor
Created by tglman on 28/07/17.
  • Constructor Details

    • OLinksRewriter

      public OLinksRewriter(OConverterData converterData)
  • Method Details

    • visitField

      public Object visitField(OType type, OType linkedType, Object value)
      Description copied from interface: ODocumentFieldVisitor
      Visits currently processed field.
      Specified by:
      visitField in interface ODocumentFieldVisitor
      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

      public boolean goFurther(OType type, OType linkedType, Object value, Object newValue)
      Description copied from interface: ODocumentFieldVisitor
      Indicates whether we continue to visit document fields after current one or should stop fields processing.
      Specified by:
      goFurther in interface ODocumentFieldVisitor
      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 ODocumentFieldVisitor.visitField(OType, OType, Object) method.
      Returns:
      If false document processing will be stopped.
    • goDeeper

      public boolean goDeeper(OType type, OType linkedType, Object value)
      Description copied from interface: ODocumentFieldVisitor
      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.
      Specified by:
      goDeeper in interface ODocumentFieldVisitor
      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

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