Agentflow
V3.1

pe.pase
Interface DBService

All Known Subinterfaces:
WCCI

public interface DBService

DBService API.

Version:
2.0.0,
Author:
lchuang

Method Summary
 int addNewSessionConnectionURL(int type, java.lang.String name, java.lang.String dburl, java.lang.String username, java.lang.String password)
          Add a new db URL to db configuration, and return its sequence number
 int addNewSessionConnectionURL(int type, java.lang.String name, java.lang.String dburl, java.lang.String username, java.lang.String password, int minConnCount, int maxConnCount)
          Add a new db URL to db configuration, and return its sequence number
 int addNewSessionConnectionURL(int type, java.lang.String name, java.lang.String dburl, java.lang.String username, java.lang.String password, int minConnCount, int maxConnCount, boolean isSession3X)
          Add a new db URL to db configuration, and return its sequence number
 void addSessionConnectionURL(int seq, int type, java.lang.String dburl, java.lang.String username, java.lang.String password)
          Add a db URL to db configuration, and specify its sequence number in it.
 void addSessionConnectionURL(int seq, int type, java.lang.String name, java.lang.String dburl, java.lang.String username, java.lang.String password)
          Add a db URL to db configuration, and specify its sequence number in it
 void addSessionConnectionURL(int seq, int type, java.lang.String name, java.lang.String dburl, java.lang.String username, java.lang.String password, int minConnCount, int maxConnCount)
          Add a db URL to db configuration, and specify its sequence number in it
 void addSessionConnectionURL(int seq, int type, java.lang.String name, java.lang.String dburl, java.lang.String username, java.lang.String password, int minConnCount, int maxConnCount, boolean isSession3X)
          Add a db URL to db configuration, and specify its sequence number in it
 void closeAllSessionConnection()
          Close a SessionConnection object
 void closeOpenedSessionConnection()
          Close all SessionConnection object opened by current thread
 void closeSessionConnection(java.lang.String session)
          Close a SessionConnection object
 void commitSessionConnection(java.lang.String session)
          Make commit on the connection
 SessionConnection createSessionConnection(int sequence)
          Create a SessionConnection
 SessionConnection createSessionConnection(java.lang.String name)
          Create a SessionConnection
 boolean delete(java.lang.String sqlcmd)
          Database delete
 boolean delete(java.lang.String sqlcmd, java.util.Vector record, java.util.Vector columnTypeList)
          Database delete
 java.util.HashMap deleteSessionConnectionURL(java.lang.String name)
          Remove a db URL from db configuration by given name, return the configuration which has been deleted
 java.util.HashMap getSessionConnectionURL(int sequence)
          Get the db configuration info with the specific sequence number
 java.util.HashMap getSessionConnectionURL(java.lang.String name)
          Get the db configuration info with the specific name
 java.util.Vector getSessionConnectionURLList()
          Get the db configuration info list
 boolean insert(java.lang.String sqlcmd, java.util.Vector record, java.util.Vector columnTypeList)
          Database insert
 java.util.Vector loadValueWithSessionConnection(java.lang.String session, java.lang.String sqlcmd)
          Invoke the connection to load value
 void rollbackSessionConnection(java.lang.String session)
          Make rollback on the connection
 boolean SQLdeleteValue(java.lang.String sql)
          The method is used to delete value from database (the RTRepository)
 boolean SQLinsertValue(java.lang.String sql)
          The method is used to insert value to database (the RTRepository)
 java.util.List SQLloadValue(java.lang.String sql)
          The method is used to load value from database (the RTRepository)
 boolean SQLupdateValue(java.lang.String sql)
          The method is used to update value to database (the RTRepository)
 boolean testSessionConnection(int sequence)
          Test a SessionConnection
 boolean testSessionConnection(java.lang.String name)
          Test a SessionConnection
 boolean update(java.lang.String sqlcmd, java.util.Vector newRecord, java.util.Vector newColumnTypeList, java.util.Vector oldRecord, java.util.Vector oldColumnTypeList)
          Database update
 boolean updateValueWithSessionConnection(java.lang.String session, java.lang.String sqlcmd)
          Invoke the connection to update value
 

Method Detail

addNewSessionConnectionURL

int addNewSessionConnectionURL(int type,
                               java.lang.String name,
                               java.lang.String dburl,
                               java.lang.String username,
                               java.lang.String password)
Add a new db URL to db configuration, and return its sequence number

Parameters:
type - the given DB Type
name - the given DB Name
dburl - the given DB URL
username - the given Username
password - the given Passowrd
Returns:
sequence number in configuration.
Since:
version 2.0.0

addNewSessionConnectionURL

int addNewSessionConnectionURL(int type,
                               java.lang.String name,
                               java.lang.String dburl,
                               java.lang.String username,
                               java.lang.String password,
                               int minConnCount,
                               int maxConnCount)
Add a new db URL to db configuration, and return its sequence number

Parameters:
type - the given DB Type
name - the given DB Name
dburl - the given DB URL
username - the given Username
password - the given Passowrd
minConnCount - the given Minimum Connection Number in pool.
maxConnCount - the given Maximum Connection Number in pool.
Returns:
sequence number in configuration.
Since:
version 2.0.0

addNewSessionConnectionURL

int addNewSessionConnectionURL(int type,
                               java.lang.String name,
                               java.lang.String dburl,
                               java.lang.String username,
                               java.lang.String password,
                               int minConnCount,
                               int maxConnCount,
                               boolean isSession3X)
Add a new db URL to db configuration, and return its sequence number

Parameters:
type - the given DB Type
name - the given DB Name
dburl - the given DB URL
username - the given Username
password - the given Passowrd
minConnCount - the given Minimum Connection Number in pool.
maxConnCount - the given Maximum Connection Number in pool.
isSession3X - the given isSession3X
Returns:
sequence number in configuration.
Since:
version 3.0.1

addSessionConnectionURL

void addSessionConnectionURL(int seq,
                             int type,
                             java.lang.String dburl,
                             java.lang.String username,
                             java.lang.String password)
Add a db URL to db configuration, and specify its sequence number in it. System will generate the db name automatically.

Parameters:
seq - the given DB sequence
type - the given DB Type
dburl - the given DB URL
username - the given Username
password - the given Passowrd

addSessionConnectionURL

void addSessionConnectionURL(int seq,
                             int type,
                             java.lang.String name,
                             java.lang.String dburl,
                             java.lang.String username,
                             java.lang.String password)
Add a db URL to db configuration, and specify its sequence number in it

Parameters:
seq - the given DB sequence
type - the given DB Type
name - the given DB Name
dburl - the given DB URL
username - the given Username
password - the given Passowrd
Since:
version 2.0.0

addSessionConnectionURL

void addSessionConnectionURL(int seq,
                             int type,
                             java.lang.String name,
                             java.lang.String dburl,
                             java.lang.String username,
                             java.lang.String password,
                             int minConnCount,
                             int maxConnCount)
Add a db URL to db configuration, and specify its sequence number in it

Parameters:
seq - the given DB sequence
type - the given DB Type
name - the given DB Name
dburl - the given DB URL
username - the given Username
password - the given Passowrd
minConnCount - the given Minimum Connection Number in pool.
maxConnCount - the given Maximum Connection Number in pool.
Since:
version 2.0.0

addSessionConnectionURL

void addSessionConnectionURL(int seq,
                             int type,
                             java.lang.String name,
                             java.lang.String dburl,
                             java.lang.String username,
                             java.lang.String password,
                             int minConnCount,
                             int maxConnCount,
                             boolean isSession3X)
Add a db URL to db configuration, and specify its sequence number in it

Parameters:
seq - the given DB sequence
type - the given DB Type
name - the given DB Name
dburl - the given DB URL
username - the given Username
password - the given Passowrd
minConnCount - the given Minimum Connection Number in pool.
maxConnCount - the given Maximum Connection Number in pool.
isSession3X - the given isSession3X
Since:
version 3.0.1

closeAllSessionConnection

void closeAllSessionConnection()
Close a SessionConnection object


closeOpenedSessionConnection

void closeOpenedSessionConnection()
Close all SessionConnection object opened by current thread


closeSessionConnection

void closeSessionConnection(java.lang.String session)
Close a SessionConnection object

Parameters:
session - the given Session Key

commitSessionConnection

void commitSessionConnection(java.lang.String session)
                             throws java.sql.SQLException
Make commit on the connection

Parameters:
session - the given Session Key
Throws:
java.sql.SQLException

createSessionConnection

SessionConnection createSessionConnection(int sequence)
Create a SessionConnection

Parameters:
sequence - the given DB sequence
Returns:
SessionConnection
Since:
version 2.0.0

createSessionConnection

SessionConnection createSessionConnection(java.lang.String name)
Create a SessionConnection

Parameters:
name - the given DB Name
Returns:
SessionConnection
Since:
version 2.0.0

delete

boolean delete(java.lang.String sqlcmd)
Database delete

Returns:
true if the delete is successful; false otherwise.

delete

boolean delete(java.lang.String sqlcmd,
               java.util.Vector record,
               java.util.Vector columnTypeList)
Database delete

Returns:
true if the delete is successful; false otherwise.

deleteSessionConnectionURL

java.util.HashMap deleteSessionConnectionURL(java.lang.String name)
Remove a db URL from db configuration by given name, return the configuration which has been deleted

Parameters:
name - the given DB Name
Returns:
SessionConnection info.
Since:
version 2.0.0

getSessionConnectionURL

java.util.HashMap getSessionConnectionURL(int sequence)
Get the db configuration info with the specific sequence number

Parameters:
sequence - the given DB sequence
Returns:
SessionConnection info.

getSessionConnectionURL

java.util.HashMap getSessionConnectionURL(java.lang.String name)
Get the db configuration info with the specific name

Parameters:
name - the given DB Name
Returns:
SessionConnection info.
Since:
version 2.0.0

getSessionConnectionURLList

java.util.Vector getSessionConnectionURLList()
Get the db configuration info list

Returns:
all SessionConnection info list.
Since:
version 2.0.0

insert

boolean insert(java.lang.String sqlcmd,
               java.util.Vector record,
               java.util.Vector columnTypeList)
Database insert

Returns:
true if the insert is successful; false otherwise.

loadValueWithSessionConnection

java.util.Vector loadValueWithSessionConnection(java.lang.String session,
                                                java.lang.String sqlcmd)
Invoke the connection to load value

Parameters:
session - the given Session Key
sqlcmd - the given SQL statement
Returns:
SessionConnection key.
See Also:
ResultTable

rollbackSessionConnection

void rollbackSessionConnection(java.lang.String session)
Make rollback on the connection

Parameters:
session - the given Session Key

SQLdeleteValue

boolean SQLdeleteValue(java.lang.String sql)
The method is used to delete value from database (the RTRepository)

Parameters:
sql - the input SQL data string
Returns:
true if the deletion is successful; false otherwise.

SQLinsertValue

boolean SQLinsertValue(java.lang.String sql)
The method is used to insert value to database (the RTRepository)

Parameters:
sql - the input SQL data string
Returns:
true if the insertion is successful; false otherwise.

SQLloadValue

java.util.List SQLloadValue(java.lang.String sql)
The method is used to load value from database (the RTRepository)

Parameters:
sql - the input SQL data string
Returns:
the value mapping to the SQL syntax

SQLupdateValue

boolean SQLupdateValue(java.lang.String sql)
The method is used to update value to database (the RTRepository)

Parameters:
sql - the input SQL data string
Returns:
true if the update is successful; false otherwise.

testSessionConnection

boolean testSessionConnection(int sequence)
Test a SessionConnection

Parameters:
sequence - the given DB sequence
Returns:
true if testing is successful.
Since:
version 2.0.0

testSessionConnection

boolean testSessionConnection(java.lang.String name)
Test a SessionConnection

Parameters:
name - the given DB Name
Returns:
true if testing is successful.
Since:
version 2.0.0

update

boolean update(java.lang.String sqlcmd,
               java.util.Vector newRecord,
               java.util.Vector newColumnTypeList,
               java.util.Vector oldRecord,
               java.util.Vector oldColumnTypeList)
Database update

Returns:
true if the update is successful; false otherwise.

updateValueWithSessionConnection

boolean updateValueWithSessionConnection(java.lang.String session,
                                         java.lang.String sqlcmd)
                                         throws java.sql.SQLException
Invoke the connection to update value

Parameters:
session - the given Session Key
sqlcmd - the given SQL statement
Returns:
true if the update is successful; false otherwise.
Throws:
java.sql.SQLException

Agentflow
V3.1

Submit a bug or feature
Copyright 1999-2010 Flowring , Inc. 12F., No.120, Sec2, Gongdao 5th Rd.,
Hsinchu City 300, Taiwan (R.O.C.) All Rights Reserved.