XPUSP - Home

br.usp.ime.xpusp.om
Class Unit

java.lang.Object
  |
  +--org.apache.turbine.om.BaseObject
        |
        +--br.usp.ime.xpusp.om.BaseUnit
              |
              +--br.usp.ime.xpusp.om.Unit
All Implemented Interfaces:
org.apache.turbine.om.Persistent, org.apache.turbine.om.Retrievable, java.io.Serializable

public class Unit
extends BaseUnit
implements org.apache.turbine.om.Persistent

This class represents a unit like Institute of Maths... It can be of 4 sources (ie getSourceId/setSourceId)

  1. USER if it was inserted by a user
  2. JUPITER if it was fetched from jupiter
  3. FENIX if it was fetched from fenix
  4. JUPITER_FENIX if it was present on both fenix and jupiter

See Also:
Serialized Form

Field Summary
static int FENIX
           
static java.lang.String FENIX_URL
           
static int JUPITER
           
static int JUPITER_FENIX
           
static java.lang.String JUPITER_URL
           
static int USER
           
 
Fields inherited from class br.usp.ime.xpusp.om.BaseUnit
alreadyInSave, aSource, campus, collCourses, collDepartments, lastCoursesCriteria, lastDepartmentsCriteria, name, source_id, unit_id
 
Fields inherited from class org.apache.turbine.om.BaseObject
errMsg, is_new, modified, NEW_ID, primaryKey
 
Constructor Summary
Unit()
           
Unit(java.lang.String unitIdStr, java.lang.String name, int source)
          Construct a new Unit
 
Method Summary
 java.lang.String getFenixInfoUrl()
           
static java.lang.String getFenixUnitListUrl()
           
 java.lang.String getJupiterCoursesUrl()
           
 java.lang.String getJupiterDepartmentUrl()
           
 java.lang.String getJupiterInfoUrl()
           
static java.lang.String getJupiterUnitListUrl()
           
 void setSourceId(int i)
           
 
Methods inherited from class br.usp.ime.xpusp.om.BaseUnit
addCourse, addDepartment, copy, getCampus, getCourses, getCourses, getCoursesJoinDepartment, getCoursesJoinSource, getDepartments, getDepartments, getDepartmentsJoinSource, getName, getPrimaryKey, getQueryKey, getSource, getSourceId, getUnitId, initCourses, initDepartments, save, save, save, setCampus, setName, setPrimaryKey, setPrimaryKey, setQueryKey, setSource, setSourceId, setSourceId, setSourceKey, setUnitId, setUnitId
 
Methods inherited from class org.apache.turbine.om.BaseObject
, equals, equals, getByName, getByPeerName, getByPosition, getPrimaryKeyAsBigDecimal, getPrimaryKeyAsInt, getPrimaryKeyAsLong, getPrimaryKeyAsString, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.om.Persistent
getPrimaryKey, isModified, isNew, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 

Field Detail

USER

public static final int USER

JUPITER

public static final int JUPITER

FENIX

public static final int FENIX

JUPITER_FENIX

public static final int JUPITER_FENIX

JUPITER_URL

public static final java.lang.String JUPITER_URL

FENIX_URL

public static final java.lang.String FENIX_URL
Constructor Detail

Unit

public Unit()

Unit

public Unit(java.lang.String unitIdStr,
            java.lang.String name,
            int source)
     throws java.lang.Exception
Construct a new Unit
Parameters:
unitIdStr - A string with the id of the new unit.
name - The name of this unit
source - The source where this discipline came from
Throws:
java.lang.Exception - if unitIdStr is not parseable into an integer
Method Detail

setSourceId

public void setSourceId(int i)
                 throws java.lang.Exception

getJupiterUnitListUrl

public static java.lang.String getJupiterUnitListUrl()
Returns:
the url for fetching units from jupiter

getFenixUnitListUrl

public static java.lang.String getFenixUnitListUrl()
Returns:
the url for fetching units from fenix

getJupiterInfoUrl

public java.lang.String getJupiterInfoUrl()
Returns:
this unit's URL in jupiter system or null if it is not present in jupiter (ie getSource() is neither JUPITER nor JUPITER_FENIX)

getFenixInfoUrl

public java.lang.String getFenixInfoUrl()
Returns:
this unit's URL in fenix system or null if it is not present in jupiter (ie getSourceId().getBigDecimal().intValue() is neither FENIX nor JUPITER_FENIX)

getJupiterCoursesUrl

public java.lang.String getJupiterCoursesUrl()
Returns:
this unit's URL in jupiter system or null if it is not present in jupiter (ie getSourceId().getBigDecimal().intValue() is neither JUPITER nor JUPITER_FENIX)

getJupiterDepartmentUrl

public java.lang.String getJupiterDepartmentUrl()
Returns:
this unit's URL in jupiter system or null if it is not present in jupiter (ie getSourceId().getBigDecimal().intValue() is neither JUPITER nor JUPITER_FENIX)

XPUSP - Home