01: /*
02: * UserDAO.java
03: *
04: * Created on 28 de marzo de 2005, 13:45
05: */
06:
07: package org.manentia.kasai.role;
08:
09: import java.util.Collection;
10: import java.util.List;
11:
12: import org.manentia.kasai.Role;
13: import org.manentia.kasai.exceptions.*;
14:
15: /**
16: *
17: * @author rzuasti
18: */
19: public interface RoleDAO {
20:
21: public void addOperativeToRole(final String idOperative,
22: final int role) throws DoesntExistsException,
23: DataAccessException;
24:
25: public int create(String name, String description,
26: String[] operatives) throws InvalidAttributesException,
27: AlreadyExistsException, DoesntExistsException,
28: DataAccessException;
29:
30: public void deleteOperativeFromRole(String idOperative, int role)
31: throws DataAccessException;
32:
33: public void delete(int id) throws DataAccessException;
34:
35: public Collection listOperativesFromRole(int role, String operative)
36: throws DataAccessException;
37:
38: public Collection listOperativesNotInRole(int role)
39: throws DataAccessException;
40:
41: public List list(String name, boolean exactly)
42: throws DataAccessException;
43:
44: public Role read(int role) throws DataAccessException;
45:
46: public void update(int id, String name, String description)
47: throws InvalidAttributesException, DataAccessException;
48:
49: public void update(int id, String name, String description,
50: String[] operatives) throws InvalidAttributesException,
51: DataAccessException;
52: }
|