deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.ogcwebservices.wmps
Class WMPSDatabase

java.lang.Object
  extended by org.deegree.ogcwebservices.wmps.WMPSDatabase

public class WMPSDatabase
extends java.lang.Object

Provides database functionalities for the wmps.

Since:
2.0
Version:
2.0, $Revision: 21175 $, $Date: 2009-12-02 15:24:50 +0100 (Mi, 02 Dez 2009) $
Author:
Anup Deshmukh, last edited by: $Author: apoth $

Constructor Summary
WMPSDatabase(CacheDatabase cacheDatabase)
          Creates a new WMPSDatabase instance.
 
Method Summary
 java.sql.Connection acquireConnection()
          Creates a valid db connection with properties read from the configuration file.
 void insertData(java.sql.Connection connection, PrintMap request)
          Inserts data into the table.
protected  void releaseConnection(java.sql.Connection connection)
          Releases the current database connection.
 PrintMap selectPrintMapRequest(java.sql.Connection connection)
          Select the PrintMap request that has been in the databank for the longest time. i.e the first in queue to be processed.
 void updateDB(java.sql.Connection connection, java.lang.String id, java.sql.Timestamp timeStamp, java.lang.String state)
          Updating the processed field in the db to signify that the PrintMap request has been successfully carried out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WMPSDatabase

public WMPSDatabase(CacheDatabase cacheDatabase)
             throws java.lang.Exception
Creates a new WMPSDatabase instance.

Parameters:
cacheDatabase -
Throws:
java.lang.Exception
Method Detail

insertData

public void insertData(java.sql.Connection connection,
                       PrintMap request)
                throws PrintMapServiceException,
                       java.io.IOException
Inserts data into the table. Each incomming request is stored in the db.

Parameters:
connection -
request -
Throws:
java.io.IOException
PrintMapServiceException
java.io.IOException

acquireConnection

public java.sql.Connection acquireConnection()
                                      throws java.lang.Exception
Creates a valid db connection with properties read from the configuration file.

Returns:
Connection
Throws:
java.lang.Exception

releaseConnection

protected void releaseConnection(java.sql.Connection connection)
                          throws java.sql.SQLException
Releases the current database connection.

Parameters:
connection -
Throws:
java.sql.SQLException

selectPrintMapRequest

public PrintMap selectPrintMapRequest(java.sql.Connection connection)
                               throws PrintMapServiceException
Select the PrintMap request that has been in the databank for the longest time. i.e the first in queue to be processed.

Parameters:
connection -
Returns:
PrintMap
Throws:
PrintMapServiceException

updateDB

public void updateDB(java.sql.Connection connection,
                     java.lang.String id,
                     java.sql.Timestamp timeStamp,
                     java.lang.String state)
              throws java.sql.SQLException
Updating the processed field in the db to signify that the PrintMap request has been successfully carried out.

Parameters:
connection -
id -
timeStamp -
state -
Throws:
java.sql.SQLException

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org