Class AbstractCascadeItem
java.lang.Object
ch.tocco.nice2.persist.entity.impl.cascadingdelete.AbstractCascadeItem
- All Implemented Interfaces:
CascadeItem
- Direct Known Subclasses:
EntityItemImpl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
isDeletionPermitted
(boolean deletionPermitted) boolean
isLeaf()
boolean
boolean
boolean
void
remove()
void
setCascadingDeleteDenied
(List<Entity> causes) void
setLeaf
(boolean leaf)
-
Constructor Details
-
AbstractCascadeItem
protected AbstractCascadeItem(boolean mandatory, boolean visible)
-
-
Method Details
-
isVisible
public boolean isVisible()- Specified by:
isVisible
in interfaceCascadeItem
-
setLeaf
public void setLeaf(boolean leaf) -
isLeaf
public boolean isLeaf()- Specified by:
isLeaf
in interfaceCascadeItem
-
remove
public void remove()- Specified by:
remove
in interfaceCascadeItem
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatory
in interfaceCascadeItem
- Returns:
- If the item is mandatory (not deselectable).
-
isRemoved
public boolean isRemoved()- Specified by:
isRemoved
in interfaceCascadeItem
-
isCascadingDeleteDenied
public boolean isCascadingDeleteDenied()- Specified by:
isCascadingDeleteDenied
in interfaceCascadeItem
- Returns:
true
if deleting thisCascadeItem
is denied by model definition,false
otherwise. If deletion is denied,CascadeItem.getCascadingDeleteDeniedCauses()
returns the entities which reference this item.- See Also:
-
getCascadingDeleteDeniedCauses
- Specified by:
getCascadingDeleteDeniedCauses
in interfaceCascadeItem
- Returns:
- the entities, which reference this item and deny deletion of the item.
- See Also:
-
setCascadingDeleteDenied
-
isDeletionPermitted
public boolean isDeletionPermitted()- Specified by:
isDeletionPermitted
in interfaceCascadeItem
- Returns:
true
if the user has permission to delete thisCascadeItem
,false
otherwise
-
isDeletionPermitted
public void isDeletionPermitted(boolean deletionPermitted)
-