com.sun.ebxml.registry.persistence.rdb
Class SQLPersistenceManagerImpl

java.lang.Object
  |
  +--com.sun.ebxml.registry.persistence.rdb.SQLPersistenceManagerImpl
All Implemented Interfaces:
PersistenceManager

public class SQLPersistenceManagerImpl
extends java.lang.Object
implements PersistenceManager

Class Declaration for Class1

Author:
Farrukh S. Najmi, Adrian Chong
See Also:

Method Summary
 void addSlots(java.lang.String objectId, java.util.ArrayList slots)
          Adds specified slots to specified object.
 void delete(org.oasis.ebxml.registry.bindings.rim.User user, java.util.ArrayList registryObjectIds)
          Does a bulk delete of a heterogeneous Collection of RegistrObjects.
 java.util.ArrayList executeSQLQuery(java.lang.String sqlQuery, org.oasis.ebxml.registry.bindings.query.ResponseOption responseOption, java.lang.String tableName, java.util.ArrayList objectRefs)
          Executes an SQL Query.
 java.sql.Connection getConnection()
          Get a database connection.
static SQLPersistenceManagerImpl getInstance()
           
 java.util.HashMap getOwnersMap(java.util.ArrayList ids)
          Get a HashMap with registry object id as key and owner id as value
 org.oasis.ebxml.registry.bindings.rim.RegistryObjectType getRegistryObject(java.lang.String id, java.lang.String className)
          Gets the specified object using specified id and className
 void insert(org.oasis.ebxml.registry.bindings.rim.User user, java.util.ArrayList registryObjects)
          Does a bulk insert of a heterogeneous Collection of RegistrObjects.
 void insert(org.oasis.ebxml.registry.bindings.rim.User user, java.sql.Connection conn, java.util.ArrayList registryObjects, boolean doCommit)
          Does a bulk insert of a heterogeneous Collection of RegistrObjects.
static void main(java.lang.String[] args)
           
 java.lang.String mapColumnName(java.lang.String name)
           
 java.lang.String mapTableName(java.lang.String name)
           
 java.util.ArrayList registryObjectsExist(java.util.ArrayList ids)
          Returns ArrayList of ids of non-existent RegistryObject
 void removeSlots(java.lang.String objectId, java.util.ArrayList slots)
          Removes specified slots from specified object.
 void update(org.oasis.ebxml.registry.bindings.rim.User user, java.util.ArrayList registryObjects)
          Does a bulk update of a heterogeneous Collection of RegistrObjects.
 void updateStatus(org.oasis.ebxml.registry.bindings.rim.User user, java.util.ArrayList registryObjectsIds, org.oasis.ebxml.registry.bindings.rim.types.StatusType status, org.oasis.ebxml.registry.bindings.rs.RegistryErrorList el)
          Update the status of specified objects to the specified status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Get a database connection. The connection is of autocommit off and with transaction isolation level "transaction read committed"

java.sql.SQLException

getInstance

public static SQLPersistenceManagerImpl getInstance()

insert

public void insert(org.oasis.ebxml.registry.bindings.rim.User user,
                   java.util.ArrayList registryObjects)
            throws RegistryException
Does a bulk insert of a heterogeneous Collection of RegistrObjects.

Specified by:
insert in interface PersistenceManager
RegistryException

insert

public void insert(org.oasis.ebxml.registry.bindings.rim.User user,
                   java.sql.Connection conn,
                   java.util.ArrayList registryObjects,
                   boolean doCommit)
            throws RegistryException
Does a bulk insert of a heterogeneous Collection of RegistrObjects.

RegistryException

update

public void update(org.oasis.ebxml.registry.bindings.rim.User user,
                   java.util.ArrayList registryObjects)
            throws RegistryException
Does a bulk update of a heterogeneous Collection of RegistrObjects.

Specified by:
update in interface PersistenceManager
RegistryException

updateStatus

public void updateStatus(org.oasis.ebxml.registry.bindings.rim.User user,
                         java.util.ArrayList registryObjectsIds,
                         org.oasis.ebxml.registry.bindings.rim.types.StatusType status,
                         org.oasis.ebxml.registry.bindings.rs.RegistryErrorList el)
                  throws RegistryException
Update the status of specified objects to the specified status.

Specified by:
updateStatus in interface PersistenceManager
RegistryException

delete

public void delete(org.oasis.ebxml.registry.bindings.rim.User user,
                   java.util.ArrayList registryObjectIds)
            throws RegistryException
Does a bulk delete of a heterogeneous Collection of RegistrObjects. If any RegistryObject cannot be found, it will make no change to the database and throw RegistryException

Specified by:
delete in interface PersistenceManager
RegistryException

addSlots

public void addSlots(java.lang.String objectId,
                     java.util.ArrayList slots)
              throws RegistryException
Adds specified slots to specified object.

Specified by:
addSlots in interface PersistenceManager
RegistryException

removeSlots

public void removeSlots(java.lang.String objectId,
                        java.util.ArrayList slots)
                 throws RegistryException
Removes specified slots from specified object.

Specified by:
removeSlots in interface PersistenceManager
RegistryException

executeSQLQuery

public java.util.ArrayList executeSQLQuery(java.lang.String sqlQuery,
                                           org.oasis.ebxml.registry.bindings.query.ResponseOption responseOption,
                                           java.lang.String tableName,
                                           java.util.ArrayList objectRefs)
                                    throws RegistryException
Executes an SQL Query.

Specified by:
executeSQLQuery in interface PersistenceManager
Returns:
An ArrayList of RegistryObjectType instances
RegistryException

registryObjectsExist

public java.util.ArrayList registryObjectsExist(java.util.ArrayList ids)
                                         throws RegistryException
Returns ArrayList of ids of non-existent RegistryObject

Specified by:
registryObjectsExist in interface PersistenceManager
RegistryException

getRegistryObject

public org.oasis.ebxml.registry.bindings.rim.RegistryObjectType getRegistryObject(java.lang.String id,
                                                                                  java.lang.String className)
                                                                           throws RegistryException
Gets the specified object using specified id and className

Specified by:
getRegistryObject in interface PersistenceManager
RegistryException

mapTableName

public java.lang.String mapTableName(java.lang.String name)

mapColumnName

public java.lang.String mapColumnName(java.lang.String name)

getOwnersMap

public java.util.HashMap getOwnersMap(java.util.ArrayList ids)
                               throws RegistryException
Get a HashMap with registry object id as key and owner id as value

Specified by:
getOwnersMap in interface PersistenceManager
RegistryException

main

public static void main(java.lang.String[] args)


Copyright © 2001-2003 OASIS. All Rights Reserved.