KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > turbine > om > security > peer > UserGroupRolePeer


1 package org.apache.turbine.om.security.peer;
2
3 /*
4  * Copyright 2001-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License")
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
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 JavaDoc TABLE_NAME = MAP_BUILDER.getTableUserGroupRole();
40
41     /** The column name for the visitor id field. */
42     public static final String JavaDoc USER_ID = MAP_BUILDER.getUserGroupRole_UserId();
43
44     /** The column name for the group id field. */
45     public static final String JavaDoc GROUP_ID = MAP_BUILDER.getUserGroupRole_GroupId();
46
47     /** The column name for the role id field. */
48     public static final String JavaDoc 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 JavaDoc 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 JavaDoc getColumnName(String JavaDoc name)
67     {
68         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
69         sb.append(TABLE_NAME);
70         sb.append(".");
71         sb.append(name);
72         return sb.toString();
73     }
74 }
75
Popular Tags