org.openwms.common.service.spring
Class LocationServiceImpl

java.lang.Object
  extended by org.openwms.core.service.spring.EntityServiceImpl<Location,Long>
      extended by org.openwms.common.service.spring.LocationServiceImpl
All Implemented Interfaces:
LocationService<Location>, EntityService<Location>, org.springframework.context.ApplicationContextAware

@Transactional
@Service
public class LocationServiceImpl
extends EntityServiceImpl<Location,Long>
implements LocationService<Location>

A LocationServiceImpl.

Since:
0.1
Version:
$Revision: 1416 $
Author:
Heiko Scherrer
See Also:
EntityServiceImpl

Field Summary
 
Fields inherited from class org.openwms.core.service.spring.EntityServiceImpl
ctx
 
Constructor Summary
LocationServiceImpl()
           
 
Method Summary
 void createLocationType(LocationType locationType)
          Create a new LocationType.
 void deleteLocationTypes(List<LocationType> locationTypes)
          Delete already persisted LocationType instances.
 List<Location> getAllLocations()
          Return a list of all Locations not sorted and not filtered in natural order.
 List<LocationType> getAllLocationTypes()
          Return a list of all LocationTypes not sorted and not filtered in natural order.
 Location removeMessages(Long id, List<Message> messages)
          Removes a list of Messages from a Location.
 LocationType saveLocationType(LocationType locationType)
          Saves a LocationType.
 
Methods inherited from class org.openwms.core.service.spring.EntityServiceImpl
add, findAll, remove, save, setApplicationContext, setDao
 
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.service.EntityService
add, findAll, remove, save
 

Constructor Detail

LocationServiceImpl

public LocationServiceImpl()
Method Detail

getAllLocations

@Transactional(readOnly=false)
public List<Location> getAllLocations()
Return a list of all Locations not sorted and not filtered in natural order.

Specified by:
getAllLocations in interface LocationService<Location>
Returns:
All Locations as a list

removeMessages

public Location removeMessages(Long id,
                               List<Message> messages)
Description copied from interface: LocationService
Removes a list of Messages from a Location.

Specified by:
removeMessages in interface LocationService<Location>
Parameters:
id - The technical key of the Location
messages - The messages to be removed
Returns:
The updated Location
See Also:
LocationService.removeMessages(java.lang.Long, java.util.List)

getAllLocationTypes

@Transactional(readOnly=true)
public List<LocationType> getAllLocationTypes()
Return a list of all LocationTypes not sorted and not filtered in natural order.

Specified by:
getAllLocationTypes in interface LocationService<Location>
Returns:
All LocationTypes as a list

createLocationType

public void createLocationType(LocationType locationType)
Create a new LocationType. If the locationType is a transient one, it will be persisted otherwise saved.

Specified by:
createLocationType in interface LocationService<Location>
Parameters:
locationType - The type to be created

deleteLocationTypes

public void deleteLocationTypes(List<LocationType> locationTypes)
Delete already persisted LocationType instances. The implementation uses the id to find the LocationType to be removed and will removed the type when found.

Specified by:
deleteLocationTypes in interface LocationService<Location>
Parameters:
locationTypes - A list of all instances to be deleted.

saveLocationType

public LocationType saveLocationType(LocationType locationType)
Saves a LocationType.

Specified by:
saveLocationType in interface LocationService<Location>
Parameters:
locationType - The type to save
Returns:
The saved type


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