com.wewebu.ow.server.plug.owrecord.filter
Class OwFilterObjectCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList
                  extended by com.wewebu.ow.server.plug.owrecord.filter.OwFilterObjectCollection
All Implemented Interfaces:
com.wewebu.ow.server.ecm.OwObjectCollection, com.wewebu.ow.server.util.OwAttributeBag, Serializable, Cloneable, Iterable, Collection, Deque, List, Queue

public class OwFilterObjectCollection
extends LinkedList
implements com.wewebu.ow.server.ecm.OwObjectCollection

Filter collection. Filters an OwObjectCollection based on a OwSearchNode filter setting.
This class does not modifies the base collection, and works with the objects from the base collection.

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

Since:
3.2.0.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwObjectCollection
ATTRIBUTE_IS_COMPLETE, ATTRIBUTE_SIZE, ATTRIBUTE_SQL
 
Constructor Summary
OwFilterObjectCollection(com.wewebu.ow.server.ecm.OwObjectCollection nativeCollection)
           
OwFilterObjectCollection(com.wewebu.ow.server.ecm.OwObjectCollection nativeCollection, com.wewebu.ow.server.field.OwSearchNode filter)
           
 
Method Summary
 int attributecount()
           
 void clear()
           
 Object getAttribute(int iIndex_p)
           
 Object getAttribute(String strName_p)
           
 Collection getAttributeNames()
           
 com.wewebu.ow.server.field.OwSearchNode getFilter()
          Return the current search node which is used as filter, can return null if no filter is set.
 com.wewebu.ow.server.ecm.OwObjectCollection getNativeCollection()
          Returns the collection which is used to represent only the entries which are matching the filter.
 void getNext()
           
 void getPrev()
           
 Object getSafeAttribute(String strName_p, Object default_p)
           
 boolean hasAttribute(String strName_p)
           
 boolean hasFilter()
          Method to check if a filter was set.
 boolean hasNext()
           
 boolean hasPrev()
           
 boolean isComplete()
           
protected  void processFilterList(List<com.wewebu.ow.server.field.OwSearchCriteria> filters)
          (overridable) Method called to process the filter action based on the given list of criteria.
 void setFilter(com.wewebu.ow.server.field.OwSearchNode filter)
          Set a filter which should be processed on the the native collection.
 void sort(com.wewebu.ow.server.field.OwSort sortCriteria_p)
           
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from interface java.util.Deque
iterator
 

Constructor Detail

OwFilterObjectCollection

public OwFilterObjectCollection(com.wewebu.ow.server.ecm.OwObjectCollection nativeCollection)

OwFilterObjectCollection

public OwFilterObjectCollection(com.wewebu.ow.server.ecm.OwObjectCollection nativeCollection,
                                com.wewebu.ow.server.field.OwSearchNode filter)
Method Detail

clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface List
Overrides:
clear in class LinkedList

getAttribute

public Object getAttribute(int iIndex_p)
                    throws Exception
Specified by:
getAttribute in interface com.wewebu.ow.server.util.OwAttributeBag
Throws:
Exception

getAttribute

public Object getAttribute(String strName_p)
                    throws Exception
Specified by:
getAttribute in interface com.wewebu.ow.server.util.OwAttributeBag
Throws:
Exception

getSafeAttribute

public Object getSafeAttribute(String strName_p,
                               Object default_p)
Specified by:
getSafeAttribute in interface com.wewebu.ow.server.util.OwAttributeBag

hasAttribute

public boolean hasAttribute(String strName_p)
Specified by:
hasAttribute in interface com.wewebu.ow.server.util.OwAttributeBag

attributecount

public int attributecount()
Specified by:
attributecount in interface com.wewebu.ow.server.util.OwAttributeBag

getAttributeNames

public Collection getAttributeNames()
Specified by:
getAttributeNames in interface com.wewebu.ow.server.util.OwAttributeBag

isComplete

public boolean isComplete()
                   throws Exception
Specified by:
isComplete in interface com.wewebu.ow.server.ecm.OwObjectCollection
Throws:
Exception

hasNext

public boolean hasNext()
                throws Exception
Specified by:
hasNext in interface com.wewebu.ow.server.ecm.OwObjectCollection
Throws:
Exception

hasPrev

public boolean hasPrev()
                throws Exception
Specified by:
hasPrev in interface com.wewebu.ow.server.ecm.OwObjectCollection
Throws:
Exception

getNext

public void getNext()
             throws Exception
Specified by:
getNext in interface com.wewebu.ow.server.ecm.OwObjectCollection
Throws:
Exception

getPrev

public void getPrev()
             throws Exception
Specified by:
getPrev in interface com.wewebu.ow.server.ecm.OwObjectCollection
Throws:
Exception

sort

public void sort(com.wewebu.ow.server.field.OwSort sortCriteria_p)
          throws Exception
Specified by:
sort in interface com.wewebu.ow.server.ecm.OwObjectCollection
Throws:
Exception

getNativeCollection

public com.wewebu.ow.server.ecm.OwObjectCollection getNativeCollection()
Returns the collection which is used to represent only the entries which are matching the filter.

Returns:
OwObjectCollection

setFilter

public void setFilter(com.wewebu.ow.server.field.OwSearchNode filter)
Set a filter which should be processed on the the native collection.

Will trigger filter list action, if given parameter is not null.

Parameters:
filter - OwSearchNode
See Also:
processFilterList(List), getNativeCollection()

hasFilter

public boolean hasFilter()
Method to check if a filter was set.

Check is done on null value, empty filter setting is not concerned.

Returns:
true only if filter is not null, else false

getFilter

public com.wewebu.ow.server.field.OwSearchNode getFilter()
Return the current search node which is used as filter, can return null if no filter is set.

Returns:
OwSearchNode or null

processFilterList

protected void processFilterList(List<com.wewebu.ow.server.field.OwSearchCriteria> filters)
(overridable) Method called to process the filter action based on the given list of criteria.

Can throw a OwRuntimeException if there is a problem during filter process.

Parameters:
filters - List of OwSearchCriteria


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.