Package com.storedobject.core
Class StoredObjectLink.Copy<O extends StoredObject>
java.lang.Object
com.storedobject.core.StoredObjectLink.Copy<O>
- All Implemented Interfaces:
EditableList<O>,StoredObjectLink<O>
- Enclosing interface:
StoredObjectLink<T extends StoredObject>
public static class StoredObjectLink.Copy<O extends StoredObject>
extends Object
implements StoredObjectLink<O>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.core.StoredObjectLink
StoredObjectLink.Copy<O extends StoredObject> -
Field Summary
Fields inherited from interface com.storedobject.core.StoredObjectLink
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionbooleanAad a new item to the list.booleanAppend an item to the list.booleanCheck whether the given item is in this list or not.booleanDelete an item from the list.getName()intgetType()booleanCheck if the given item was added to the list or not.booleanbooleanCheck if the given item was deleted from the list or not.booleanbooleanCheck if the given item was edited or not.intsize()Size of the list (including all items).Get a stream of all items (including original, added, deleted and edited items).booleanUndelete an item that was deleted earlier.booleanUpdate an item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.core.EditableList
add, append, getDuplicate, isSavePending, stream, streamAdded, streamDeleted, streamEditedMethods inherited from interface com.storedobject.core.StoredObjectLink
attach, checkForDuplicate, copy, detach, save
-
Method Details
-
getMaster
- Specified by:
getMasterin interfaceStoredObjectLink<O extends StoredObject>
-
isDetail
- Specified by:
isDetailin interfaceStoredObjectLink<O extends StoredObject>
-
getType
public int getType()- Specified by:
getTypein interfaceStoredObjectLink<O extends StoredObject>
-
getName
- Specified by:
getNamein interfaceStoredObjectLink<O extends StoredObject>
-
isAllowAny
public boolean isAllowAny()- Specified by:
isAllowAnyin interfaceStoredObjectLink<O extends StoredObject>
-
contains
Description copied from interface:EditableListCheck whether the given item is in this list or not. (Note: The parameter is genericObjecttype to make it compatible with Java'sListinterface).- Specified by:
containsin interfaceEditableList<O extends StoredObject>- Parameters:
item- Item to check.- Returns:
- True/false.
-
isAdded
Description copied from interface:EditableListCheck if the given item was added to the list or not.- Specified by:
isAddedin interfaceEditableList<O extends StoredObject>- Parameters:
item- Item to check.- Returns:
- True/false.
-
isDeleted
Description copied from interface:EditableListCheck if the given item was deleted from the list or not.- Specified by:
isDeletedin interfaceEditableList<O extends StoredObject>- Parameters:
item- Item to check.- Returns:
- True/false.
-
isEdited
Description copied from interface:EditableListCheck if the given item was edited or not.- Specified by:
isEditedin interfaceEditableList<O extends StoredObject>- Parameters:
item- Item to check.- Returns:
- True/false.
-
streamAll
Description copied from interface:EditableListGet a stream of all items (including original, added, deleted and edited items).- Specified by:
streamAllin interfaceEditableList<O extends StoredObject>- Returns:
- Stream of items.
-
size
public int size()Description copied from interface:EditableListSize of the list (including all items).- Specified by:
sizein interfaceEditableList<O extends StoredObject>- Returns:
- Size.
-
append
Description copied from interface:EditableListAppend an item to the list. This is not considered as a new item.- Specified by:
appendin interfaceEditableList<O extends StoredObject>- Parameters:
item- Item to append.- Returns:
- True if appended, otherwise, false.
-
add
Description copied from interface:EditableListAad a new item to the list.- Specified by:
addin interfaceEditableList<O extends StoredObject>- Parameters:
item- Item to add.- Returns:
- True if added, otherwise, false.
-
delete
Description copied from interface:EditableListDelete an item from the list. (If the item was newly added, it will be removed).- Specified by:
deletein interfaceEditableList<O extends StoredObject>- Parameters:
item- Item to delete.- Returns:
- True if deleted, otherwise, false.
-
undelete
Description copied from interface:EditableListUndelete an item that was deleted earlier.- Specified by:
undeletein interfaceEditableList<O extends StoredObject>- Parameters:
item- Item to undelete.- Returns:
- True if undeleted, otherwise, false.
-
update
Description copied from interface:EditableListUpdate an item. Item will be marked as modified.- Specified by:
updatein interfaceEditableList<O extends StoredObject>- Parameters:
item- Updated item.- Returns:
- True if updated, otherwise, false.
-