| java.lang.Object com.knowgate.dataobjs.DBPersist com.knowgate.crm.Company
Company | public class Company extends DBPersist (Code) | | Company
Copyright: Copyright (c) KnowGate 2003
author: Sergio Montoro Ten version: 3.0 |
Field Summary | |
final public static short | ClassId |
Constructor Summary | |
public | Company() Create Empty Company. | public | Company(String sCompanyId) Create Company and set gu_company field. | public | Company(JDCConnection oConn, String sCompanyId) Create Company and load fields from database. |
Method Summary | |
public boolean | addAddress(JDCConnection oConn, String sAddrGUID) Add an Address to this Company
If contact is already associated to the given address a foreign key violation
SQLExceception is raised. | public boolean | addBankAccount(JDCConnection oConn, String sFullBankAccount) | public static boolean | addLookupCompanyType(Connection oConn, String sGuWorkArea, String sIdType, HashMap oTranslations) | public static boolean | addLookupSector(Connection oConn, String sGuWorkArea, String sIdSector, HashMap oTranslations) | public boolean | delete(JDCConnection oConn) | public static boolean | delete(JDCConnection oConn, String sCompanyGUID) | public boolean | exists(JDCConnection oConn) Find out whether or not a company exists at database
Look up company by GUID or by legal name and work area. | public DBSubset | getActiveBankAccounts(JDCConnection oConn) | public Address | getAddress(JDCConnection oConn, String sTpLocation) | public DBSubset | getAddresses(JDCConnection oConn) | public DBSubset | getAllBankAccounts(JDCConnection oConn) | public static String | getIdFromLegalNum(Connection oConn, String sLegalId, String sWorkArea) | public static String | getIdFromName(Connection oConn, String sLegalName, String sWorkArea) | public static String | getIdFromRef(Connection oConn, String sReference, String sWorkArea) | public DBSubset | getUnactiveBankAccounts(JDCConnection oConn) | public boolean | store(JDCConnection oConn) Store Company
Automatically generates gu_company GUID and dt_modified DATE if not explicitly set. |
ClassId | final public static short ClassId(Code) | | |
Company | public Company()(Code) | | Create Empty Company.
|
Company | public Company(String sCompanyId)(Code) | | Create Company and set gu_company field.
Does not load other fields from database.
Parameters: sCompanyId - Company GUID |
addAddress | public boolean addAddress(JDCConnection oConn, String sAddrGUID) throws SQLException(Code) | | Add an Address to this Company
If contact is already associated to the given address a foreign key violation
SQLExceception is raised.
Parameters: oConn - Database Connection throws: SQLException - |
addBankAccount | public boolean addBankAccount(JDCConnection oConn, String sFullBankAccount) throws SQLException(Code) | | Add a bank account to this Company
If company 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 |
addLookupCompanyType | public static boolean addLookupCompanyType(Connection oConn, String sGuWorkArea, String sIdType, HashMap oTranslations) throws SQLException(Code) | | Add a Company Type lookup value
Parameters: oConn - Connection Parameters: sGuWorkArea - String GUID of WorkArea Parameters: sDeTitle - String Company Type Internal Identifier Parameters: oTranslations - HashMap with one entry for each language boolean true if new sector was added, false if it already existed throws: SQLException - since: 3.0 |
addLookupSector | public static boolean addLookupSector(Connection oConn, String sGuWorkArea, String sIdSector, HashMap oTranslations) throws SQLException(Code) | | Add a Company Sector lookup value
Parameters: oConn - Connection Parameters: sGuWorkArea - String GUID of WorkArea Parameters: sDeTitle - String Sector Internal Identifier Parameters: oTranslations - HashMap with one entry for each language boolean true if new sector was added, false if it already existed throws: SQLException - since: 3.0 |
delete | public static boolean delete(JDCConnection oConn, String sCompanyGUID) throws SQLException(Code) | | Delete Company.
Delete all associated contacts and call k_sp_del_company stored procedure.
If k_orders table exists, then Orders for this Company are deleted.
If k_projects table exists, then Projects for this Company are deleted.
Parameters: oConn - Database Connection Parameters: sCompanyGUID - Company GUID throws: SQLException - |
exists | public boolean exists(JDCConnection oConn) throws SQLException(Code) | | Find out whether or not a company exists at database
Look up company by GUID or by legal name and work area.
Parameters: oConn - database connection true if a company with such GUID or legal name+work area is found. throws: SQLException - |
getActiveBankAccounts | public DBSubset getActiveBankAccounts(JDCConnection oConn) throws SQLException, IllegalStateException(Code) | | Get active bank accounts for this Company
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_company or gu_workarea are not set since: 3.0 |
getAllBankAccounts | public DBSubset getAllBankAccounts(JDCConnection oConn) throws SQLException, IllegalStateException(Code) | | Get all bank accounts associated with Company
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_company or gu_workarea are not set since: 3.0 |
getIdFromLegalNum | public static String getIdFromLegalNum(Connection oConn, String sLegalId, String sWorkArea) throws SQLException(Code) | | Get company GUID given its legal number
Parameters: oConn - Connection Parameters: sLegalName - String Legal Number of sought Company Parameters: sWorkArea - String GUID of WorkArea where to search String Company GUID or null if no company with such legal number was found at given work area throws: SQLException - since: 3.0 |
getIdFromName | public static String getIdFromName(Connection oConn, String sLegalName, String sWorkArea) throws SQLException(Code) | | Get company GUID given its legal name
Parameters: oConn - Connection Parameters: sLegalName - String Legal name of sought Company Parameters: sWorkArea - String GUID of WorkArea where to search String Company GUID or null if no company with such legal name was found at given work area throws: SQLException - since: 3.0 |
getIdFromRef | public static String getIdFromRef(Connection oConn, String sReference, String sWorkArea) throws SQLException(Code) | | Get company GUID given its external reference
Parameters: oConn - Connection Parameters: sLegalName - String External reference of sought Company Parameters: sWorkArea - String GUID of WorkArea where to search String Company GUID or null if no company with such reference was found at given work area throws: SQLException - since: 3.0 |
getUnactiveBankAccounts | public DBSubset getUnactiveBankAccounts(JDCConnection oConn) throws SQLException, IllegalStateException(Code) | | Get unactive bank accounts for this Company
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_company or gu_workarea are not set since: 3.0 |
store | public boolean store(JDCConnection oConn) throws SQLException(Code) | | Store Company
Automatically generates gu_company GUID and dt_modified DATE if not explicitly set.
Parameters: oConn - Database Connection throws: SQLException - |
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)
|
|
|