Interface DeletableProxyObject


  • public interface DeletableProxyObject
    Interface that PAMELA objects should extend in order to benefit from their default implementation handled by the ProxyMethodHandler deleting/undeleting facilities
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DELETED
      The deleted property identifier.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean delete​(java.lang.Object... context)
      Deletes the current object and all its embedded properties as defined by the Embedded and ComplexEmbedded annotations.
      boolean isDeleted()
      Returns whether this object has been deleted or not.
      void performSuperDelete​(java.lang.Class<?> modelEntityInterface, java.lang.Object... context)
      Invokes the delete method as defined by the model entity associated with the class modelEntityInterface
      boolean performSuperDelete​(java.lang.Object... context)
      Invokes the default deletion code handled by ProxyMethodHandler with the provided context.
      boolean performSuperUndelete​(boolean restoreProperties)
      Invokes the default un-deletion code handled by ProxyMethodHandler.
      boolean undelete​(boolean restoreProperties)
      Un-deletes the current object
    • Field Detail

      • DELETED

        static final java.lang.String DELETED
        The deleted property identifier.
        See Also:
        Constant Field Values
    • Method Detail

      • performSuperDelete

        boolean performSuperDelete​(java.lang.Object... context)
        Invokes the default deletion code handled by ProxyMethodHandler with the provided context.
        Parameters:
        context - the deletion context. The context represents a list of objects which eventually will also be deleted. Objects in that context may be deleted indirectly by deleting other objects, however, the invoker should make sure that those objects are deleted by invoking one of the deletion methods.
        See Also:
        DeletableProxyObject#delete(), isDeleted()
      • performSuperUndelete

        boolean performSuperUndelete​(boolean restoreProperties)
        Invokes the default un-deletion code handled by ProxyMethodHandler.
        See Also:
        DeletableProxyObject#delete(), isDeleted()
      • performSuperDelete

        void performSuperDelete​(java.lang.Class<?> modelEntityInterface,
                                java.lang.Object... context)
        Invokes the delete method as defined by the model entity associated with the class modelEntityInterface
        Parameters:
        modelEntityInterface - the class corresponding to the model entity from which deletion information should be gathered.
        context - the deletion context. The context represents a list of objects which eventually will also be deleted. Objects in that context may be deleted indirectly by deleting other objects, however, the invoker should make sure that those objects are deleted by invoking one of the deletion methods.
        See Also:
        delete(Object...), isDeleted()
      • delete

        boolean delete​(java.lang.Object... context)
        Deletes the current object and all its embedded properties as defined by the Embedded and ComplexEmbedded annotations. Moreover, the provided context represents a list of objects that will also be eventually deleted and which should be taken into account when computing embedded objects according to the deletion conditions. Invoking this method may result in deleting indirectly the objects provided by the context, however the invoker should make sure that they have been actually deleted.
        Parameters:
        context - the list of objects that will also be deleted and which should be taken into account when computing embedded objects.
        See Also:
        Embedded.deletionConditions(), ComplexEmbedded.deletionConditions()
      • isDeleted

        boolean isDeleted()
        Returns whether this object has been deleted or not.
        Returns:
        true if this object has been deleted, false otherwise.