1 /**
2 * Copyright 2005-2006 the original author or authors.
3 *
4 * Licensed under the Gnu General Pubic License, Version 2.0 (the
5 * "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/gpl-license.php
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the Gnu General Public License for more details.
14 */
15 package org.figure8.join.businessobjects.security.persistence;
16
17 import org.figure8.join.core.persistence.ObjectDao;
18 import org.figure8.join.services.cache.CacheManager;
19 import org.figure8.join.businessobjects.security.Role;
20 /**
21 * Data Access interface for Permission business objects.
22 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
23 * @version $Revision: 1.1 $
24 */
25 public interface RoleDao extends ObjectDao{
26
27
28
29 /**
30 * Role data access object may want to use the cache manager for
31 * storing and retrieving releases. This Cache service provides an
32 * eternal cache for role objects.
33 * @param manager The CacheManager implementation to use.
34 */
35 public void setCacheManager(CacheManager manager);
36
37 /**
38 * Retrieve a security role using its identifier
39 * @param id The unique identifier of Role within datastore
40 * @return The role or null if no role exists with this id
41 */
42 public Role getRole(long id);
43
44 /**
45 * Retrieve a security role using its name
46 * @param name The name of the role
47 * @return The role or null if no role exists with this name
48 */
49 public Role getRole(String name);
50 }