org.openwms.tms.integration.jpa
Class TransportOrderDaoImpl

java.lang.Object
  extended by org.openwms.core.integration.jpa.AbstractGenericJpaDao<TransportOrder,Long>
      extended by org.openwms.tms.integration.jpa.TransportOrderDaoImpl
All Implemented Interfaces:
GenericDao<TransportOrder,Long>, TransportOrderDao

@Transactional
@Repository
public class TransportOrderDaoImpl
extends AbstractGenericJpaDao<TransportOrder,Long>
implements TransportOrderDao

A TransportOrderDaoImpl.

Since:
0.1
Version:
$Revision: 1583 $
Author:
Heiko Scherrer
See Also:
AbstractGenericJpaDao, TransportOrderDao

Field Summary
 
Fields inherited from class org.openwms.core.integration.jpa.AbstractGenericJpaDao
logger
 
Fields inherited from interface org.openwms.core.integration.GenericDao
FIND_ALL, FIND_BY_ID
 
Constructor Summary
TransportOrderDaoImpl()
           
 
Method Summary
 List<TransportOrder> findByIds(List<Long> ids)
          Find and retrieve a list of TransportOrders, searched by a list of their ids.
 List<TransportOrder> findForTUinState(TransportUnit transportUnit, TransportOrderState... states)
          Find a list of TransportOrders within defined states for a given TransportUnit.
protected  String getFindAllQuery()
          Returns the name of the NamedQuery to find all Entity classes.
protected  String getFindByUniqueIdQuery()
          Returns the name of the NamedQuery to find an Entity by the business key.
 int getNumberOfTransportOrders(LocationGroup locationGroup)
          Get all active TransportOrders that have the target destination to this locationGroup.
 
Methods inherited from class org.openwms.core.integration.jpa.AbstractGenericJpaDao
beforeUpdate, findAll, findById, findByNamedParameters, findByPositionalParameters, findByUniqueId, getEm, getPersistentClass, persist, remove, save, setPersistentClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openwms.core.integration.GenericDao
findAll, findById, findByNamedParameters, findByPositionalParameters, findByUniqueId, persist, remove, save, setPersistentClass
 

Constructor Detail

TransportOrderDaoImpl

public TransportOrderDaoImpl()
Method Detail

getFindAllQuery

protected String getFindAllQuery()
Returns the name of the NamedQuery to find all Entity classes.

Specified by:
getFindAllQuery in class AbstractGenericJpaDao<TransportOrder,Long>
Returns:
Name of the query
See Also:
AbstractGenericJpaDao.getFindAllQuery()

getFindByUniqueIdQuery

protected String getFindByUniqueIdQuery()
Returns the name of the NamedQuery to find an Entity by the business key.

Specified by:
getFindByUniqueIdQuery in class AbstractGenericJpaDao<TransportOrder,Long>
Returns:
Name of the query
See Also:
AbstractGenericJpaDao.getFindByUniqueIdQuery()

getNumberOfTransportOrders

public int getNumberOfTransportOrders(LocationGroup locationGroup)
Get all active TransportOrders that have the target destination to this locationGroup.

Specified by:
getNumberOfTransportOrders in interface TransportOrderDao
Parameters:
locationGroup - The group to search for
Returns:
The number of all active TransportOrders
See Also:
TransportOrderDao.getNumberOfTransportOrders(org.openwms.common.domain.LocationGroup)

findByIds

public List<TransportOrder> findByIds(List<Long> ids)
Find and retrieve a list of TransportOrders, searched by a list of their ids.

Specified by:
findByIds in interface TransportOrderDao
Parameters:
ids - A list of technical keys of the orders to search for
Returns:
The list of TransportOrders.
See Also:
TransportOrderDao.findByIds(java.util.List)

findForTUinState

public List<TransportOrder> findForTUinState(TransportUnit transportUnit,
                                             TransportOrderState... states)
Find a list of TransportOrders within defined states for a given TransportUnit. The implementation does never return null. In case no TransportOrders are found an empty List is returned.

Specified by:
findForTUinState in interface TransportOrderDao
Parameters:
transportUnit - The TransportUnit to search for
states - An arbitrary array of states
Returns:
A list of TransportOrders or an empty list.
See Also:
TransportOrderDao.findForTUinState(org.openwms.common.domain.TransportUnit, org.openwms.tms.domain.values.TransportOrderState[])


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