Class OracleChangeNotificationVisitor

java.lang.Object
io.micronaut.data.processor.visitors.OracleChangeNotificationVisitor
All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.core.util.Toggleable, io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>

public final class OracleChangeNotificationVisitor extends Object implements io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
Processes @OracleChangeNotification methods during compilation.

The visitor verifies that the method is also a @ChangeListener, validates Oracle registration settings and query-change-notification select columns against the entity's physical mapping using Oracle Database identifier rules, and generates an internal OracleChangeListenerQuery annotation containing the query used to reload the mapped entity by its reported Oracle ROWID.

This visitor performs compile-time processing only. It does not open a datasource connection or create an Oracle Database notification registration.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.micronaut.inject.visitor.TypeElementVisitor

    io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind
  • Field Summary

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    int
     
     
    io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind
     
    void
    visitMethod(io.micronaut.inject.ast.MethodElement element, io.micronaut.inject.visitor.VisitorContext context)
    Validates Oracle notification settings and generates the entity reload query at compilation time.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.core.util.Toggleable

    isEnabled

    Methods inherited from interface io.micronaut.inject.visitor.TypeElementVisitor

    finish, getClassType, getSupportedOptions, query, start, visitClass, visitConstructor, visitEnumConstant, visitField
  • Constructor Details

    • OracleChangeNotificationVisitor

      public OracleChangeNotificationVisitor()
  • Method Details

    • getSupportedAnnotationNames

      public Set<String> getSupportedAnnotationNames()
      Specified by:
      getSupportedAnnotationNames in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
    • getElementType

      public String getElementType()
      Specified by:
      getElementType in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface io.micronaut.core.order.Ordered
    • getVisitorKind

      public io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind getVisitorKind()
      Specified by:
      getVisitorKind in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
    • visitMethod

      public void visitMethod(io.micronaut.inject.ast.MethodElement element, io.micronaut.inject.visitor.VisitorContext context)
      Validates Oracle notification settings and generates the entity reload query at compilation time.
      Specified by:
      visitMethod in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
      Parameters:
      element - the annotated listener method
      context - the compilation visitor context used to report errors and add generated metadata