com.sleepycat.persist.impl
Class CollectionProxy<E>

java.lang.Object
  extended by com.sleepycat.persist.impl.CollectionProxy<E>
All Implemented Interfaces:
PersistentProxy<java.util.Collection<E>>
Direct Known Subclasses:
CollectionProxy.ArrayListProxy, CollectionProxy.HashSetProxy, CollectionProxy.LinkedListProxy, CollectionProxy.TreeSetProxy

@Persistent
abstract class CollectionProxy<E>
extends java.lang.Object
implements PersistentProxy<java.util.Collection<E>>

Proxy for Collection types.

Author:
Mark Hayes

Nested Class Summary
(package private) static class CollectionProxy.ArrayListProxy<E>
           
(package private) static class CollectionProxy.HashSetProxy<E>
           
(package private) static class CollectionProxy.LinkedListProxy<E>
           
(package private) static class CollectionProxy.TreeSetProxy<E>
           
 
Constructor Summary
protected CollectionProxy()
           
 
Method Summary
 java.util.Collection<E> convertProxy()
          Returns a new proxied class instance to which the state of this proxy instance has been copied.
(package private) static void copyElements(EntityInput input, Format format, Format keyFormat, java.util.Set results)
           
(package private) static java.lang.Object[] getElements(RawObject collection)
           
 void initializeProxy(java.util.Collection<E> collection)
          Copies the state of a given proxied class instance to this proxy instance.
protected abstract  java.util.Collection<E> newInstance(int size)
           
(package private) static void setElements(RawObject collection, java.lang.Object[] elements)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionProxy

protected CollectionProxy()
Method Detail

initializeProxy

public final void initializeProxy(java.util.Collection<E> collection)
Description copied from interface: PersistentProxy
Copies the state of a given proxied class instance to this proxy instance.

Specified by:
initializeProxy in interface PersistentProxy<java.util.Collection<E>>

convertProxy

public final java.util.Collection<E> convertProxy()
Description copied from interface: PersistentProxy
Returns a new proxied class instance to which the state of this proxy instance has been copied.

Specified by:
convertProxy in interface PersistentProxy<java.util.Collection<E>>

newInstance

protected abstract java.util.Collection<E> newInstance(int size)

getElements

static java.lang.Object[] getElements(RawObject collection)

setElements

static void setElements(RawObject collection,
                        java.lang.Object[] elements)

copyElements

static void copyElements(EntityInput input,
                         Format format,
                         Format keyFormat,
                         java.util.Set results)


Copyright 2004-2006 Sleepycat, Inc. All Rights Reserved.