com.wm.app.tn.db
Class ProfileDeleteOps

java.lang.Object
  extended by com.wm.app.tn.db.ProfileDeleteOps

public class ProfileDeleteOps
extends java.lang.Object

Provides database operations for deleting partner profiles and their components.


Constructor Summary
ProfileDeleteOps()
           
 
Method Summary
static void deleteAddress(java.sql.Connection conn, java.lang.String addressID, java.lang.String partnerID)
           
static void deleteAddress(java.lang.String addressID, java.lang.String partnerID)
           
static void deleteContact(java.sql.Connection conn, java.lang.String contactID, java.lang.String partnerID)
           
static void deleteContact(java.lang.String contactID, java.lang.String partnerID)
           
static void deleteDestination(java.sql.Connection conn, java.lang.String destID)
           
static void deleteDestination(java.lang.String destID)
           
static void deleteID(java.sql.Connection conn, java.lang.String partnerIDID)
           
static void deleteID(java.lang.String partnerIDID)
           
static void deletePartnerBinary(java.sql.Connection conn, java.lang.String partnerID, int binaryType)
           
static void deletePartnerBinary(java.lang.String partnerID, int binaryType)
           
static void deleteProfile(java.sql.Connection conn, java.lang.String partnerID)
          Physically deletes the entire profile, except the row on the Partner table, which is logically deleted (delete=true).
static void deleteProfile(java.lang.String partnerID)
          Physically deletes the entire profile, except the row on the Partner table, which is logically deleted (delete=true).
static int safeDeleteProfile(java.sql.Connection conn, java.lang.String partnerID, boolean delete)
          Marks a profile as deleted.
static int safeDeleteProfile(java.lang.String partnerID, boolean delete)
          Marks a profile as deleted.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileDeleteOps

public ProfileDeleteOps()
Method Detail

deleteContact

public static void deleteContact(java.lang.String contactID,
                                 java.lang.String partnerID)
                          throws java.sql.SQLException,
                                 ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deleteContact

public static void deleteContact(java.sql.Connection conn,
                                 java.lang.String contactID,
                                 java.lang.String partnerID)
                          throws java.sql.SQLException,
                                 ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deleteAddress

public static void deleteAddress(java.lang.String addressID,
                                 java.lang.String partnerID)
                          throws java.sql.SQLException,
                                 ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deleteAddress

public static void deleteAddress(java.sql.Connection conn,
                                 java.lang.String addressID,
                                 java.lang.String partnerID)
                          throws java.sql.SQLException,
                                 ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deleteDestination

public static void deleteDestination(java.lang.String destID)
                              throws java.sql.SQLException,
                                     ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deleteDestination

public static void deleteDestination(java.sql.Connection conn,
                                     java.lang.String destID)
                              throws java.sql.SQLException,
                                     ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deleteID

public static void deleteID(java.lang.String partnerIDID)
                     throws java.sql.SQLException,
                            ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deleteID

public static void deleteID(java.sql.Connection conn,
                            java.lang.String partnerIDID)
                     throws java.sql.SQLException,
                            ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deletePartnerBinary

public static void deletePartnerBinary(java.lang.String partnerID,
                                       int binaryType)
                                throws java.sql.SQLException,
                                       ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

deletePartnerBinary

public static void deletePartnerBinary(java.sql.Connection conn,
                                       java.lang.String partnerID,
                                       int binaryType)
                                throws java.sql.SQLException,
                                       ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

safeDeleteProfile

public static int safeDeleteProfile(java.lang.String partnerID,
                                    boolean delete)
                             throws java.sql.SQLException
Marks a profile as deleted. The profile is not physically removed from the database.

Parameters:
partnerID - the ID of the profile to delete
Returns:
the number of rows marked deleted
Throws:
java.sql.SQLException

safeDeleteProfile

public static int safeDeleteProfile(java.sql.Connection conn,
                                    java.lang.String partnerID,
                                    boolean delete)
                             throws java.sql.SQLException
Marks a profile as deleted. The profile is not physically removed from the database.

Parameters:
conn - a connection to the trading networks database
partnerID - the ID of the profile to delete
Returns:
the number of rows marked deleted
Throws:
java.sql.SQLException

deleteProfile

public static void deleteProfile(java.lang.String partnerID)
                          throws java.sql.SQLException,
                                 ProfileStoreException
Physically deletes the entire profile, except the row on the Partner table, which is logically deleted (delete=true). The Partner row is retained so that we can save the related BizDocs, which are children of the Partner.

Parameters:
partnerID - the ID of the profile to delete
Throws:
java.sql.SQLException
ProfileStoreException

deleteProfile

public static void deleteProfile(java.sql.Connection conn,
                                 java.lang.String partnerID)
                          throws java.sql.SQLException,
                                 ProfileStoreException
Physically deletes the entire profile, except the row on the Partner table, which is logically deleted (delete=true). The Partner row is retained so that we can save the BizDoc data and ActivityLog entries for the partner.

Parameters:
conn - a connection to the trading networks database
partnerID - the ID of the profile to delete
Throws:
java.sql.SQLException
ProfileStoreException