Class RetrieverUtils

java.lang.Object
  |
  +--RetrieverUtils

public class RetrieverUtils
extends java.lang.Object

Static methods used in the FrontEnd to query the SAS database system.


Constructor Summary
RetrieverUtils()
           
 
Method Summary
static java.util.HashMap getMajors()
          Builds a HashMap of major names mapping to minor ids.
static java.util.HashMap getMinors()
          Builds a HashMap of minor names mapping to minor ids.
static boolean isMajorOkWithMinor(java.lang.String major, java.lang.String minor)
          Checks to see if a particular minor is allowed with a particular major.
static void translateCourseList(java.util.Collection courseList)
          When a student's Banner transcript is parsed into a list of courses, it obviously does not contain the course id's used to represent the courses in the SAS database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetrieverUtils

public RetrieverUtils()
Method Detail

translateCourseList

public static void translateCourseList(java.util.Collection courseList)
                                throws java.sql.SQLException
When a student's Banner transcript is parsed into a list of courses, it obviously does not contain the course id's used to represent the courses in the SAS database. Using the dowling course codes as keys, this method figures out the corresponding course id's in the SAS database.

Parameters:
courseList - a Collection of Course objects to translate.
Throws:
java.sql.SQLException - if an error occurs while connecting to the SAS database.

isMajorOkWithMinor

public static boolean isMajorOkWithMinor(java.lang.String major,
                                         java.lang.String minor)
                                  throws java.sql.SQLException
Checks to see if a particular minor is allowed with a particular major.

Parameters:
major - A major id from the SAS database.
minor - A minor id from the SAS database.
Throws:
java.sql.SQLException - if an error occurs while connecting to the SAS database.

getMajors

public static java.util.HashMap getMajors()
                                   throws java.sql.SQLException
Builds a HashMap of major names mapping to minor ids. This method includes only majors with a DoubleFlagID of 1 or 2.

Throws:
java.sql.SQLException - if an error occurs while connecting to the SAS database.

getMinors

public static java.util.HashMap getMinors()
                                   throws java.sql.SQLException
Builds a HashMap of minor names mapping to minor ids. This method includes all minors.

Throws:
java.sql.SQLException - if an error occurs while connecting to the SAS database.