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)
USER
if it was inserted by a user
JUPITER
if it was fetched from jupiter
FENIX
if it was fetched from fenix
JUPITER_FENIX
if it was present on both
fenix and jupiter
- See Also:
- Serialized Form
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 |
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 |
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
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 unitsource
- The source where this discipline came from- Throws:
java.lang.Exception
- if unitIdStr is not parseable into an integer
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)