org.openwms.core.service
Interface EntityService<T extends Serializable>

Type Parameters:
T - Any serializable type, mostly an entity class type
All Known Subinterfaces:
LocationGroupService<T>, LocationService<T>, TransportOrderService<T>, TransportUnitService<T>
All Known Implementing Classes:
EntityServiceImpl, LocationGroupServiceImpl, LocationServiceImpl, TransportServiceImpl, TransportUnitServiceImpl

public interface EntityService<T extends Serializable>

An EntityService is a generic interface definition of a simple CRUD service.

Basically this service is responsible to encapsulate CRUD functionality and delegates to repository implementations. Furthermore the service spans the transaction boundary and handles exception translation.

Since:
0.1
Version:
$Revision: 1538 $
Author:
Heiko Scherrer

Method Summary
 void add(T entity)
          Add an entity.
 List<T> findAll()
          Find all entities of type T.
 void remove(T entity)
          Removes an entity instance.
 T save(T entity)
          Save an entity of type T.
 

Method Detail

save

T save(T entity)
Save an entity of type T.

Parameters:
entity - Instance to be saved
Returns:
The saved instance

findAll

List<T> findAll()
Find all entities of type T. The result is specific to the implementation and can also be null.

Returns:
A list of all entities

remove

void remove(T entity)
Removes an entity instance.

Parameters:
entity - Instance to be removed

add

void add(T entity)
Add an entity.

Parameters:
entity - New entity instance to be added


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