Class PersistRightOperandResolver


  • @Component
    public class PersistRightOperandResolver
    extends java.lang.Object
    Author:
    Elias Ricken de Medeiros
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean shouldPersistByPosition​(int currentIndex, java.util.List<SOperation> operations)
      Check if the right operand should be persisted based on its position (it's the last operation for the given left operand)
      boolean shouldPersistByValue​(java.lang.Object rightOperandValue, boolean shouldPersistByPosition, boolean shouldPersistOnNull)
      Check if the right operand should be persisted based of the right operand value
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PersistRightOperandResolver

        public PersistRightOperandResolver​(OperationsAnalyzer operationsAnalyzer)
    • Method Detail

      • shouldPersistByPosition

        public boolean shouldPersistByPosition​(int currentIndex,
                                               java.util.List<SOperation> operations)
        Check if the right operand should be persisted based on its position (it's the last operation for the given left operand)
        Parameters:
        currentIndex - the index of current operation
        operations - the list of all operations
        Returns:
        true if the right operand should be persisted; false otherwise
      • shouldPersistByValue

        public boolean shouldPersistByValue​(java.lang.Object rightOperandValue,
                                            boolean shouldPersistByPosition,
                                            boolean shouldPersistOnNull)
        Check if the right operand should be persisted based of the right operand value
        Parameters:
        rightOperandValue - the right operand value
        shouldPersistByPosition - should persist based on operation position (position in the list of operations)
        shouldPersistOnNull - should persist on null result
        Returns:
        true if the right operand should be persisted; false otherwise