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 TypeMethodDescriptionbooleanIf 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.booleanIndicates whether we continue to visit document fields after current one or should stop fields processing.booleanvisitField(OType type, OType linkedType, Object value) Visits currently processed field.
-
Method Details
-
visitField
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
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 byvisitField(OType, OType, Object)method.- Returns:
- If false document processing will be stopped.
-
goDeeper
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.
-