org.openwms.core.service.spring
Class RoleServiceImpl

java.lang.Object
  extended by org.openwms.core.service.spring.RoleServiceImpl
All Implemented Interfaces:
RoleService

@Transactional
@Service(value="roleService")
public class RoleServiceImpl
extends Object
implements RoleService

A RoleServiceImpl is a Spring supported transactional implementation of a general RoleService. Using Spring 2 annotation support autowires collaborators, therefore XML configuration becomes obsolete. This class is marked with Springs Service annotation to benefit from Springs exception translation intercepter. Traditional CRUD operations are delegated to a RoleDao instance.

This implementation can be autowired with the name "roleService".

Since:
0.1
Version:
$Revision: 1585 $
Author:
Heiko Scherrer
See Also:
RoleDao

Field Summary
static String COMPONENT_NAME
          Springs service name.
 
Constructor Summary
RoleServiceImpl()
           
 
Method Summary
 List<Role> findAll()
          Return a list of all existing Roles.
 void remove(List<Role> roles)
          Remove a list of Roles.
 Role save(Role role)
          Save an already existed Role and return the saved instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_NAME

public static final String COMPONENT_NAME
Springs service name.

See Also:
Constant Field Values
Constructor Detail

RoleServiceImpl

public RoleServiceImpl()
Method Detail

remove

public void remove(List<Role> roles)
Remove a list of Roles.

Specified by:
remove in interface RoleService
Parameters:
roles - The list of Roles to remove.
Throws:
IllegalArgumentException - when roles is null

save

public Role save(Role role)
Save an already existed Role and return the saved instance.

Specified by:
save in interface RoleService
Parameters:
role - The Role to be saved
Returns:
The saved Role
Throws:
IllegalArgumentException - when role is null

findAll

@Transactional(readOnly=true)
public List<Role> findAll()
Return a list of all existing Roles. Marked as readOnly transactional method.

Specified by:
findAll in interface RoleService
Returns:
A list of Roles or an empty list when no Roles exist


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