Class IsXXX

java.lang.Object
org.datanucleus.enhancer.ClassMethod
org.datanucleus.enhancer.methods.IsXXX
Direct Known Subclasses:
IsDeleted, IsNew, IsPersistent, IsTransactional

public abstract class IsXXX extends ClassMethod
Base method to use for dnIsXXX methods providing the majority of the enhancement.
  • Constructor Details

    • IsXXX

      public IsXXX(ClassEnhancer enhancer, String name, int access, Object returnType, Object[] argTypes, String[] argNames)
      Constructor.
      Parameters:
      enhancer - ClassEnhancer
      name - Name of method
      access - Access type
      returnType - Return type
      argTypes - Argument types
      argNames - Argument names
  • Method Details

    • getStateManagerIsMethod

      protected abstract String getStateManagerIsMethod()
      Method returning the name of the method on the StateManager that gives the return info.
      Returns:
      Name of the StateManager method (isNew, isPersistent, isDeleted etc)
    • execute

      public void execute()
      Method to add the contents of the class method. Creates the method as follows
       return dnStateManager != null ? dnStateManager.isXXX(this) : false;
       
      where "isXXX" is replaced by the output of "getStateManagerIsMethod"
      Specified by:
      execute in class ClassMethod