|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.dataobjs.DBPersist
com.knowgate.crm.DistributionList
public class DistributionList
Distribution List
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Field Summary | |
|---|---|
static short |
ClassId
|
static short |
TYPE_BLACK
|
static short |
TYPE_DIRECT
|
static short |
TYPE_DYNAMIC
|
static short |
TYPE_STATIC
|
| Fields inherited from class com.knowgate.dataobjs.DBPersist |
|---|
AllVals, sAuditCls, sAuditUsr, sTransactId |
| Constructor Summary | |
|---|---|
DistributionList()
|
|
DistributionList(JDCConnection oConn,
java.lang.String sListGUID)
Create and load distribution list |
|
DistributionList(JDCConnection oConn,
java.lang.String sListDesc,
java.lang.String sWorkAreaGUID)
Create a distribution list and load its by name |
|
| Method Summary | |
|---|---|
java.lang.String |
activeCompanies(JDCConnection oConn)
Get GUIDs for all active companies |
java.lang.String |
activeContacts(JDCConnection oConn)
Get GUIDs for all active contacts |
java.lang.String |
activeMembers(JDCConnection oConn)
Get e-mail address for all active members |
int |
addCompany(java.sql.Connection oConn,
java.lang.String sCompanyGUID)
Add Contact e-mails to Static, Direct or Black List If Contact has several addresses then all of them are added to the list |
int |
addContact(java.sql.Connection oConn,
java.lang.String sContactGUID)
Add Contact e-mails to Static, Direct or Black List If Contact has several addresses then all of them are added to the list |
void |
append(JDCConnection oConn,
java.lang.String sListGUID)
Append members of a list to this DistributionList. |
java.lang.String |
blackList(JDCConnection oConn)
Get associated Black List GUID The Black List is that witch tp_list=BLACK_LIST AND gu_query=this.gu_list |
java.lang.String |
clone(JDCConnection oConn)
Clone this DistributionList. |
boolean |
contains(JDCConnection oConn,
java.lang.String sMember)
Find out if list contains a particular member Member is searched at k_x_list_members table either at gu_company and gu_contact or tx_email. |
boolean |
delete(JDCConnection oConn)
Delete a register from database The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method. |
static boolean |
delete(JDCConnection oConn,
java.lang.String sListGUID)
Delete Distribution List Call k_sp_del_list stored procedure. |
int |
deleteDuplicates(JDCConnection oConn)
Delete duplicated e-mails from a static or direct list. |
boolean |
load(JDCConnection oConn,
java.lang.Object[] PKVals)
Load the internal value set from a register at a database table |
boolean |
load(JDCConnection oConn,
java.lang.String sGuList)
Load the internal value set from a register at a database table |
int |
memberCount(JDCConnection oConn)
Count active members of this list |
void |
overwrite(JDCConnection oConn,
java.lang.String sListGUID)
Overwrite members of this DistributionList with members of given DistributionList. |
java.lang.String |
print(JDCConnection oConn,
boolean bPrintHeader)
Print List Members to a String. |
boolean |
store(JDCConnection oConn)
Store DistributionList Automatically generates gu_list GUID if not explicitly set. |
void |
substract(JDCConnection oConn,
java.lang.String sListGUID)
Remove from this DistributionList those members present at given DistributionList. |
| Methods inherited from class com.knowgate.dataobjs.DBPersist |
|---|
allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final short ClassId
public static final short TYPE_STATIC
public static final short TYPE_DYNAMIC
public static final short TYPE_DIRECT
public static final short TYPE_BLACK
| Constructor Detail |
|---|
public DistributionList()
public DistributionList(JDCConnection oConn,
java.lang.String sListGUID)
throws java.sql.SQLException
oConn - JDCConnection HDBC ConnectionsListGUID - String List GUID
java.sql.SQLException
public DistributionList(JDCConnection oConn,
java.lang.String sListDesc,
java.lang.String sWorkAreaGUID)
throws java.sql.SQLException
oConn - JDCConnection JDBC ConnectionsListDesc - String List DescriptionsWorkAreaGUID - String GUID of WorkArea to which list belongs
java.sql.SQLException| Method Detail |
|---|
public int memberCount(JDCConnection oConn)
throws java.sql.SQLException
oConn - JDBC Database Connection
java.sql.SQLException
public java.lang.String activeMembers(JDCConnection oConn)
throws java.sql.SQLException,
java.lang.IllegalStateException
oConn - JDBC Database Connection
java.sql.SQLException
java.lang.IllegalStateException
public java.lang.String activeContacts(JDCConnection oConn)
throws java.sql.SQLException
oConn - JDBC Database Connection
java.sql.SQLException
public java.lang.String activeCompanies(JDCConnection oConn)
throws java.sql.SQLException
oConn - JDBC Database Connection
java.sql.SQLException
public boolean contains(JDCConnection oConn,
java.lang.String sMember)
throws java.sql.SQLException
Find out if list contains a particular member
Member is searched at k_x_list_members table either at gu_company and gu_contact or tx_email. If list is Dynamic or Static, member is searched at gu_company and gu_contact. If list is Direct or Black, member is searched at tx_email
oConn - Database ConnectionsMember - If this is a Static or Dynamic list then sMember must be the GUID of Contact or Company searched.java.sql.SQLException
public boolean load(JDCConnection oConn,
java.lang.Object[] PKVals)
throws java.sql.SQLException
DBPersistLoad the internal value set from a register at a database table
load in class DBPersistoConn - Database ConnectionPKVals - Primary key values in order of appearance
java.sql.SQLException
public boolean load(JDCConnection oConn,
java.lang.String sGuList)
throws java.sql.SQLException
DBPersistLoad the internal value set from a register at a database table
load in class DBPersistoConn - JDCConnectionsGuList - String Primary key value
java.sql.SQLException
public boolean store(JDCConnection oConn)
throws java.sql.SQLException
Store DistributionList
Automatically generates gu_list GUID if not explicitly set. If value gu_category is set then this list is added to that category and removed from any previous category to which it belonged.
store in class DBPersistoConn - Database Connection
java.sql.SQLException
public boolean delete(JDCConnection oConn)
throws java.sql.SQLException
DBPersistDelete a register from database
The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.
delete in class DBPersistoConn - Database connection
java.sql.SQLException
public java.lang.String blackList(JDCConnection oConn)
throws java.sql.SQLException,
java.lang.IllegalStateException
Get associated Black List GUID
The Black List is that witch tp_list=BLACK_LIST AND gu_query=this.gu_list
oConn - Database Connection
java.sql.SQLException
java.lang.IllegalStateException - if this DistributionList has not been previously loaded
public int addContact(java.sql.Connection oConn,
java.lang.String sContactGUID)
throws java.lang.IllegalStateException,
java.sql.SQLException
Add Contact e-mails to Static, Direct or Black List
If Contact has several addresses then all of them are added to the list
oConn - Database ConnectionContact - GUID
java.sql.SQLException
java.lang.IllegalStateException - if this DistributionList has not been previously loaded
public int addCompany(java.sql.Connection oConn,
java.lang.String sCompanyGUID)
throws java.lang.IllegalStateException,
java.sql.SQLException
Add Contact e-mails to Static, Direct or Black List
If Contact has several addresses then all of them are added to the list
oConn - Database ConnectionContact - GUID
java.sql.SQLException
java.lang.IllegalStateException - if this DistributionList has not been previously loaded
public void append(JDCConnection oConn,
java.lang.String sListGUID)
throws java.sql.SQLException,
java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
java.lang.ClassCastException
Append members of a list to this DistributionList.
Members that where already present are not touched. Results are placed at this DistributionList.
oConn - Database ConnectionsListGUID - GUID of DistributionList to be appended
java.sql.SQLException
java.lang.IllegalArgumentException - If sListGUID==null
java.lang.IllegalStateException - If this.gu_list is not set
java.lang.ClassCastException - If this DistributionList type is DYNAMIC
public void overwrite(JDCConnection oConn,
java.lang.String sListGUID)
throws java.sql.SQLException,
java.lang.IllegalArgumentException,
java.lang.ClassCastException,
java.lang.IllegalStateException
oConn - Database Connection
java.sql.SQLException
java.lang.IllegalArgumentException - If sListGUID==null
java.lang.IllegalStateException - If this.gu_list is not set
java.lang.ClassCastException - If this DistributionList type is DYNAMIC
public void substract(JDCConnection oConn,
java.lang.String sListGUID)
throws java.sql.SQLException,
java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
java.lang.ClassCastException
oConn - Database Connection
java.sql.SQLException
java.lang.IllegalArgumentException - If sListGUID==null
java.lang.IllegalStateException - If this.gu_list is not set
java.lang.ClassCastException - If this DistributionList type is DYNAMIC
public java.lang.String clone(JDCConnection oConn)
throws java.sql.SQLException
oConn - Database Connection
java.sql.SQLException
public int deleteDuplicates(JDCConnection oConn)
throws java.sql.SQLException,
java.lang.IllegalStateException,
java.lang.UnsupportedOperationException
Delete duplicated e-mails from a static or direct list.
This method calls k_sp_del_duplicates stored procedure for PostgreSQL, MySQL and Microsoft SQL Server. For Oracle a direct DELETE statement is executed using ROWID for removing duplicate e-mails.
oConn - Database Connection
java.sql.SQLException - If the list type is not STATIC or DIRECT.
java.lang.IllegalStateException - is this DistributionList has not been previously loaded
java.lang.UnsupportedOperationException - if the underlying RDBMS is not PostgreSQL, MySQL, SQL Server or Oracle.
public java.lang.String print(JDCConnection oConn,
boolean bPrintHeader)
throws java.sql.SQLException
oConn - Database ConnectionbPrintHeader - true if column names are to be printed at first row.
java.sql.SQLException
public static boolean delete(JDCConnection oConn,
java.lang.String sListGUID)
throws java.sql.SQLException
oConn - Database ConnectionsListGUID - GUID of DistributionList to be deleted
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||