Package org.openflexo.pamela
Interface DeletableProxyObject
-
public interface DeletableProxyObject
Interface that PAMELA objects should extend in order to benefit from their default implementation handled by theProxyMethodHandler
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 theEmbedded
andComplexEmbedded
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 classmodelEntityInterface
boolean
performSuperDelete(java.lang.Object... context)
Invokes the default deletion code handled byProxyMethodHandler
with the providedcontext
.boolean
performSuperUndelete(boolean restoreProperties)
Invokes the default un-deletion code handled byProxyMethodHandler
.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 byProxyMethodHandler
with the providedcontext
.- 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 byProxyMethodHandler
.- 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 classmodelEntityInterface
- 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 theEmbedded
andComplexEmbedded
annotations. Moreover, the providedcontext
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 thecontext
, 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()
-
undelete
boolean undelete(boolean restoreProperties)
Un-deletes the current object
-
isDeleted
boolean isDeleted()
Returns whether this object has been deleted or not.- Returns:
- true if this object has been deleted, false otherwise.
-
-