org.equanda.persistence
Class LazyProxyListBase<ID,PROXY extends EquandaProxy<ID,EquandaProxy>,EJB extends EquandaEJB<ID>,SEL extends EquandaSelector<ID,PROXY,EJB>>

java.lang.Object
  extended by org.equanda.persistence.LazyList<ID,PROXY>
      extended by org.equanda.persistence.LazyProxyListBase<ID,PROXY,EJB,SEL>
All Implemented Interfaces:
Serializable, Iterable<PROXY>, Collection<PROXY>, List<PROXY>, ExceptionCodes

public abstract class LazyProxyListBase<ID,PROXY extends EquandaProxy<ID,EquandaProxy>,EJB extends EquandaEJB<ID>,SEL extends EquandaSelector<ID,PROXY,EJB>>
extends LazyList<ID,PROXY>

LazyList for proxy objects

Author:
Joachim Van der Auwera
See Also:
Serialized Form

Field Summary
protected  String table
           
 
Fields inherited from class org.equanda.persistence.LazyList
query, selectorsState
 
Fields inherited from interface org.equanda.client.ExceptionCodes
CME_DATA_HAS_BEEN_ALREADY_CHANGED, ECV_CANNOT_ADD_NULL_TO_MULTIPLE_FIELD, ECV_CASCADE_KEEP, ECV_COMPARE_CONSTRAINT_NOT_SATISFIED, ECV_COMPARE_TYPE_CONSTRAINT_NOT_SATISFIED, ECV_CONSTRAINT_VIOLATION, ECV_COULD_NOT_TEST_CHOICES_USING_CLASS, ECV_DOWNCAST_CREATE_ERROR, ECV_DOWNCAST_FAILED_CANNOT_DOWNCAST_ROOT, ECV_DOWNCAST_SELECTOR_ERROR, ECV_FAILED_TO_CREATE_INCLUDED_VALUE, ECV_FAILED_TO_UPDATE_VALUE, ECV_FIELD_IS_REQUIRED, ECV_FIELD_IS_UNIQUE, ECV_IMMUTABLE_IF_OTHER_FIELD_IS_SET, ECV_INCLUDE_VALUE_HAS_WRONG_TYPE, ECV_INTERNAL_ERROR_ON_CREATE_INCLUDED_VALUE, ECV_INVALID_TABLE_TYPE, ECV_OTHERSIDE_EMBEDDED_FIELD_IMMUTABLE_ONCE_SET, ECV_VALUE_IS_NOT_ONE_OF_THE_CHOICES, EE_CANNOT_CREATE_LAZYCOLLECTION, EE_CANNOT_INIT_BEAN, EE_FAILED_PROXY_REMOVE, EE_FAILED_TO_UPDATE_VALUE, EE_OBJECT_NOT_FOUND, EPE_NULL_UOID_INVALID, EPE_PERSISTENCE_EXCEPTION, EPE_UOID_NOT_FOUND, UONA_OPERATION_NOT_ALLOWED
 
Constructor Summary
LazyProxyListBase(String table, EquandaQuery query)
           
LazyProxyListBase(String table, List<EquandaQuery> queries, boolean addOperator, int equandaLimit)
           
 
Method Summary
protected  PROXY[] getMultipleObjects(ID[] ids)
          Get TYPE objects for the given ids
protected  PROXY[] getMultipleObjects(int first, int size)
           
protected  PROXY getOneObject(ID id)
          Get TYPE object for the given Uoid.
protected  PROXY getOneObject(int index)
           
protected abstract  SEL getSelector()
          Get the selector object for the TYPE
protected  PROXY refreshObject(PROXY obj)
          Refresh the given object to make sure the data is live (used when cache timeout expired)
 
Methods inherited from class org.equanda.persistence.LazyList
add, add, addAll, addAll, clear, contains, containsAll, fullSize, get, getCacheCapacity, getCacheExpirationPeriod, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, refresh, remove, remove, removeAll, retainAll, set, setMockObject, size, subList, 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
equals, hashCode
 

Field Detail

table

protected String table
Constructor Detail

LazyProxyListBase

public LazyProxyListBase(String table,
                         EquandaQuery query)

LazyProxyListBase

public LazyProxyListBase(String table,
                         List<EquandaQuery> queries,
                         boolean addOperator,
                         int equandaLimit)
Method Detail

getSelector

protected abstract SEL getSelector()
                                                                  throws NamingException
Description copied from class: LazyList
Get the selector object for the TYPE

Specified by:
getSelector in class LazyList<ID,PROXY extends EquandaProxy<ID,EquandaProxy>>
Returns:
selector object
Throws:
NamingException - problems

getOneObject

protected PROXY getOneObject(ID id)
                                                            throws NamingException,
                                                                   EquandaException
Description copied from class: LazyList
Get TYPE object for the given Uoid.

Specified by:
getOneObject in class LazyList<ID,PROXY extends EquandaProxy<ID,EquandaProxy>>
Parameters:
id - pk
Returns:
object with given id
Throws:
NamingException - problems
EquandaException - problems

getOneObject

protected PROXY getOneObject(int index)
                                                            throws NamingException,
                                                                   EquandaException
Specified by:
getOneObject in class LazyList<ID,PROXY extends EquandaProxy<ID,EquandaProxy>>
Throws:
NamingException
EquandaException

refreshObject

protected PROXY refreshObject(PROXY obj)
                                                             throws NamingException,
                                                                    EquandaException
Description copied from class: LazyList
Refresh the given object to make sure the data is live (used when cache timeout expired)

Specified by:
refreshObject in class LazyList<ID,PROXY extends EquandaProxy<ID,EquandaProxy>>
Parameters:
obj - object to refresh
Returns:
fresh version of object
Throws:
NamingException - problems
EquandaException - problems

getMultipleObjects

protected PROXY[] getMultipleObjects(ID[] ids)
                                                                    throws NamingException,
                                                                           EquandaException
Description copied from class: LazyList
Get TYPE objects for the given ids

Specified by:
getMultipleObjects in class LazyList<ID,PROXY extends EquandaProxy<ID,EquandaProxy>>
Parameters:
ids - pks
Returns:
objects with given ids
Throws:
NamingException - problems
EquandaException - problems

getMultipleObjects

protected PROXY[] getMultipleObjects(int first,
                                     int size)
                                                                    throws NamingException,
                                                                           EquandaException
Specified by:
getMultipleObjects in class LazyList<ID,PROXY extends EquandaProxy<ID,EquandaProxy>>
Throws:
NamingException
EquandaException


Copyright © 2007-2009. All Rights Reserved.