Class ICSDatabase

java.lang.Object
  extended by ICSDatabase

 class ICSDatabase
extends java.lang.Object

This is AF2's database connection class. Used for accessing various parameters from the ICS database required by AF2.


Field Summary
private  java.sql.Connection con
           
private  java.lang.String DB_FORNAME
           
private  java.lang.String DB_HOSTNAME
           
private  java.lang.String DB_PASSWORD
           
private  int DB_PORT
           
private  java.lang.String DB_SOURCE_URL
           
private  java.lang.String DB_USER
           
 
Constructor Summary
ICSDatabase()
          Constructor for the ICSDatabase class.
 
Method Summary
(package private)  int getAxisParameter(java.lang.String Axis, java.lang.String parameter)
          Get an axis parameter from the ICS database
(package private)  int getOffsetParameter(java.lang.String Offset, java.lang.String parameter)
           
(package private)  void setAxisParameter(java.lang.String Axis, java.lang.String parameter, int value)
          Set an axis parameter in the ICS database
(package private)  void setOffsetParameter(java.lang.String Offset, java.lang.String parameter, int value)
          Set an offset parameter in the ICS database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DB_PORT

private final int DB_PORT
See Also:
Constant Field Values

DB_HOSTNAME

private final java.lang.String DB_HOSTNAME
See Also:
Constant Field Values

DB_USER

private final java.lang.String DB_USER
See Also:
Constant Field Values

DB_PASSWORD

private final java.lang.String DB_PASSWORD
See Also:
Constant Field Values

DB_FORNAME

private final java.lang.String DB_FORNAME
See Also:
Constant Field Values

DB_SOURCE_URL

private final java.lang.String DB_SOURCE_URL
See Also:
Constant Field Values

con

private java.sql.Connection con
Constructor Detail

ICSDatabase

ICSDatabase()
Constructor for the ICSDatabase class. Opens the connection to the database.

Method Detail

getAxisParameter

int getAxisParameter(java.lang.String Axis,
                     java.lang.String parameter)
               throws java.sql.SQLException
Get an axis parameter from the ICS database

Parameters:
Axis - The axis
parameter - The parameter
Returns:
The axis parameter
Throws:
java.sql.SQLException - The SQL exception

setAxisParameter

void setAxisParameter(java.lang.String Axis,
                      java.lang.String parameter,
                      int value)
                throws java.sql.SQLException
Set an axis parameter in the ICS database

Parameters:
Axis - The axis
parameter - The parameter
value - The value
Throws:
java.sql.SQLException - The SQL exception

getOffsetParameter

int getOffsetParameter(java.lang.String Offset,
                       java.lang.String parameter)
                 throws java.sql.SQLException
Parameters:
Offset - get a robot offset value from the ICS database
parameter - The parameter to get
Returns:
The offset
Throws:
java.sql.SQLException - The SQL Exception

setOffsetParameter

void setOffsetParameter(java.lang.String Offset,
                        java.lang.String parameter,
                        int value)
                  throws java.sql.SQLException
Set an offset parameter in the ICS database

Parameters:
Offset - The axis
parameter - The parameter
value - The value
Throws:
java.sql.SQLException - The SQL exception