|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.platform.RmiPlatformPersistenceServiceProxy
An RMI Platform Persistence Service proxy contains a reference to an RMI version of a Platform Persistence Service. The proxy contains methods identical to the methods in the actual service. When a method is called on the proxy, the proxy forwards the call on to the actual service. However, the proxy (1) traps all RemoteExceptions that might be thrown by the service, (2) turns the RemoteExceptions into PlatformPersistenceExceptions, and then (3) rethrows the new exception. In this way, code making use of the proxy does not have to be sensitive to RMI RemoteExceptions and can code to a common Platform Persistence Service interface.
Fields inherited from interface com.ibm.able.platform.PlatformPersistenceService |
---|
DELETE_TYPE, INSERT_TYPE, PERSISTENCE_DB_FLUSH_TIME, PERSISTENCE_DRIVER, PERSISTENCE_PROTOCOL, PERSISTENCE_SUBPROTOCOL, SERVICE_TYPE, UPDATE_TYPE |
Constructor Summary | |
---|---|
RmiPlatformPersistenceServiceProxy(RmiPlatformPersistenceService theDelegate,
java.rmi.registry.Registry theRegistry,
java.lang.String theAddress)
Create a proxy over the specified RMI reference to a Platform Persistence Service. |
Method Summary | |
---|---|
void |
close(java.lang.String databaseName,
java.lang.String tableName,
AbleSecureKey key)
Closes all connections, both the AbleDBImport and AbleDBExport beans for this database table. |
static java.lang.String |
Copyright()
Gets the copyright statement of this class. |
void |
createTableConnection(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String[] columnNames,
java.lang.String[] columnTypes,
AbleSecureKey key)
This creates both an AbleDBImport and AbleDBExport bean and the table these beans will be dealing with if the table does not already exist. |
void |
delete(java.lang.String databaseName,
java.lang.String tableName,
java.util.Map whereMap,
AbleSecureKey key)
Deletes rows from a table |
void |
delete(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String whereString,
AbleSecureKey key)
Deletes rows from a table. |
javax.agent.service.ServiceProperties |
getServiceProperties()
Retrieve the service properties of the underlying service. |
void |
insert(java.lang.String databaseName,
java.lang.String tableName,
java.lang.Object[] insertData,
AbleSecureKey key)
Insert a record into a table. |
java.lang.Object[] |
select(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String columnString,
java.lang.String whereString,
AbleSecureKey key)
Selects data from a table. |
void |
setServiceProperties(javax.agent.service.ServiceProperties theServiceProperties)
Set the service properties of the underlying service. |
java.lang.String |
toString()
Retrieve a string describing (the contents of) the object. |
void |
update(java.lang.String databaseName,
java.lang.String tableName,
java.util.Map updateMap,
java.util.Map whereMap,
AbleSecureKey key)
Updates a row in a table. |
void |
update(java.lang.String databaseName,
java.lang.String tableName,
java.lang.Object[] updateData,
java.lang.String whereString,
AbleSecureKey key)
Updates a row in a table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RmiPlatformPersistenceServiceProxy(RmiPlatformPersistenceService theDelegate, java.rmi.registry.Registry theRegistry, java.lang.String theAddress)
theDelegate
- A reference to an RMI version of a Platform
Persistence Service.
theRegistry
- The RMI registry at which the above Platform
Persistence Service is registered.
theAddress
- The RMI address at which the above Platform
Persistence Service is registered.
Method Detail |
public javax.agent.service.ServiceProperties getServiceProperties()
Note: In this implementation, the method call is not forwarded on to the service; null is always returned.
getServiceProperties
in interface javax.agent.service.Service
public void setServiceProperties(javax.agent.service.ServiceProperties theServiceProperties)
Note: In this implementation, the method call is not forwarded on to the service; the call is simply ignored.
setServiceProperties
in interface javax.agent.service.Service
theServiceProperties
- The service properties to be used by the service.
public void createTableConnection(java.lang.String databaseName, java.lang.String tableName, java.lang.String[] columnNames, java.lang.String[] columnTypes, AbleSecureKey key) throws PlatformPersistenceException
PlatformPersistenceService
createTableConnection
in interface PlatformPersistenceService
com.ibm.able.platform.PlatformPersistenceService
databaseName
- The name of the Database that the table will exist in.
tableName
- The name of the table.
columnNames
- String[] containing the name of each column for this table.
columnTypes
- String[] containing the type of each column for this table.
key
- AbleSecureKey used to secure communication.
AbleException
- On all errors creating and initializing the AbleDBExport or AbleDBImport beans.
PlatformPersistenceException
- If unable to verify the key when the platform is secure.
On errors creating the table.
public void insert(java.lang.String databaseName, java.lang.String tableName, java.lang.Object[] insertData, AbleSecureKey key) throws PlatformPersistenceException
PlatformPersistenceService
insert
in interface PlatformPersistenceService
com.ibm.able.platform.PlatformPersistenceService
databaseName
- The name of the Database that the table will exist in.
tableName
- The name of the table to insert into.
insertData
- Object[] containing the data that is to be inserted into the table.
key
- AbleSecureKey used to secure communication.
PlatformPersistenceException
- If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
public void update(java.lang.String databaseName, java.lang.String tableName, java.util.Map updateMap, java.util.Map whereMap, AbleSecureKey key) throws PlatformPersistenceException
PlatformPersistenceService
update
in interface PlatformPersistenceService
com.ibm.able.platform.PlatformPersistenceService
databaseName
- The name of the DB that the table will exist in.
tableName
- The name of the table.
updateMap
- This is the new data for the record that is to be updated. This is
a Map where the keys are the column names and the values are the
column values. When using a Map the columns that are not changing
do not have to be presents.
whereMap
- This is a Map that will be used to build the where clause. The keys
will be the column names, and the values will be the Object to match
to for their respective column. If left null, or empty, everything
will be deleted.
key
- AbleSecureKey used to secure communication.
PlatformPersistenceException
- If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
public void update(java.lang.String databaseName, java.lang.String tableName, java.lang.Object[] updateData, java.lang.String whereString, AbleSecureKey key) throws PlatformPersistenceException
PlatformPersistenceService
update
in interface PlatformPersistenceService
com.ibm.able.platform.PlatformPersistenceService
databaseName
- The name of the database that the table will exist in.
tableName
- The name of the table.
updateData
- Object[] containing the data that is to be updated in the table.
whereString
- String containing the where clause that is to match recoreds in
the table that should be updated.
key
- AbleSecureKey used to secure communication.
PlatformPersistenceException
- If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
public void delete(java.lang.String databaseName, java.lang.String tableName, java.lang.String whereString, AbleSecureKey key) throws PlatformPersistenceException
PlatformPersistenceService
delete
in interface PlatformPersistenceService
com.ibm.able.platform.PlatformPersistenceService
databaseName
- The name of the DB that the table will exist in.
tableName
- The name of the table.
whereString
- This is the simple String that states the where clause of the delete.
If left null or blank, everything will be deleted.
key
- AbleSecureKey used to secure communication.
PlatformPersistenceException
- If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
public void delete(java.lang.String databaseName, java.lang.String tableName, java.util.Map whereMap, AbleSecureKey key) throws PlatformPersistenceException
PlatformPersistenceService
delete
in interface PlatformPersistenceService
com.ibm.able.platform.PlatformPersistenceService
databaseName
- The name of the DB that the table will exist in
tableName
- The name of the table
whereMap
- This is a Map that will be used to build the where clause. The keys
will be the column names, and the values will be the Object to match
to for their respective column. If left null or empty, everything
will be deleted.
key
- AbleSecureKey used to secure communication.
PlatformPersistenceException
- If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
public void close(java.lang.String databaseName, java.lang.String tableName, AbleSecureKey key) throws PlatformPersistenceException
PlatformPersistenceService
close
in interface PlatformPersistenceService
com.ibm.able.platform.PlatformPersistenceService
databaseName
- The name of the DB that the table will exist in.
tableName
- The name of the table.
key
- AbleSecureKey used to secure communication.
PlatformPersistenceException
- If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
public java.lang.Object[] select(java.lang.String databaseName, java.lang.String tableName, java.lang.String columnString, java.lang.String whereString, AbleSecureKey key) throws PlatformPersistenceException
PlatformPersistenceService
select
in interface PlatformPersistenceService
com.ibm.able.platform.PlatformPersistenceService
databaseName
- The name of the DB that the table will exist in.
tableName
- The name of the table.
columnString
- The columns that are to be returned in a select statement.
If left blank or null, all columns will be returned.
whereString
- The where string of the select statement. If left blank or null,
everything will be returned.
key
- AbleSecureKey used to secure communication.
PlatformPersistenceException
- If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |