Class CopyStrategyHandler

  • Direct Known Subclasses:
    TxCopyStrategyHandler

    public class CopyStrategyHandler
    extends java.lang.Object
    Utility class for handling element copy based on the copy on read and write configurations.
    Author:
    ljacomet
    • Constructor Summary

      Constructors 
      Constructor Description
      CopyStrategyHandler​(boolean copyOnRead, boolean copyOnWrite, ReadWriteCopyStrategy<Element> copyStrategy, java.lang.ClassLoader loader)
      Creates a CopyStrategyHandler based on the copy configuration
    • Constructor Detail

      • CopyStrategyHandler

        public CopyStrategyHandler​(boolean copyOnRead,
                                   boolean copyOnWrite,
                                   ReadWriteCopyStrategy<Element> copyStrategy,
                                   java.lang.ClassLoader loader)
        Creates a CopyStrategyHandler based on the copy configuration
        Parameters:
        copyOnRead - copy on read flag
        copyOnWrite - copy on write flag
        copyStrategy - the copy strategy to use
    • Method Detail

      • copyElementForReadIfNeeded

        public Element copyElementForReadIfNeeded​(Element element)
        Perform copy on read on an element if configured
        Parameters:
        element - the element to copy for read
        Returns:
        a copy of the element with the reconstructed original value