Java Doc for Contact.java in  » Groupware » hipergate » com » knowgate » crm » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Groupware » hipergate » com.knowgate.crm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.knowgate.dataobjs.DBPersist
      com.knowgate.crm.Contact

Contact
public class Contact extends DBPersist (Code)

Contact

Copyright: Copyright (c) KnowGate 2003


author:
   Sergio Montoro Ten
version:
   3.0


Field Summary
final public static  shortClassId
    

Constructor Summary
public  Contact()
     Create Empty Contact.
public  Contact(String sIdContact)
     Create Contact and set gu_contact field.
public  Contact(JDCConnection oConn, String sIdContact)
     Create Contact and load fields from database.

Method Summary
public  booleanaddAddress(JDCConnection oConn, String sAddrGUID)
    
public  AttachmentaddAttachment(JDCConnection oConn, String sGuWriter, String sDirPath, String sFileName, boolean bDeleteOriginalFile)
    
public  voidaddAttachments(JDCConnection oConn, String sGuWriter, String sDirPath, boolean bDeleteOriginalFiles)
    
public  booleanaddBankAccount(JDCConnection oConn, String sFullBankAccount)
    
public static  booleanaddLookupJobTitle(Connection oConn, String sGuWorkArea, String sDeTitle, HashMap oTranslations)
    
public static  booleanaddLookupPassportType(Connection oConn, String sGuWorkArea, String sTpPassport, HashMap oTranslations)
    
public  booleandelete(JDCConnection oConn)
     Delete Contact.
public static  booleandelete(JDCConnection oConn, String sContactGUID)
     Delete Contact.
public  DBSubsetgetActiveBankAccounts(JDCConnection oConn)
    
public  AddressgetAddress(JDCConnection oConn, int iIndex)
    
public  AddressgetAddress(JDCConnection oConn, String sTpLocation)
    
public  DBSubsetgetAddresses(JDCConnection oConn)
    
public  DBSubsetgetAllBankAccounts(JDCConnection oConn)
    
public  Attachment[]getAttachments(JDCConnection oConn)
    
public  DBSubsetgetUnactiveBankAccounts(JDCConnection oConn)
    
public  WelcomePackgetWelcomePack(JDCConnection oConn)
    
public  booleanremoveAttachment(JDCConnection oConn, int iPgAttachment)
    
public  booleanstore(JDCConnection oConn)
    

Store Contact

Automatically generates gu_contact GUID and dt_modified DATE if not explicitly set.
If gu_company field is null and nm_legal field is not null then gu_company field is automatically looked up at k_companies table and put in this DBPersist before storing it.

Field Detail
ClassId
final public static short ClassId(Code)




Constructor Detail
Contact
public Contact()(Code)
Create Empty Contact.



Contact
public Contact(String sIdContact) throws SQLException(Code)
Create Contact and set gu_contact field. Does not load other fields from database.
Parameters:
  sIdContact - Contact GUID



Contact
public Contact(JDCConnection oConn, String sIdContact) throws SQLException(Code)
Create Contact and load fields from database.
Parameters:
  oConn - Database Connection
Parameters:
  sIdContact - Contact GUID




Method Detail
addAddress
public boolean addAddress(JDCConnection oConn, String sAddrGUID) throws SQLException(Code)

Add an Address to this Contact

If contact is already associated to the given address then a foreign key violation is thrown
Parameters:
  oConn - Database Connection
throws:
  SQLException -
since:
   3.0



addAttachment
public Attachment addAttachment(JDCConnection oConn, String sGuWriter, String sDirPath, String sFileName, boolean bDeleteOriginalFile) throws SQLException, NullPointerException, FileNotFoundException, Exception(Code)
Add an Attachment to a Contact
Parameters:
  oConn - JDCConnection
Parameters:
  sGuWriter - String GUID of user (from k_users table) who is uploading the attachment
Parameters:
  sDirPath - String Physical path (directory) where file to be attached ir located
Parameters:
  sFileName - String Name of file to be attached
Parameters:
  bDeleteOriginalFile - boolean true if original file must be deleted after being attached Attachment
throws:
  SQLException -
throws:
  NullPointerException -
throws:
  FileNotFoundException -
throws:
  Exception -
since:
   3.0



addAttachments
public void addAttachments(JDCConnection oConn, String sGuWriter, String sDirPath, boolean bDeleteOriginalFiles) throws SQLException, NullPointerException, FileNotFoundException, Exception(Code)
Attach all files from a given directory
Parameters:
  oConn - JDCConnection
Parameters:
  sGuWriter - String GUID of user attaching the files
Parameters:
  sDirPath - String Directory Path
Parameters:
  bDeleteOriginalFiles - boolean true if original files must be deleted after being attached
throws:
  SQLException -
throws:
  NullPointerException -
throws:
  FileNotFoundException -
throws:
  Exception -
since:
   3.0



addBankAccount
public boolean addBankAccount(JDCConnection oConn, String sFullBankAccount) throws SQLException(Code)

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
Parameters:
  oConn - Database Connection
throws:
  SQLException -
since:
   3.0



addLookupJobTitle
public static boolean addLookupJobTitle(Connection oConn, String sGuWorkArea, String sDeTitle, HashMap oTranslations) throws SQLException(Code)

Add a Job Title lookup value
Parameters:
  oConn - Connection
Parameters:
  sGuWorkArea - String GUID of WorkArea
Parameters:
  sDeTitle - String Passport Type Internal Value
Parameters:
  oTranslations - HashMap with one entry for each language boolean true if new job title was added, false if it already existed
throws:
  SQLException -
since:
   3.0




addLookupPassportType
public static boolean addLookupPassportType(Connection oConn, String sGuWorkArea, String sTpPassport, HashMap oTranslations) throws SQLException(Code)

Add a Street Type lookup value
Parameters:
  oConn - Connection
Parameters:
  sGuWorkArea - String GUID of WorkArea
Parameters:
  sTpPassport - String Passport Type Internal Value
Parameters:
  oTranslations - HashMap with one entry for each language boolean true if new passport type was added, false if it already existed
throws:
  SQLException -
since:
   3.0




delete
public boolean delete(JDCConnection oConn) throws SQLException(Code)
Delete Contact.
throws:
  SQLException -



delete
public static boolean delete(JDCConnection oConn, String sContactGUID) throws SQLException(Code)
Delete Contact. The delete step by step is as follws:
If k_x_meeting_contact table exists, then Contact is deleted from Meetings.
If k_orders table exists, then Orders for this Contact are deleted.
All Contact Attachments are deleted.
Stored Procedure k_sp_del_contact is called
Parameters:
  oConn - Database Connection
Parameters:
  sContactGUID - GUID of Contact to be deleted
throws:
  SQLException -



getActiveBankAccounts
public DBSubset getActiveBankAccounts(JDCConnection oConn) throws SQLException, IllegalStateException(Code)
Get active bank accounts for this Contact
Parameters:
  oConn - JDCConnection DBSubset nu_bank_acc,dt_created,tp_account,nm_bank,tx_addr,nm_cardholder,nu_card,tp_card,tx_expire,nu_pin,nu_cvv2,im_credit_limit,de_bank_acc
throws:
  SQLException -
throws:
  IllegalStateException - if gu_contact or gu_workarea are not set
since:
   3.0



getAddress
public Address getAddress(JDCConnection oConn, int iIndex) throws SQLException(Code)
Get Contact Address by index
Parameters:
  oConn - JDCConnection
Parameters:
  iIndex - int Address index as set at column ix_address of k_addresses table Address or null if no Address with such index was found
throws:
  SQLException -
since:
   3.0



getAddress
public Address getAddress(JDCConnection oConn, String sTpLocation) throws SQLException(Code)
Get Contact Address by location type
Parameters:
  oConn - JDCConnection
Parameters:
  sTpLocation - String Address type as set at column tp_location of k_addresses table Address or null if no Address with such location type was found
throws:
  SQLException -
since:
   2.2



getAddresses
public DBSubset getAddresses(JDCConnection oConn) throws SQLException(Code)

Get Contact Addresses


Parameters:
  oConn - Database Connection A DBSubset with all columns from k_addresses for Contact
throws:
  SQLException -
throws:
  NullPointerException - If gu_contact is null



getAllBankAccounts
public DBSubset getAllBankAccounts(JDCConnection oConn) throws SQLException, IllegalStateException(Code)
Get all bank accounts associated with Contact
Parameters:
  oConn - JDCConnection DBSubset nu_bank_acc,dt_created,bo_active,tp_account,nm_bank,tx_addr,nm_cardholder,nu_card,tp_card,tx_expire,nu_pin,nu_cvv2,im_credit_limit,de_bank_acc
throws:
  SQLException -
throws:
  IllegalStateException - if gu_contact or gu_workarea are not set
since:
   3.0



getAttachments
public Attachment[] getAttachments(JDCConnection oConn) throws SQLException, NullPointerException(Code)
Get array of products attached to this Contact
Parameters:
  oConn - JDCConnection Attachment[] array or null if no products are attached to this contact
throws:
  SQLException -
throws:
  NullPointerException - if gu_contact is null
since:
   3.0



getUnactiveBankAccounts
public DBSubset getUnactiveBankAccounts(JDCConnection oConn) throws SQLException, IllegalStateException(Code)
Get unactive bank accounts for this Contact
Parameters:
  oConn - JDCConnection DBSubset nu_bank_acc,dt_created,tp_account,nm_bank,tx_addr,nm_cardholder,nu_card,tp_card,tx_expire,nu_pin,nu_cvv2,im_credit_limit,de_bank_acc
throws:
  SQLException -
throws:
  IllegalStateException - if gu_contact or gu_workarea are not set
since:
   3.0



getWelcomePack
public WelcomePack getWelcomePack(JDCConnection oConn) throws SQLException(Code)
Get most recent WelCome Pack associated to this contact
Parameters:
  oConn - JDCConnection WelcomePack
throws:
  SQLException -
since:
   3.0



removeAttachment
public boolean removeAttachment(JDCConnection oConn, int iPgAttachment) throws SQLException(Code)
Remove attachment
Parameters:
  oConn - JDCConnection
Parameters:
  iPgAttachment - int boolean
throws:
  SQLException -
throws:
  NullPointerException -
since:
   3.0



store
public boolean store(JDCConnection oConn) throws SQLException(Code)

Store Contact

Automatically generates gu_contact GUID and dt_modified DATE if not explicitly set.
If gu_company field is null and nm_legal field is not null then gu_company field is automatically looked up at k_companies table and put in this DBPersist before storing it.
Parameters:
  oConn - Database Connection
throws:
  SQLException -



Fields inherited from com.knowgate.dataobjs.DBPersist
protected HashMap AllVals(Code)(Java Doc)
protected String sAuditCls(Code)(Java Doc)
protected String sAuditUsr(Code)(Java Doc)
protected String sTransactId(Code)(Java Doc)

Methods inherited from com.knowgate.dataobjs.DBPersist
public void allcaps(boolean bAllValuesUpperCase)(Code)(Java Doc)
public boolean allcaps()(Code)(Java Doc)
protected HashMap changelog(DBPersist oOldInstance)(Code)(Java Doc)
public void clear()(Code)(Java Doc)
public void clone(DBPersist oSource)(Code)(Java Doc)
public boolean containsKey(Object oKey) throws NullPointerException(Code)(Java Doc)
public boolean containsValue(Object oKey)(Code)(Java Doc)
public boolean delete(JDCConnection oConn) throws SQLException(Code)(Java Doc)
public Set entrySet()(Code)(Java Doc)
public boolean exists(JDCConnection oConn) throws SQLException(Code)(Java Doc)
public Object get(String sKey)(Code)(Java Doc)
public Object get(Object oKey) throws NullPointerException(Code)(Java Doc)
public String getAuditClassName()(Code)(Java Doc)
public Date getCreationDate(JDCConnection oConn) throws SQLException(Code)(Java Doc)
public java.util.Date getDate(String sKey) throws ClassCastException(Code)(Java Doc)
public String getDateFormated(String sKey, String sFormat) throws ClassCastException(Code)(Java Doc)
public String getDateShort(String sKey) throws ClassCastException(Code)(Java Doc)
public String getDateTime(String sKey)(Code)(Java Doc)
public String getDateTime24(String sKey)(Code)(Java Doc)
public BigDecimal getDecimal(String sKey) throws ClassCastException, NumberFormatException(Code)(Java Doc)
public String getDecimalFormated(String sKey, String sPattern) throws ClassCastException, NumberFormatException, NullPointerException, IllegalArgumentException(Code)(Java Doc)
public double getDouble(String sKey) throws NullPointerException, NumberFormatException(Code)(Java Doc)
public String getDoubleFormated(String sKey, String sPattern) throws ClassCastException, NumberFormatException, NullPointerException, IllegalArgumentException(Code)(Java Doc)
public float getFloat(String sKey) throws NullPointerException, NumberFormatException(Code)(Java Doc)
public String getFloatFormated(String sKey, String sPattern) throws ClassCastException, NumberFormatException, NullPointerException, IllegalArgumentException(Code)(Java Doc)
public int getInt(String sKey) throws NullPointerException, NumberFormatException(Code)(Java Doc)
public Integer getInteger(String sKey) throws NumberFormatException(Code)(Java Doc)
public int getIntervalPart(String sKey, String sPart) throws NullPointerException, NumberFormatException, IllegalArgumentException(Code)(Java Doc)
public HashMap getItemMap()(Code)(Java Doc)
public Set getItems()(Code)(Java Doc)
public Money getMoney(String sKey) throws NumberFormatException(Code)(Java Doc)
public java.sql.Date getSQLDate(String sKey) throws ClassCastException(Code)(Java Doc)
public Time getSQLTime(String sKey) throws ClassCastException(Code)(Java Doc)
public short getShort(String sKey) throws java.lang.NullPointerException(Code)(Java Doc)
public String getString(String sKey) throws NullPointerException(Code)(Java Doc)
public String getStringNull(String sKey, String sDefault)(Code)(Java Doc)
public DBTable getTable()(Code)(Java Doc)
public DBTable getTable(JDCConnection oConn) throws SQLException, IllegalStateException(Code)(Java Doc)
public String getTableName()(Code)(Java Doc)
public String getTime(String sKey) throws ClassCastException(Code)(Java Doc)
public Time getTimeOfDay(String sKey)(Code)(Java Doc)
public Timestamp getTimestamp(String sKey)(Code)(Java Doc)
protected static String getUIdFromName(JDCConnection oConn, Integer iDomainId, String sInstanceNm, String sStoredProc) throws SQLException(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
public boolean isNull(String sKey)(Code)(Java Doc)
public Iterator iterator()(Code)(Java Doc)
public Set keySet()(Code)(Java Doc)
public boolean load(JDCConnection oConn, Object[] PKVals) throws SQLException(Code)(Java Doc)
public boolean load(JDCConnection oConn, String sKey) throws SQLException(Code)(Java Doc)
public void parseXML(String sXMLFilePath) throws SAXException, SAXNotRecognizedException, SAXNotSupportedException, SAXParseException, IOException, ClassNotFoundException, IllegalAccessException, InstantiationException(Code)(Java Doc)
public void put(String sKey, String sVal) throws NullPointerException(Code)(Java Doc)
public void put(String sKey, Object oObj) throws NullPointerException(Code)(Java Doc)
public Object put(Object sKey, Object oObj) throws NullPointerException(Code)(Java Doc)
public void put(String sKey, int iVal)(Code)(Java Doc)
public void put(String sKey, short iVal)(Code)(Java Doc)
public void put(String sKey, Date dtVal)(Code)(Java Doc)
public void put(String sKey, Time tmVal)(Code)(Java Doc)
public void put(String sKey, String sDate, SimpleDateFormat oPattern) throws ParseException(Code)(Java Doc)
public void put(String sKey, double dVal)(Code)(Java Doc)
public void put(String sKey, BigDecimal oDecVal)(Code)(Java Doc)
public void put(String sKey, String sDecVal, DecimalFormat oPattern) throws ParseException(Code)(Java Doc)
public void put(String sKey, float fVal)(Code)(Java Doc)
public void put(String sKey, Money mVal)(Code)(Java Doc)
public void put(String sKey, File oFile) throws FileNotFoundException(Code)(Java Doc)
public void put(String sKey, byte[] aBytes)(Code)(Java Doc)
public void put(String sKey, char[] aChars)(Code)(Java Doc)
public void put(String sKey, String sData, int iSQLType) throws FileNotFoundException, IllegalArgumentException, NullPointerException(Code)(Java Doc)
public void putAll(Properties oPropsCollection) throws FileNotFoundException(Code)(Java Doc)
public void putAll(Map oMap)(Code)(Java Doc)
public void remove(String sKey)(Code)(Java Doc)
public Object remove(Object oKey)(Code)(Java Doc)
public void replace(String sKey, Object oObj)(Code)(Java Doc)
public void replace(String sKey, int iVal)(Code)(Java Doc)
public void replace(String sKey, short iVal)(Code)(Java Doc)
public void replace(String sKey, float fVal)(Code)(Java Doc)
public void setAuditTransact(String sAuditTransact)(Code)(Java Doc)
public void setAuditUser(String sAuditUser)(Code)(Java Doc)
public int size()(Code)(Java Doc)
public boolean store(JDCConnection oConn) throws SQLException(Code)(Java Doc)
public void toLowerCase(String sKey)(Code)(Java Doc)
public void toUpperCase(String sKey)(Code)(Java Doc)
protected String toXML(String sIdent, String sDelim, HashMap oAttrs) throws IllegalStateException(Code)(Java Doc)
public String toXML(String sIdent, String sDelim) throws IllegalStateException(Code)(Java Doc)
public String toXML(String sIdent)(Code)(Java Doc)
public String toXML()(Code)(Java Doc)
public Collection values()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.