Interface PersistenceStoreHandler

    • Method Summary

      Modifier and Type Method Description
      <T> long apply​(T instance)
      The "natural" way of handling an instance as defined by the implementation.
      <T> long applyEager​(T instance)
      A way to signal to the implementation that the passed instance is supposed to be handled eagerly, meaning it shall be handled even if the handling implementation does not deem it necessary.
      This is needed, for example, to store composition pattern instances without breaking OOP encapsulation concepts.
      PersistenceObjectRetriever getObjectRetriever()  
    • Method Detail

      • apply

        <T> long apply​(T instance)
        The "natural" way of handling an instance as defined by the implementation.
        Specified by:
        apply in interface PersistenceFunction
        Parameters:
        instance - the instance to which the function shall be applied.
        Returns:
        the object ID (OID) that is associated with the passed instance.
      • applyEager

        <T> long applyEager​(T instance)
        A way to signal to the implementation that the passed instance is supposed to be handled eagerly, meaning it shall be handled even if the handling implementation does not deem it necessary.
        This is needed, for example, to store composition pattern instances without breaking OOP encapsulation concepts.