cgl.fthpis.datastore.jdbc
Class BusinessServiceTable

java.lang.Object
  extended bycgl.fthpis.datastore.jdbc.BusinessServiceTable

public class BusinessServiceTable
extends java.lang.Object

Author:
Mehmet S. Aktas (maktas@indiana.edu)

Field Summary
(package private) static java.lang.String delete2SQL
           
(package private) static java.lang.String deleteByBusinessKeySQL
           
(package private) static java.lang.String deleteBySessionKeySQL
           
(package private) static java.lang.String deleteSQL
           
(package private) static java.lang.String insert2SQL
           
(package private) static java.lang.String insertSQL
           
(package private) static java.lang.String select2SQL
           
(package private) static java.lang.String selectByBusinessKeySQL
           
(package private) static java.lang.String selectBySessionKeySQL
           
(package private) static java.lang.String selectSQL
           
(package private) static java.lang.String verifyOwnershipSQL
           
 
Constructor Summary
BusinessServiceTable()
           
 
Method Summary
static void delete(java.lang.String serviceKey, java.sql.Connection connection)
          Delete row from the BUSINESS_SERVICE table.
static void deleteByBusinessKey(java.lang.String businessKey, java.sql.Connection connection)
          Delete multiple rows from the BUSINESS_SERVICE table that are assigned to the BusinessKey specified.
static void deleteBySessionKey(java.lang.String sessionKey, java.sql.Connection connection)
          Delete multiple rows from the SESSION_SERVICE table that are assigned to the SessionKey specified.
static void insert(BusinessService service, java.sql.Connection connection)
          Insert new row into the BUSINESS_ENTITIES table.
static void main(java.lang.String[] args)
           
static BusinessService select(java.lang.String serviceKey, java.sql.Connection connection)
          Select one row from the BUSINESS_SERVICE table.
static java.util.Vector selectByBusinessKey(java.lang.String businessKey, java.sql.Connection connection)
          Select all rows from the business_service table for a given BusinessKey.
static java.util.Vector selectBySessionKey(java.lang.String sessionKey, java.sql.Connection connection)
          Select all rows from the session_service table for a given BusinessKey.
static void test(java.sql.Connection connection)
           
static boolean verifyOwnership(java.lang.String serviceKey, java.lang.String publisherID, java.sql.Connection connection)
          Verify that 'authorizedName' has the authority to update or delete BusinessService identified by the serviceKey parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

insertSQL

static java.lang.String insertSQL

insert2SQL

static java.lang.String insert2SQL

deleteSQL

static java.lang.String deleteSQL

delete2SQL

static java.lang.String delete2SQL

selectSQL

static java.lang.String selectSQL

select2SQL

static java.lang.String select2SQL

selectByBusinessKeySQL

static java.lang.String selectByBusinessKeySQL

selectBySessionKeySQL

static java.lang.String selectBySessionKeySQL

deleteByBusinessKeySQL

static java.lang.String deleteByBusinessKeySQL

deleteBySessionKeySQL

static java.lang.String deleteBySessionKeySQL

verifyOwnershipSQL

static java.lang.String verifyOwnershipSQL
Constructor Detail

BusinessServiceTable

public BusinessServiceTable()
Method Detail

insert

public static void insert(BusinessService service,
                          java.sql.Connection connection)
                   throws java.sql.SQLException
Insert new row into the BUSINESS_ENTITIES table.

Parameters:
service - object holding values to be inserted
connection - JDBC connection
Throws:
java.sql.SQLException

delete

public static void delete(java.lang.String serviceKey,
                          java.sql.Connection connection)
                   throws java.sql.SQLException
Delete row from the BUSINESS_SERVICE table.

Parameters:
serviceKey - Primary key value
connection - JDBC connection
Throws:
java.sql.SQLException

select

public static BusinessService select(java.lang.String serviceKey,
                                     java.sql.Connection connection)
                              throws java.sql.SQLException
Select one row from the BUSINESS_SERVICE table.

Parameters:
serviceKey - primary key value
connection - JDBC connection
Throws:
java.sql.SQLException

deleteByBusinessKey

public static void deleteByBusinessKey(java.lang.String businessKey,
                                       java.sql.Connection connection)
                                throws java.sql.SQLException
Delete multiple rows from the BUSINESS_SERVICE table that are assigned to the BusinessKey specified.

Parameters:
businessKey - BusinessKey
connection - JDBC connection
Throws:
java.sql.SQLException

deleteBySessionKey

public static void deleteBySessionKey(java.lang.String sessionKey,
                                      java.sql.Connection connection)
                               throws java.sql.SQLException
Delete multiple rows from the SESSION_SERVICE table that are assigned to the SessionKey specified.

Parameters:
sessionKey - SessionKey
connection - JDBC connection
Throws:
java.sql.SQLException

selectByBusinessKey

public static java.util.Vector selectByBusinessKey(java.lang.String businessKey,
                                                   java.sql.Connection connection)
                                            throws java.sql.SQLException
Select all rows from the business_service table for a given BusinessKey.

Parameters:
businessKey - BusinessKey
connection - JDBC connection
Throws:
java.sql.SQLException

selectBySessionKey

public static java.util.Vector selectBySessionKey(java.lang.String sessionKey,
                                                  java.sql.Connection connection)
                                           throws java.sql.SQLException
Select all rows from the session_service table for a given BusinessKey.

Parameters:
sessionKey - SessionKey
connection - JDBC connection
Throws:
java.sql.SQLException

verifyOwnership

public static boolean verifyOwnership(java.lang.String serviceKey,
                                      java.lang.String publisherID,
                                      java.sql.Connection connection)
                               throws java.sql.SQLException
Verify that 'authorizedName' has the authority to update or delete BusinessService identified by the serviceKey parameter

Parameters:
serviceKey -
publisherID -
connection -
Throws:
java.sql.SQLException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

test

public static void test(java.sql.Connection connection)
                 throws java.lang.Exception
Throws:
java.lang.Exception