org.apache.ojb.broker.accesslayer
Class ListProxy

java.lang.Object
  extended byorg.apache.ojb.broker.accesslayer.CollectionProxy
      extended byorg.apache.ojb.broker.accesslayer.ListProxy
All Implemented Interfaces:
java.util.Collection, java.util.List, ManageableCollection, java.io.Serializable

public class ListProxy
extends CollectionProxy
implements java.util.List

ListProxy.
A placeHolder for a whole list to support deferred loading of relationships. The complete relationship is loaded on request.

Version:
$Id: ListProxy.java,v 1.3 2003/06/19 19:58:18 thma Exp $
Author:
Jakob Braeuchi
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.ojb.broker.ManageableCollection
serialVersionUID
 
Constructor Summary
ListProxy(PBKey aKey, java.lang.Class aCollClass, Query aQuery)
          Constructor for ListProxy.
ListProxy(PBKey aKey, Query aQuery)
          Constructor for ListProxy.
 
Method Summary
 void add(int index, java.lang.Object element)
           
 boolean addAll(int index, java.util.Collection c)
           
 java.lang.Object get(int index)
           
protected  java.util.List getListData()
           
 int indexOf(java.lang.Object o)
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator listIterator()
           
 java.util.ListIterator listIterator(int index)
           
protected  java.util.Collection loadData()
          loads the data from the database, if count(*) returned > 0
 java.lang.Object remove(int index)
           
 java.lang.Object set(int index, java.lang.Object element)
           
 java.util.List subList(int fromIndex, int toIndex)
           
 
Methods inherited from class org.apache.ojb.broker.accesslayer.CollectionProxy
add, addAll, addListener, afterLoading, afterStore, beforeLoading, clear, contains, containsAll, getBroker, getBrokerKey, getCollectionClass, getData, getQuery, isEmpty, isLoaded, iterator, loadSize, ojbAdd, ojbAddAll, ojbIterator, releaseBroker, remove, removeAll, removeListener, retainAll, setBrokerKey, setCollectionClass, setData, setQuery, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

ListProxy

public ListProxy(PBKey aKey,
                 Query aQuery)
Constructor for ListProxy.

Parameters:
aKey -
aQuery -

ListProxy

public ListProxy(PBKey aKey,
                 java.lang.Class aCollClass,
                 Query aQuery)
Constructor for ListProxy.

Parameters:
aKey -
aCollClass -
aQuery -
Method Detail

addAll

public boolean addAll(int index,
                      java.util.Collection c)
Specified by:
addAll in interface java.util.List
See Also:
List.addAll(int, java.util.Collection)

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List
See Also:
List.get(int)

set

public java.lang.Object set(int index,
                            java.lang.Object element)
Specified by:
set in interface java.util.List
See Also:
List.set(int, java.lang.Object)

add

public void add(int index,
                java.lang.Object element)
Specified by:
add in interface java.util.List
See Also:
List.add(int, java.lang.Object)

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List
See Also:
List.remove(int)

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List
See Also:
List.indexOf(java.lang.Object)

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List
See Also:
List.lastIndexOf(java.lang.Object)

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List
See Also:
List.listIterator()

listIterator

public java.util.ListIterator listIterator(int index)
Specified by:
listIterator in interface java.util.List
See Also:
List.listIterator(int)

subList

public java.util.List subList(int fromIndex,
                              int toIndex)
Specified by:
subList in interface java.util.List
See Also:
List.subList(int, int)

getListData

protected java.util.List getListData()

loadData

protected java.util.Collection loadData()
                                 throws PersistenceBrokerException
Description copied from class: CollectionProxy
loads the data from the database, if count(*) returned > 0

Overrides:
loadData in class CollectionProxy
Throws:
PersistenceBrokerException
See Also:
CollectionProxy.loadData()


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14