org.openwms.core.service.spring.util
Class ServiceHelper

java.lang.Object
  extended by org.openwms.core.service.spring.util.ServiceHelper

public final class ServiceHelper
extends Object

A ServiceHelper centralizes common used utility methods to convert and deal with domain objects.

Since:
0.1
Version:
$Revision: 1539 $
Author:
Tina Russell

Method Summary
static
<T extends AbstractEntity & DomainObject<ID>,ID extends Serializable>
List<T>
managedEntities(Collection<T> detachedEntities, GenericDao<T,ID> dao)
          Returns a list of managed entities from a collection of detached entities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

managedEntities

public static <T extends AbstractEntity & DomainObject<ID>,ID extends Serializable> List<T> managedEntities(Collection<T> detachedEntities,
                                                                                                           GenericDao<T,ID> dao)
Returns a list of managed entities from a collection of detached entities. Each entity in detachedEntities is reloaded with the dao.

Type Parameters:
T - The type of entity
ID - The type of entity's primary key
Parameters:
detachedEntities - A collection of detached entities
dao - An instance of a DAO, used for reloading
Returns:
The list of managed entities or an empty list


Copyright © 2005-2011 openwms.org. All Rights Reserved.