org.apache.turbine.util.db.map
Class TurbineMapBuilder

java.lang.Object
  |
  +--org.apache.turbine.util.db.map.TurbineMapBuilder
All Implemented Interfaces:
MapBuilder

public class TurbineMapBuilder
extends java.lang.Object
implements MapBuilder

Default Builder for Database/Table/Column Maps within the Turbine System. If you decide to use your own table schema, then you probably will want to implement this class on your own. It is then defined within the TurbineResources.properties file.

Version:
$Id: TurbineMapBuilder.java,v 1.2 2001/08/20 02:49:32 brekke Exp $
Author:
John D. McNally, Daniel Rall

Field Summary
protected  DatabaseMap dbMap
          The database map.
 
Constructor Summary
TurbineMapBuilder()
           
 
Method Summary
 void doBuild()
          Build up the databasemapping.
 java.lang.String getConfirmValue()
          Column used to store the user's confirmation flag.
 java.lang.String getCreated()
          Column used to store the user's record cration time.
 DatabaseMap getDatabaseMap()
          Gets the databasemap this map builder built.
 java.lang.String getDayOfMonth()
          Column used for the day of month when the job should be run.
 java.lang.String getEmail()
          Column used to store the user's email.
 java.lang.String getFirstName()
          Column used to store the user's first name.
 java.lang.String getGroup_GroupId()
          Fully qualified column name for Group id.
 java.lang.String getGroup_Name()
          Fully qualified column name for Group name.
 java.lang.String getGroup_ObjectData()
          Fully qualified column name for ObjectData column.
 java.lang.String getGroupId()
          Column used for the id of the Group table.
 java.lang.String getGroupName()
          Column used for the name of a Group.
 java.lang.String getHour()
          Column used for the hour when the job should be run.
 java.lang.String getJobentry_DayOfMonth()
          Fully qualified column name for day of month column.
 java.lang.String getJobentry_Email()
          Fully qualified column name for email column.
 java.lang.String getJobentry_Hour()
          Fully qualified column name for hour column.
 java.lang.String getJobentry_JobId()
          Fully qualified column name for Jobentry id.
 java.lang.String getJobentry_Minute()
          Fully qualified column name for minute column.
 java.lang.String getJobentry_Property()
          Fully qualified column name for property column.
 java.lang.String getJobentry_Second()
          Fully qualified column name for second column.
 java.lang.String getJobentry_Task()
          Fully qualified column name for task column.
 java.lang.String getJobentry_Weekday()
          Fully qualified column name for weekday column.
 java.lang.String getJobId()
          Column used for the id of Jobentry.
 java.lang.String getLastLogin()
          Column used to record the last login time for visitor.
 java.lang.String getLastName()
          Column used to store the user's last name.
 java.lang.String getMinute()
          Column used for the minute when the job should be run.
 java.lang.String getModified()
          Column used to store the user's data modification time.
 java.lang.String getObjectData()
          Column used to record general visitor data from a hashmap.
 java.lang.String getPassword()
          Column used to record the users password.
 java.lang.String getPermission_Name()
          Fully qualified column name for Permission table name of the permission.
 java.lang.String getPermission_ObjectData()
          Fully qualified column name for ObjectData column.
 java.lang.String getPermission_PermissionId()
          Fully qualified column name for Permission table unique key.
 java.lang.String getPermissionId()
          Column used for the id of the Permission table.
 java.lang.String getPermissionName()
          Column used for the name of a Permission.
 java.lang.String getProperty()
          Column used to store the job schedule property.
 java.lang.String getRole_Name()
          Fully qualified column name for Role name.
 java.lang.String getRole_ObjectData()
          Fully qualified column name for ObjectData column.
 java.lang.String getRole_RoleId()
          Fully qualified column name for Role unique key.
 java.lang.String getRoleId()
          Column used for the unique id to a Role.
 java.lang.String getRoleName()
          Column used for the name of Role.
 java.lang.String getRolePermission_PermissionId()
          Fully qualified column name for RolePermission permission id.
 java.lang.String getRolePermission_RoleId()
          Fully qualified column name for RolePermission role id.
 java.lang.String getSecond()
          Column used for the second when the job should be run.
 java.lang.String getSequenceGroup()
          GROUP_SEQUENCE.
 java.lang.String getSequencePermission()
          PERMISSION_SEQUENCE.
 java.lang.String getSequenceRole()
          ROLE_SEQUENCE.
 java.lang.String getSequenceUser()
          USER_SEQUENCE.
 java.lang.String getTableGroup()
          Get the Group table.
 java.lang.String getTableJobentry()
          Get the Jobentry table.
 java.lang.String getTablePermission()
          Get the Permission table.
 java.lang.String getTableRole()
          Get the UserRole table.
 java.lang.String getTableRolePermission()
          Get the RolePermission table.
 java.lang.String getTableUser()
          Get the User table.
 java.lang.String getTableUserGroupRole()
          Get the UserGroupRole table.
 java.lang.String getTask()
          Column used for the name of the class that should be run.
 java.lang.String getUser_ConfirmValue()
          Fully qualified column used to store the user's confirmation flag.
 java.lang.String getUser_Created()
          Fully qualified column used to store the user's record cration time.
 java.lang.String getUser_Email()
          Fully qualified column used to store the user's email.
 java.lang.String getUser_FirstName()
          Fully qualified column used to store the user's last name.
 java.lang.String getUser_LastLogin()
          Fully qualified column used to record the last login time for visitor.
 java.lang.String getUser_LastName()
          Fully qualified column used to store the user's last name.
 java.lang.String getUser_Modified()
          Fully qualified column used to store the user's data modification time.
 java.lang.String getUser_ObjectData()
          Fully qualified column used to record general visitor data from a hashmap.
 java.lang.String getUser_Password()
          Fully qualified column used to record the visitors password.
 java.lang.String getUser_UserId()
          Fully qualified Unique key to the visitor table.
 java.lang.String getUser_Username()
          Fully qualified column used to record the visitors username.
 java.lang.String getUserGroupRole_GroupId()
          Fully qualified column name for UserGroupRole group id.
 java.lang.String getUserGroupRole_RoleId()
          Fully qualified column name for UserGroupRole role id.
 java.lang.String getUserGroupRole_UserId()
          Fully qualified column name for UserGroupRole visitor id.
 java.lang.String getUserId()
          Internal Unique key to the visitor table.
 java.lang.String getUsername()
          Column used to record the users username.
 java.lang.String getWeekday()
          Column used for the weekday when the job should be run.
 boolean isBuilt()
          Tells us if this DatabaseMapBuilder is built so that we don't have to re-build it every time.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

dbMap

protected DatabaseMap dbMap
The database map.
Constructor Detail

TurbineMapBuilder

public TurbineMapBuilder()
Method Detail

getTableUser

public java.lang.String getTableUser()
Get the User table.
Returns:
A String.

getTableRole

public java.lang.String getTableRole()
Get the UserRole table.
Returns:
A String.

getTablePermission

public java.lang.String getTablePermission()
Get the Permission table.
Returns:
A String.

getTableUserGroupRole

public java.lang.String getTableUserGroupRole()
Get the UserGroupRole table.
Returns:
A String.

getTableRolePermission

public java.lang.String getTableRolePermission()
Get the RolePermission table.
Returns:
A String.

getTableGroup

public java.lang.String getTableGroup()
Get the Group table.
Returns:
A String.

getTableJobentry

public java.lang.String getTableJobentry()
Get the Jobentry table.
Returns:
A String.

getUserId

public java.lang.String getUserId()
Internal Unique key to the visitor table. Override this if using your custom table.
Returns:
A String.

getUser_UserId

public java.lang.String getUser_UserId()
Fully qualified Unique key to the visitor table. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getLastLogin

public java.lang.String getLastLogin()
Column used to record the last login time for visitor. Override this if using your custom table.
Returns:
A String.

getUser_LastLogin

public java.lang.String getUser_LastLogin()
Fully qualified column used to record the last login time for visitor. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getUsername

public java.lang.String getUsername()
Column used to record the users username. Override this if using your custom table.
Returns:
A String.

getUser_Username

public java.lang.String getUser_Username()
Fully qualified column used to record the visitors username. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getPassword

public java.lang.String getPassword()
Column used to record the users password. Override this if using your custom table.
Returns:
A String.

getUser_Password

public java.lang.String getUser_Password()
Fully qualified column used to record the visitors password. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getObjectData

public java.lang.String getObjectData()
Column used to record general visitor data from a hashmap. Override this if using your custom table.
Returns:
A String.

getUser_ObjectData

public java.lang.String getUser_ObjectData()
Fully qualified column used to record general visitor data from a hashmap. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getFirstName

public java.lang.String getFirstName()
Column used to store the user's first name. Override this if using your custom table.
Returns:
A String.

getUser_FirstName

public java.lang.String getUser_FirstName()
Fully qualified column used to store the user's last name. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getLastName

public java.lang.String getLastName()
Column used to store the user's last name. Override this if using your custom table.
Returns:
A String.

getUser_LastName

public java.lang.String getUser_LastName()
Fully qualified column used to store the user's last name. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getModified

public java.lang.String getModified()
Column used to store the user's data modification time. Override this if using your custom table.
Returns:
A String.

getUser_Modified

public java.lang.String getUser_Modified()
Fully qualified column used to store the user's data modification time. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getCreated

public java.lang.String getCreated()
Column used to store the user's record cration time. Override this if using your custom table.
Returns:
A String.

getUser_Created

public java.lang.String getUser_Created()
Fully qualified column used to store the user's record cration time. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getEmail

public java.lang.String getEmail()
Column used to store the user's email. Override this if using your custom table.
Returns:
A String.

getUser_Email

public java.lang.String getUser_Email()
Fully qualified column used to store the user's email. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getConfirmValue

public java.lang.String getConfirmValue()
Column used to store the user's confirmation flag. Override this if using your custom table.
Returns:
A String.

getUser_ConfirmValue

public java.lang.String getUser_ConfirmValue()
Fully qualified column used to store the user's confirmation flag. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getRoleId

public java.lang.String getRoleId()
Column used for the unique id to a Role. Override this if using your custom table
Returns:
A String.

getRole_RoleId

public java.lang.String getRole_RoleId()
Fully qualified column name for Role unique key. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getRoleName

public java.lang.String getRoleName()
Column used for the name of Role. Override this if using your custom table.
Returns:
A String.

getRole_Name

public java.lang.String getRole_Name()
Fully qualified column name for Role name. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getRole_ObjectData

public java.lang.String getRole_ObjectData()
Fully qualified column name for ObjectData column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getPermissionId

public java.lang.String getPermissionId()
Column used for the id of the Permission table. Override this if using your custom table.
Returns:
A String.

getPermission_PermissionId

public java.lang.String getPermission_PermissionId()
Fully qualified column name for Permission table unique key. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getPermissionName

public java.lang.String getPermissionName()
Column used for the name of a Permission. Override this if using your custom table.
Returns:
A String.

getPermission_Name

public java.lang.String getPermission_Name()
Fully qualified column name for Permission table name of the permission. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getPermission_ObjectData

public java.lang.String getPermission_ObjectData()
Fully qualified column name for ObjectData column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getUserGroupRole_UserId

public java.lang.String getUserGroupRole_UserId()
Fully qualified column name for UserGroupRole visitor id. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getUserGroupRole_GroupId

public java.lang.String getUserGroupRole_GroupId()
Fully qualified column name for UserGroupRole group id. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getUserGroupRole_RoleId

public java.lang.String getUserGroupRole_RoleId()
Fully qualified column name for UserGroupRole role id. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getRolePermission_PermissionId

public java.lang.String getRolePermission_PermissionId()
Fully qualified column name for RolePermission permission id. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getRolePermission_RoleId

public java.lang.String getRolePermission_RoleId()
Fully qualified column name for RolePermission role id. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getGroupId

public java.lang.String getGroupId()
Column used for the id of the Group table. Override this if using your custom table.
Returns:
A String.

getGroup_GroupId

public java.lang.String getGroup_GroupId()
Fully qualified column name for Group id. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getGroupName

public java.lang.String getGroupName()
Column used for the name of a Group. Override this if using your custom table.
Returns:
A String.

getGroup_Name

public java.lang.String getGroup_Name()
Fully qualified column name for Group name. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getGroup_ObjectData

public java.lang.String getGroup_ObjectData()
Fully qualified column name for ObjectData column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getJobId

public java.lang.String getJobId()
Column used for the id of Jobentry. Override this if using your custom table.
Returns:
A String.

getJobentry_JobId

public java.lang.String getJobentry_JobId()
Fully qualified column name for Jobentry id. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getSecond

public java.lang.String getSecond()
Column used for the second when the job should be run. Override this if using your custom table.
Returns:
A String.

getJobentry_Second

public java.lang.String getJobentry_Second()
Fully qualified column name for second column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getMinute

public java.lang.String getMinute()
Column used for the minute when the job should be run. Override this if using your custom table.
Returns:
A String.

getJobentry_Minute

public java.lang.String getJobentry_Minute()
Fully qualified column name for minute column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getHour

public java.lang.String getHour()
Column used for the hour when the job should be run. Override this if using your custom table.
Returns:
A String.

getJobentry_Hour

public java.lang.String getJobentry_Hour()
Fully qualified column name for hour column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getWeekday

public java.lang.String getWeekday()
Column used for the weekday when the job should be run. Override this if using your custom table.
Returns:
A String.

getJobentry_Weekday

public java.lang.String getJobentry_Weekday()
Fully qualified column name for weekday column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getDayOfMonth

public java.lang.String getDayOfMonth()
Column used for the day of month when the job should be run. Override this if using your custom table.
Returns:
A String.

getJobentry_DayOfMonth

public java.lang.String getJobentry_DayOfMonth()
Fully qualified column name for day of month column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getTask

public java.lang.String getTask()
Column used for the name of the class that should be run. Override this if using your custom table.
Returns:
A String.

getJobentry_Task

public java.lang.String getJobentry_Task()
Fully qualified column name for task column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getJobentry_Email

public java.lang.String getJobentry_Email()
Fully qualified column name for email column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getProperty

public java.lang.String getProperty()
Column used to store the job schedule property. Override this if using your custom table.
Returns:
A String.

getJobentry_Property

public java.lang.String getJobentry_Property()
Fully qualified column name for property column. Shouldn't need to override this as it uses the above methods.
Returns:
A String.

getSequenceGroup

public java.lang.String getSequenceGroup()
GROUP_SEQUENCE.
Returns:
A String.

getSequencePermission

public java.lang.String getSequencePermission()
PERMISSION_SEQUENCE.
Returns:
A String.

getSequenceRole

public java.lang.String getSequenceRole()
ROLE_SEQUENCE.
Returns:
A String.

getSequenceUser

public java.lang.String getSequenceUser()
USER_SEQUENCE.
Returns:
A String.

isBuilt

public boolean isBuilt()
Tells us if this DatabaseMapBuilder is built so that we don't have to re-build it every time.
Specified by:
isBuilt in interface MapBuilder
Returns:
True if DatabaseMapBuilder is built.

getDatabaseMap

public DatabaseMap getDatabaseMap()
Gets the databasemap this map builder built.
Specified by:
getDatabaseMap in interface MapBuilder
Returns:
A DatabaseMap.

doBuild

public void doBuild()
             throws java.lang.Exception
Build up the databasemapping. It should probably be modified to read a .xml file representation of the database to build this.
Specified by:
doBuild in interface MapBuilder
Throws:
Exception, - a generic exception.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.