org.equanda.persistence
Class LazyEJBListBase<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,EJB>
      extended by org.equanda.persistence.LazyEJBListBase<ID,PROXY,EJB,SEL>
All Implemented Interfaces:
Serializable, Iterable<EJB>, Collection<EJB>, List<EJB>, ExceptionCodes

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

LazyList for SFSB entity façades.

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
LazyEJBListBase(String table, EquandaQuery query)
           
LazyEJBListBase(String table, List<EquandaQuery> queries, boolean addOperator, int equandaLimit)
           
 
Method Summary
protected  EJB[] getMultipleObjects(ID[] ids)
          Get TYPE objects for the given ids
protected  EJB[] getMultipleObjects(int first, int size)
           
protected  EJB getOneObject(ID id)
          Get TYPE object for the given Uoid.
protected  EJB getOneObject(int index)
           
protected abstract  SEL getSelector()
          Get the selector object for the TYPE
protected  EJB refreshObject(EJB 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

LazyEJBListBase

public LazyEJBListBase(String table,
                       EquandaQuery query)

LazyEJBListBase

public LazyEJBListBase(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,EJB extends EquandaEJB<ID>>
Returns:
selector object
Throws:
NamingException - problems

getOneObject

protected EJB 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,EJB extends EquandaEJB<ID>>
Parameters:
id - pk
Returns:
object with given id
Throws:
NamingException - problems
EquandaException - problems

getOneObject

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

refreshObject

protected EJB refreshObject(EJB 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,EJB extends EquandaEJB<ID>>
Parameters:
obj - object to refresh
Returns:
fresh version of object
Throws:
NamingException - problems
EquandaException - problems

getMultipleObjects

protected EJB[] 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,EJB extends EquandaEJB<ID>>
Parameters:
ids - pks
Returns:
objects with given ids
Throws:
NamingException - problems
EquandaException - problems

getMultipleObjects

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


Copyright © 2007-2009. All Rights Reserved.