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,v 1.6.2.2 2004/05/20 03:05:17 seade Exp $
31 */
32 public class UserGroupRolePeer extends BasePeer
33 {
34 /*** The map builder for this Peer. */
35 private static final TurbineMapBuilder MAP_BUILDER = (TurbineMapBuilder)
36 getMapBuilder(TurbineMapBuilder.class.getName());
37
38 /*** The table name for this peer. */
39 public static final String TABLE_NAME = MAP_BUILDER.getTableUserGroupRole();
40
41 /*** The column name for the visitor id field. */
42 public static final String USER_ID = MAP_BUILDER.getUserGroupRole_UserId();
43
44 /*** The column name for the group id field. */
45 public static final String GROUP_ID = MAP_BUILDER.getUserGroupRole_GroupId();
46
47 /*** The column name for the role id field. */
48 public static final String ROLE_ID = MAP_BUILDER.getUserGroupRole_RoleId();
49
50 /***
51 * Get the name of this table.
52 *
53 * @return A String with the name of the table.
54 */
55 public static String getTableName()
56 {
57 return TABLE_NAME;
58 }
59
60 /***
61 * Returns the full name of a column.
62 *
63 * @param name name of a column
64 * @return A String with the full name of the column.
65 */
66 public static String getColumnName(String name)
67 {
68 StringBuffer sb = new StringBuffer();
69 sb.append(TABLE_NAME);
70 sb.append(".");
71 sb.append(name);
72 return sb.toString();
73 }
74 }