|
|||||||||
| 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.Contact
public class Contact
Contact
Copyright: Copyright (c) KnowGate 2003
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Field Summary | |
|---|---|
static short |
ClassId
|
| Fields inherited from class com.knowgate.dataobjs.DBPersist |
|---|
AllVals, sAuditCls, sAuditUsr, sTransactId |
| Constructor Summary | |
|---|---|
Contact()
Create Empty Contact. |
|
Contact(JDCConnection oConn,
java.lang.String sIdContact)
Create Contact and load fields from database. |
|
Contact(java.lang.String sIdContact)
Create Contact and set gu_contact field. |
|
| Method Summary | |
|---|---|
boolean |
addAddress(JDCConnection oConn,
java.lang.String sAddrGUID)
Add an Address to this Contact If contact is already associated to the given address then a foreign key violation is thrown |
Attachment |
addAttachment(JDCConnection oConn,
java.lang.String sGuWriter,
java.lang.String sDirPath,
java.lang.String sFileName,
boolean bDeleteOriginalFile)
Add an Attachment to a Contact |
Attachment |
addAttachment(JDCConnection oConn,
java.lang.String sGuWriter,
java.lang.String sDirPath,
java.lang.String sFileName,
java.lang.String sDescription,
boolean bDeleteOriginalFile)
Add an Attachment to a Contact |
void |
addAttachments(JDCConnection oConn,
java.lang.String sGuWriter,
java.lang.String sDirPath,
boolean bDeleteOriginalFiles)
Attach all files from a given directory |
boolean |
addBankAccount(JDCConnection oConn,
java.lang.String sFullBankAccount)
Add a bank account to this Contact If contact is already associated to the given bank account then a foreign key violation SQLException is thrown |
static boolean |
addLookupJobTitle(java.sql.Connection oConn,
java.lang.String sGuWorkArea,
java.lang.String sDeTitle,
java.util.HashMap oTranslations)
Add a Job Title lookup value |
static boolean |
addLookupPassportType(java.sql.Connection oConn,
java.lang.String sGuWorkArea,
java.lang.String sTpPassport,
java.util.HashMap oTranslations)
Add a Street Type lookup value |
int |
addToACLGroups(JDCConnection oConn,
java.lang.String sGroupList)
Add Contact to a set of security restrictions groups. |
int |
clearACLGroups(JDCConnection oConn)
Remove contact from all security restrictions groups |
boolean |
delete(JDCConnection oConn)
Delete Contact. |
static boolean |
delete(JDCConnection oConn,
java.lang.String sContactGUID)
Delete Contact. |
DBSubset |
getActiveBankAccounts(JDCConnection oConn)
Get active bank accounts for this Contact |
Address |
getAddress(JDCConnection oConn,
int iIndex)
Get Contact Address by index |
Address |
getAddress(JDCConnection oConn,
java.lang.String sTpLocation)
Get Contact Address by location type |
DBSubset |
getAddresses(JDCConnection oConn)
Get Contact Addresses |
DBSubset |
getAllBankAccounts(JDCConnection oConn)
Get all bank accounts associated with Contact |
Attachment[] |
getAttachments(JDCConnection oConn)
Get array of products attached to this Contact |
DBSubset |
getGroups(JDCConnection oConn)
Get groups that may have access to this contact. |
DBSubset |
getUnactiveBankAccounts(JDCConnection oConn)
Get unactive bank accounts for this Contact |
WelcomePack |
getWelcomePack(JDCConnection oConn)
Get most recent WelCome Pack associated to this contact |
boolean |
removeAttachment(JDCConnection oConn,
int iPgAttachment)
Remove attachment |
int |
removeFromACLGroup(JDCConnection oConn,
java.lang.String sIdGroup)
Remove Contact from security restrictions group. |
boolean |
store(JDCConnection oConn)
Store Contact Automatically generates gu_contact GUID and dt_modified DATE if not explicitly set. |
java.lang.String |
toXML(JDCConnection oConn,
java.lang.String sIdent,
java.lang.String sDelim)
Get an XML dump for Contact and its associated addresses |
| 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, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, load, 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, setAuditTransact, setAuditUser, 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
| Constructor Detail |
|---|
public Contact()
public Contact(java.lang.String sIdContact)
throws java.sql.SQLException
sIdContact - Contact GUID
java.sql.SQLException
public Contact(JDCConnection oConn,
java.lang.String sIdContact)
throws java.sql.SQLException
oConn - Database ConnectionsIdContact - Contact GUID
java.sql.SQLException| Method Detail |
|---|
public boolean store(JDCConnection oConn)
throws java.sql.SQLException
Store Contact
Automatically generates gu_contact GUID and dt_modified DATE if not explicitly set.
store in class DBPersistoConn - Database Connection
java.sql.SQLException
public boolean delete(JDCConnection oConn)
throws java.sql.SQLException
delete in class DBPersistoConn - Database connection
java.sql.SQLException
public DBSubset getGroups(JDCConnection oConn)
throws java.sql.SQLException
oConn - Database Connection
DBSubset with a 1 column containing each group unique identifier (gu_acl_group).
java.sql.SQLException
public int addToACLGroups(JDCConnection oConn,
java.lang.String sGroupList)
throws java.sql.SQLException
Add Contact to a set of security restrictions groups.
Insert new registers at k_x_group_contact table.
oConn - Database ConnectionsGroupList - A string of comma delimited ACLGroup GUIDs to with this ACLUser must be added.
java.sql.SQLException - May throw a primary key constraint violation if contact already belongs to group.
public int clearACLGroups(JDCConnection oConn)
throws java.sql.SQLException
Remove contact from all security restrictions groups
oConn - Database Connection
java.sql.SQLException
public int removeFromACLGroup(JDCConnection oConn,
java.lang.String sIdGroup)
throws java.sql.SQLException
Remove Contact from security restrictions group.
remove register from k_x_group_user table.
oConn - Database ConnectionsIdGroup - Group Unique Identifier.
java.sql.SQLException
public boolean addAddress(JDCConnection oConn,
java.lang.String sAddrGUID)
throws java.sql.SQLException
Add an Address to this Contact
If contact is already associated to the given address then a foreign key violation is thrown
oConn - Database Connection
java.sql.SQLException
public boolean addBankAccount(JDCConnection oConn,
java.lang.String sFullBankAccount)
throws java.sql.SQLException
Add a bank account to this Contact
If contact is already associated to the given bank account then a foreign key violation SQLException is thrown
oConn - Database Connection
java.sql.SQLException
public Address getAddress(JDCConnection oConn,
int iIndex)
throws java.sql.SQLException
oConn - JDCConnectioniIndex - int Address index as set at column ix_address of k_addresses table
java.sql.SQLException
public Address getAddress(JDCConnection oConn,
java.lang.String sTpLocation)
throws java.sql.SQLException
oConn - JDCConnectionsTpLocation - String Address type as set at column tp_location of k_addresses table
java.sql.SQLException
public DBSubset getAddresses(JDCConnection oConn)
throws java.sql.SQLException
Get Contact Addresses
oConn - Database Connection
java.sql.SQLException
java.lang.NullPointerException - If gu_contact is null
public DBSubset getAllBankAccounts(JDCConnection oConn)
throws java.sql.SQLException,
java.lang.IllegalStateException
oConn - JDCConnection
java.sql.SQLException
java.lang.IllegalStateException - if gu_contact or gu_workarea are not set
public DBSubset getActiveBankAccounts(JDCConnection oConn)
throws java.sql.SQLException,
java.lang.IllegalStateException
oConn - JDCConnection
java.sql.SQLException
java.lang.IllegalStateException - if gu_contact or gu_workarea are not set
public DBSubset getUnactiveBankAccounts(JDCConnection oConn)
throws java.sql.SQLException,
java.lang.IllegalStateException
oConn - JDCConnection
java.sql.SQLException
java.lang.IllegalStateException - if gu_contact or gu_workarea are not set
public Attachment addAttachment(JDCConnection oConn,
java.lang.String sGuWriter,
java.lang.String sDirPath,
java.lang.String sFileName,
boolean bDeleteOriginalFile)
throws java.sql.SQLException,
java.lang.NullPointerException,
java.io.FileNotFoundException,
java.lang.Exception
oConn - JDCConnectionsGuWriter - String GUID of user (from k_users table) who is uploading the attachmentsDirPath - String Physical path (directory) where file to be attached ir locatedsFileName - String Name of file to be attachedbDeleteOriginalFile - boolean true if original file must be deleted after being attached
java.sql.SQLException
java.lang.NullPointerException
java.io.FileNotFoundException
java.lang.Exception
public Attachment addAttachment(JDCConnection oConn,
java.lang.String sGuWriter,
java.lang.String sDirPath,
java.lang.String sFileName,
java.lang.String sDescription,
boolean bDeleteOriginalFile)
throws java.sql.SQLException,
java.lang.NullPointerException,
java.io.FileNotFoundException,
java.lang.Exception
oConn - JDCConnectionsGuWriter - String GUID of user (from k_users table) who is uploading the attachmentsDirPath - String Physical path (directory) where file to be attached ir locatedsFileName - String Name of file to be attachedsDescription - String File Description (up to 254 characters)bDeleteOriginalFile - boolean true if original file must be deleted after being attached
java.sql.SQLException
java.lang.NullPointerException
java.io.FileNotFoundException
java.lang.Exception
public void addAttachments(JDCConnection oConn,
java.lang.String sGuWriter,
java.lang.String sDirPath,
boolean bDeleteOriginalFiles)
throws java.sql.SQLException,
java.lang.NullPointerException,
java.io.FileNotFoundException,
java.lang.Exception
oConn - JDCConnectionsGuWriter - String GUID of user attaching the filessDirPath - String Directory PathbDeleteOriginalFiles - boolean true if original files must be deleted after being attached
java.sql.SQLException
java.lang.NullPointerException
java.io.FileNotFoundException
java.lang.Exception
public boolean removeAttachment(JDCConnection oConn,
int iPgAttachment)
throws java.sql.SQLException
oConn - JDCConnectioniPgAttachment - int
java.sql.SQLException
java.lang.NullPointerException
public Attachment[] getAttachments(JDCConnection oConn)
throws java.sql.SQLException,
java.lang.NullPointerException
oConn - JDCConnection
java.sql.SQLException
java.lang.NullPointerException - if gu_contact is null
public WelcomePack getWelcomePack(JDCConnection oConn)
throws java.sql.SQLException
oConn - JDCConnection
java.sql.SQLException
public java.lang.String toXML(JDCConnection oConn,
java.lang.String sIdent,
java.lang.String sDelim)
throws java.lang.IllegalStateException,
java.sql.SQLException
Get an XML dump for Contact and its associated addresses
sIdent - Number of blank spaces for left padding at every line.sDelim - Line delimiter (usually "\n" or "\r\n")
java.lang.IllegalStateException - If XML method is invoked before Contact object is loaded
java.sql.SQLException
public static boolean delete(JDCConnection oConn,
java.lang.String sContactGUID)
throws java.sql.SQLException
oConn - Database ConnectionsContactGUID - GUID of Contact to be deleted
java.sql.SQLException
public static boolean addLookupPassportType(java.sql.Connection oConn,
java.lang.String sGuWorkArea,
java.lang.String sTpPassport,
java.util.HashMap oTranslations)
throws java.sql.SQLException
Add a Street Type lookup value
oConn - ConnectionsGuWorkArea - String GUID of WorkAreasTpPassport - String Passport Type Internal ValueoTranslations - HashMap with one entry for each language
java.sql.SQLException
public static boolean addLookupJobTitle(java.sql.Connection oConn,
java.lang.String sGuWorkArea,
java.lang.String sDeTitle,
java.util.HashMap oTranslations)
throws java.sql.SQLException
Add a Job Title lookup value
oConn - ConnectionsGuWorkArea - String GUID of WorkAreasDeTitle - String Passport Type Internal ValueoTranslations - HashMap with one entry for each language
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||