com.wm.app.tn.db
Class ProfileSummaryOps

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

public class ProfileSummaryOps
extends java.lang.Object

Provides database operations for retrieving partner profile summaries.


Constructor Summary
ProfileSummaryOps()
           
 
Method Summary
static java.util.Vector getAllProfileSummaries()
          Retrieves summary information for all profiles in the database.
static java.util.Vector getAllProfileSummaries(boolean all)
           
static java.util.Hashtable getLogos()
          Return a Hashtable of all partner's logos.
static byte[] getPartnerBinary(java.sql.Connection conn, java.lang.String partnerID, int binaryType)
           
static int getProfileCount()
           
static java.util.Vector getProfileSummaries(boolean deleted, boolean sorted)
          Retrieves summary information for profiles in the database.
static java.util.Vector getProfileSummaries(java.sql.Connection conn, boolean deleted, boolean sorted)
          Retrieves summary information for profiles in the database.
static ProfileSummary getProfileSummary(java.sql.Connection conn, java.lang.String partnerID)
          Retrieves summary information for a trading partner.
static ProfileSummary getProfileSummary(java.lang.String partnerID)
          Retrieves summary information for a trading partner.
static int getSortingIDType()
           
static boolean isDisplayNameUnique(java.lang.String corpName, java.lang.String corpUnit)
           
static boolean isProfileDeletedByCorpNameAndUnit(java.lang.String corpName, java.lang.String corpUnit)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileSummaryOps

public ProfileSummaryOps()
Method Detail

getProfileSummaries

public static java.util.Vector getProfileSummaries(boolean deleted,
                                                   boolean sorted)
                                            throws java.sql.SQLException,
                                                   ProfileStoreException
Retrieves summary information for profiles in the database.

Parameters:
deleted - indicates whether to retrieve deleted or non-deleted profiles
sorted - indicates whether to sort results on external ID
Returns:
a Vector of ProfileSummary objects.
Throws:
java.sql.SQLException
ProfileStoreException

getProfileSummaries

public static java.util.Vector getProfileSummaries(java.sql.Connection conn,
                                                   boolean deleted,
                                                   boolean sorted)
                                            throws java.sql.SQLException,
                                                   ProfileStoreException
Retrieves summary information for profiles in the database.

Parameters:
conn - a connection to the trasing networks database
deleted - indicates whether to retrieve deleted or non-deleted profiles
sorted - indicates whether to sort results on external ID. If the system property "tn.sort.idType" does not exist, the ProfileSummaries will be returned sorted by CorporationName+OrgUnitName.
Returns:
a Vector of ProfileSummary objects.
Throws:
java.sql.SQLException
ProfileStoreException

getProfileCount

public static int getProfileCount()

getAllProfileSummaries

public static java.util.Vector getAllProfileSummaries()
                                               throws java.sql.SQLException,
                                                      ProfileStoreException
Retrieves summary information for all profiles in the database.

Parameters:
sorted - indicates whether to sort results on external ID. If the system property "tn.sort.idType" does not exist, the ProfileSummaries will be returned sorted by CorporationName+OrgUnitName.
Returns:
a Vector of ProfileSummary objects.
Throws:
java.sql.SQLException
ProfileStoreException

getAllProfileSummaries

public static java.util.Vector getAllProfileSummaries(boolean all)
                                               throws java.sql.SQLException,
                                                      ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

getProfileSummary

public static ProfileSummary getProfileSummary(java.lang.String partnerID)
                                        throws java.sql.SQLException
Retrieves summary information for a trading partner.

Parameters:
partnerID - identifier of the partner
Returns:
a ProfileSummary object
Throws:
java.sql.SQLException

getProfileSummary

public static ProfileSummary getProfileSummary(java.sql.Connection conn,
                                               java.lang.String partnerID)
                                        throws java.sql.SQLException
Retrieves summary information for a trading partner.

Parameters:
conn - a connection to the trasing networks database
partnerID - identifier of the partner
Returns:
a ProfileSummary object
Throws:
java.sql.SQLException

isProfileDeletedByCorpNameAndUnit

public static boolean isProfileDeletedByCorpNameAndUnit(java.lang.String corpName,
                                                        java.lang.String corpUnit)

isDisplayNameUnique

public static boolean isDisplayNameUnique(java.lang.String corpName,
                                          java.lang.String corpUnit)

getPartnerBinary

public static byte[] getPartnerBinary(java.sql.Connection conn,
                                      java.lang.String partnerID,
                                      int binaryType)
                               throws java.sql.SQLException,
                                      ProfileStoreException
Throws:
java.sql.SQLException
ProfileStoreException

getLogos

public static java.util.Hashtable getLogos()
                                    throws java.sql.SQLException,
                                           LookupStoreException
Return a Hashtable of all partner's logos. key=partnerID, value=logo (byte[])

Throws:
java.sql.SQLException
LookupStoreException

getSortingIDType

public static int getSortingIDType()
                            throws ProfileStoreException
Throws:
ProfileStoreException