agents
Interface SQL

All Known Implementing Classes:
SQLDatabase

public interface SQL

Interface for manipulation of database.


Field Summary
static long MS_23H59M59S
          Method for returning the amount 23h 59min 59s in miliseconds.
 
Method Summary
 void close()
          Method for closing the connect with the database.
 void create(java.lang.String database)
          Method for creating a database.
 void drop(java.lang.String database)
          Method for deleting a database.
 java.sql.ResultSet executeQuery(java.lang.String query)
          Method for executing a query in a connected database.
 int executeUpdate(java.lang.String query)
          Method for executing a update in a connected database.
 java.lang.String getDirectory(java.lang.String username, java.lang.String dir, java.util.Date exp_date, java.lang.String directoryCourse, int classSelected)
          Method for getting the user directory for executing FTP.
 java.lang.String getPassword(java.lang.String username)
          Method for getting the password of the user from the database.
 void init(java.lang.String resource)
          Method for connecting to one database.
 

Field Detail

MS_23H59M59S

public static final long MS_23H59M59S
Method for returning the amount 23h 59min 59s in miliseconds. It is used to control the validate of the ticket.
Method Detail

drop

public void drop(java.lang.String database)
          throws java.io.IOException
Method for deleting a database.

create

public void create(java.lang.String database)
            throws java.io.IOException
Method for creating a database.

init

public void init(java.lang.String resource)
          throws java.sql.SQLException
Method for connecting to one database.

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String query)
                                throws java.sql.SQLException
Method for executing a query in a connected database.

executeUpdate

public int executeUpdate(java.lang.String query)
                  throws java.sql.SQLException
Method for executing a update in a connected database.

close

public void close()
           throws java.sql.SQLException
Method for closing the connect with the database.

getPassword

public java.lang.String getPassword(java.lang.String username)
                             throws java.sql.SQLException
Method for getting the password of the user from the database.

getDirectory

public java.lang.String getDirectory(java.lang.String username,
                                     java.lang.String dir,
                                     java.util.Date exp_date,
                                     java.lang.String directoryCourse,
                                     int classSelected)
                              throws java.sql.SQLException
Method for getting the user directory for executing FTP.