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 TypeMethodDescriptionboolean
Aad a new item to the list.boolean
Append an item to the list.boolean
Check whether the given item is in this list or not.boolean
Delete an item from the list.getName()
int
getType()
boolean
Check if the given item was added to the list or not.boolean
boolean
Check if the given item was deleted from the list or not.boolean
boolean
Check if the given item was edited or not.int
size()
Size of the list (including all items).Get a stream of all items (including original, added, deleted and edited items).boolean
Undelete an item that was deleted earlier.boolean
Update an item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.core.EditableList
add, append, getDuplicate, isSavePending, stream, streamAdded, streamDeleted, streamEdited
Methods inherited from interface com.storedobject.core.StoredObjectLink
attach, checkForDuplicate, copy, detach, save
-
Method Details
-
getMaster
- Specified by:
getMaster
in interfaceStoredObjectLink<O extends StoredObject>
-
isDetail
- Specified by:
isDetail
in interfaceStoredObjectLink<O extends StoredObject>
-
getType
public int getType()- Specified by:
getType
in interfaceStoredObjectLink<O extends StoredObject>
-
getName
- Specified by:
getName
in interfaceStoredObjectLink<O extends StoredObject>
-
isAllowAny
public boolean isAllowAny()- Specified by:
isAllowAny
in interfaceStoredObjectLink<O extends StoredObject>
-
contains
Description copied from interface:EditableList
Check whether the given item is in this list or not. (Note: The parameter is genericObject
type to make it compatible with Java'sList
interface).- Specified by:
contains
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Item to check.- Returns:
- True/false.
-
isAdded
Description copied from interface:EditableList
Check if the given item was added to the list or not.- Specified by:
isAdded
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Item to check.- Returns:
- True/false.
-
isDeleted
Description copied from interface:EditableList
Check if the given item was deleted from the list or not.- Specified by:
isDeleted
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Item to check.- Returns:
- True/false.
-
isEdited
Description copied from interface:EditableList
Check if the given item was edited or not.- Specified by:
isEdited
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Item to check.- Returns:
- True/false.
-
streamAll
Description copied from interface:EditableList
Get a stream of all items (including original, added, deleted and edited items).- Specified by:
streamAll
in interfaceEditableList<O extends StoredObject>
- Returns:
- Stream of items.
-
size
public int size()Description copied from interface:EditableList
Size of the list (including all items).- Specified by:
size
in interfaceEditableList<O extends StoredObject>
- Returns:
- Size.
-
append
Description copied from interface:EditableList
Append an item to the list. This is not considered as a new item.- Specified by:
append
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Item to append.- Returns:
- True if appended, otherwise, false.
-
add
Description copied from interface:EditableList
Aad a new item to the list.- Specified by:
add
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Item to add.- Returns:
- True if added, otherwise, false.
-
delete
Description copied from interface:EditableList
Delete an item from the list. (If the item was newly added, it will be removed).- Specified by:
delete
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Item to delete.- Returns:
- True if deleted, otherwise, false.
-
undelete
Description copied from interface:EditableList
Undelete an item that was deleted earlier.- Specified by:
undelete
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Item to undelete.- Returns:
- True if undeleted, otherwise, false.
-
update
Description copied from interface:EditableList
Update an item. Item will be marked as modified.- Specified by:
update
in interfaceEditableList<O extends StoredObject>
- Parameters:
item
- Updated item.- Returns:
- True if updated, otherwise, false.
-