public class OwObjectCollectionDelegator extends Object implements OwObjectCollection
An object list wrapper/delegate class. Delegates all behavior to the inner delegate. Subclasses can override certain object list methods thus lists can have their behavior "decorated".
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
ATTRIBUTE_IS_COMPLETE, ATTRIBUTE_SIZE, ATTRIBUTE_SQL
Constructor and Description |
---|
OwObjectCollectionDelegator(OwObjectCollection delegateeCollection_p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index_p,
Object element_p) |
boolean |
add(Object o_p) |
boolean |
addAll(Collection c_p) |
boolean |
addAll(int index_p,
Collection c_p) |
int |
attributecount()
get the number of attributes, or -1 if unknown
|
void |
clear() |
boolean |
contains(Object o_p) |
boolean |
containsAll(Collection c_p) |
boolean |
equals(Object o_p) |
Object |
get(int index_p) |
Object |
getAttribute(int index_p)
get a object at the specified index or throws OwObjectNotFoundException
|
Object |
getAttribute(String strName_p)
get the attribute with the given name or throws OwObjectNotFoundException
|
Collection |
getAttributeNames()
get all attribute names in the bag
|
void |
getNext()
retrieve further objects, than currently added.
|
void |
getPrev()
retrieve further objects, than currently added.
|
Object |
getSafeAttribute(String strName_p,
Object default_p)
get the attribute with the given name, returns default if not found.
|
boolean |
hasAttribute(String strName_p)
check if attribute exists
|
int |
hashCode() |
boolean |
hasNext()
check if object list has access to more next objects, than currently added.
|
boolean |
hasPrev()
check if object list has access to more previous objects, than currently added.
|
int |
indexOf(Object o_p) |
boolean |
isComplete()
check if object list has retrieved all objects
If false, there are more objects available, but it is not guaranteed that you can retrieve them with the next / prev functions.
|
boolean |
isEmpty() |
Iterator |
iterator() |
int |
lastIndexOf(Object o_p) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index_p) |
Object |
remove(int index_p) |
boolean |
remove(Object o_p) |
boolean |
removeAll(Collection c_p) |
protected void |
replaceDelegatee(OwObjectCollection objectCollection_p) |
boolean |
retainAll(Collection c_p) |
Object |
set(int index_p,
Object element_p) |
int |
size() |
void |
sort(OwSort sortCriteria_p)
sort the list by the given criteria.
|
List |
subList(int fromIndex_p,
int toIndex_p) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a_p) |
String |
toString() |
public OwObjectCollectionDelegator(OwObjectCollection delegateeCollection_p)
delegateeCollection_p
- protected void replaceDelegatee(OwObjectCollection objectCollection_p)
objectCollection_p
- the collection to replace the inner delegate withpublic boolean add(Object o_p)
add
in interface Collection
add
in interface List
public boolean addAll(Collection c_p)
addAll
in interface Collection
addAll
in interface List
public boolean addAll(int index_p, Collection c_p)
public int attributecount()
OwAttributeBag
attributecount
in interface OwAttributeBag
public void clear()
clear
in interface Collection
clear
in interface List
public boolean contains(Object o_p)
contains
in interface Collection
contains
in interface List
public boolean containsAll(Collection c_p)
containsAll
in interface Collection
containsAll
in interface List
public boolean equals(Object o_p)
public Object getAttribute(int index_p) throws Exception
OwAttributeBag
getAttribute
in interface OwAttributeBag
index_p
- int indexException
public Object getAttribute(String strName_p) throws Exception
OwAttributeBag
getAttribute
in interface OwAttributeBag
Exception
public Collection getAttributeNames()
OwAttributeBag
getAttributeNames
in interface OwAttributeBag
public void getNext() throws Exception
OwObjectCollection
getNext
in interface OwObjectCollection
Exception
public void getPrev() throws Exception
OwObjectCollection
getPrev
in interface OwObjectCollection
Exception
public Object getSafeAttribute(String strName_p, Object default_p)
OwAttributeBag
getSafeAttribute
in interface OwAttributeBag
public boolean hasAttribute(String strName_p)
OwAttributeBag
hasAttribute
in interface OwAttributeBag
public int hashCode()
public boolean hasNext() throws Exception
OwObjectCollection
hasNext
in interface OwObjectCollection
Exception
public boolean hasPrev() throws Exception
OwObjectCollection
hasPrev
in interface OwObjectCollection
Exception
public boolean isComplete() throws Exception
OwObjectCollection
isComplete
in interface OwObjectCollection
Exception
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
public Iterator iterator()
public int lastIndexOf(Object o_p)
lastIndexOf
in interface List
public ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index_p)
listIterator
in interface List
public boolean remove(Object o_p)
remove
in interface Collection
remove
in interface List
public boolean removeAll(Collection c_p)
removeAll
in interface Collection
removeAll
in interface List
public boolean retainAll(Collection c_p)
retainAll
in interface Collection
retainAll
in interface List
public int size()
size
in interface Collection
size
in interface List
public void sort(OwSort sortCriteria_p) throws Exception
OwObjectCollection
sort
in interface OwObjectCollection
sortCriteria_p
- list of sort criteriaException
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
public Object[] toArray(Object[] a_p)
toArray
in interface Collection
toArray
in interface List
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.