XPUSP - Home

br.usp.ime.xpusp.om
Class ProfessorPeer

java.lang.Object
  |
  +--org.apache.turbine.om.peer.BasePeer
        |
        +--br.usp.ime.xpusp.om.BaseProfessorPeer
              |
              +--br.usp.ime.xpusp.om.ProfessorPeer

public class ProfessorPeer
extends BaseProfessorPeer

The skeleton for this class was autogenerated by Torque on: [Sun Mar 03 13:12:58 GMT-03:00 2002] You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.


Field Summary
static java.lang.String GROUP
          This is the group used by professors
static java.lang.String ROLE
          This is the role granted to professors
 
Fields inherited from class br.usp.ime.xpusp.om.BaseProfessorPeer
CLASS_DEFAULT, CLASSNAME_DEFAULT, DEPARTMENT_CODE, FREE_SEMESTER, mapBuilder, numColumns, PROFESSOR_ID, TABLE_NAME
 
Fields inherited from class org.apache.turbine.om.peer.BasePeer
DEFAULT_MAP_BUILDER, IGNORE_CASE, mapBuilders, ORDER_BY
 
Constructor Summary
ProfessorPeer()
           
 
Method Summary
static Professor get(int professor_id, XpuspUser user)
          This method is used to get a Professor by the professor_id.
static org.apache.turbine.om.security.Group getGroup()
           
static org.apache.turbine.om.security.Role getRole()
           
 
Methods inherited from class br.usp.ime.xpusp.om.BaseProfessorPeer
addSelectColumns, buildCriteria, doDelete, doDelete, doDelete, doDelete, doInsert, doInsert, doInsert, doInsert, doSelect, doSelect, doSelectJoinDepartment, doSelectVillageRecords, doSelectVillageRecords, doUpdate, doUpdate, doUpdate, doUpdate, getMapBuilder, getOMClass, getTableMap, initClass, populateObject, populateObjects, resultSet2Objects, retrieveByPK, retrieveByPK, row2Object
 
Methods inherited from class org.apache.turbine.om.peer.BasePeer
, beginTransaction, commitTransaction, createPreparedStatement, createQueryString, deleteAll, deleteAll, doPSSelect, doPSSelect, doUpdate, doUpdate, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeStatement, executeStatement, executeStatement, getMapBuilder, getPrimaryKey, getSelectResults, getSelectResults, getSelectResults, getSelectResults, handleMultiple, handleMultipleRecords, hashtableToByteArray, initColumnNames, initCriteriaKeys, initTableColumns, initTableSchema, initTableSchema, insertOrUpdateRecord, rollBackTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

GROUP

public static final java.lang.String GROUP
This is the group used by professors

ROLE

public static final java.lang.String ROLE
This is the role granted to professors
Constructor Detail

ProfessorPeer

public ProfessorPeer()
Method Detail

getRole

public static org.apache.turbine.om.security.Role getRole()
                                                   throws java.lang.Exception
Returns:
the role used by professors

getGroup

public static org.apache.turbine.om.security.Group getGroup()
                                                     throws java.lang.Exception
Returns:
the group used by professors

get

public static Professor get(int professor_id,
                            XpuspUser user)
                     throws java.lang.Exception
This method is used to get a Professor by the professor_id. If the professor beeing fetched is the same as the professor returned by XpuspUser.getProfessor() this instance is returned. Otherwise, the professor is fetched from the db.
Parameters:
professor_id - the id of the professor
user - The user to be used to fetch the professor if it has the same id
Returns:
the Professor (reloaded if it is from the user) with professor_id or null if it doesnt exist

XPUSP - Home