1 package org.apache.turbine.om.security.peer;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.torque.util.BasePeer;
20
21 import org.apache.turbine.util.db.map.TurbineMapBuilder;
22
23 /***
24 * This class handles all database access for the VISITOR_ROLE table.
25 * This table contains all the roles that a given user can play.
26 *
27 * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
28 * @author <a href="mailto:john.mcnally@clearink.com">John D. McNally</a>
29 * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
30 * @version $Id: UserGroupRolePeer.java 264148 2005-08-29 14:21:04Z henning $
31 */
32 public class UserGroupRolePeer extends BasePeer
33 {
34 /*** Serial Version UID */
35 private static final long serialVersionUID = -9097451661613525751L;
36
37 /*** The map builder for this Peer. */
38 private static final TurbineMapBuilder MAP_BUILDER = (TurbineMapBuilder)
39 getMapBuilder(TurbineMapBuilder.class.getName());
40
41 /*** The table name for this peer. */
42 public static final String TABLE_NAME = MAP_BUILDER.getTableUserGroupRole();
43
44 /*** The column name for the visitor id field. */
45 public static final String USER_ID = MAP_BUILDER.getUserGroupRole_UserId();
46
47 /*** The column name for the group id field. */
48 public static final String GROUP_ID = MAP_BUILDER.getUserGroupRole_GroupId();
49
50 /*** The column name for the role id field. */
51 public static final String ROLE_ID = MAP_BUILDER.getUserGroupRole_RoleId();
52
53 /***
54 * Get the name of this table.
55 *
56 * @return A String with the name of the table.
57 */
58 public static String getTableName()
59 {
60 return TABLE_NAME;
61 }
62
63 /***
64 * Returns the full name of a column.
65 *
66 * @param name name of a column
67 * @return A String with the full name of the column.
68 */
69 public static String getColumnName(String name)
70 {
71 StringBuffer sb = new StringBuffer();
72 sb.append(TABLE_NAME);
73 sb.append(".");
74 sb.append(name);
75 return sb.toString();
76 }
77 }