|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.dataobjs.DBPersist
com.knowgate.hipergate.Address
public class Address
Address
A generic postal address object for being associated to any other objects that may require address information.
| 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 | |
|---|---|
Address()
Create empty Address |
|
Address(JDCConnection oConn,
java.lang.String guAddr)
Load Address from database |
|
| Method Summary | |
|---|---|
static boolean |
addLookupState(java.sql.Connection oConn,
java.lang.String sGuWorkArea,
java.lang.String sIdCountry,
java.lang.String sNmState,
java.util.HashMap oTranslations)
Add a State for a given country at k_addresses_lookup table This methods checks whether the given State Name exists at k_addresses_lookup for a given country and, if not, then inserts it. |
static boolean |
addLookupStreetType(java.sql.Connection oConn,
java.lang.String sGuWorkArea,
java.lang.String sTpStreet,
java.util.HashMap oTranslations)
Add a Street Type lookup value |
boolean |
delete(JDCConnection oConn)
Delete Address Registers at k_welcome_packs, k_x_company_addr and k_x_contact_addr are deleted on cascade |
static DBSubset |
getAddressesByCompanyName(JDCConnection oConn,
java.lang.String sCompanyNm,
java.lang.String sWorkArea)
Get addresses given their company name This method difers from Company.getAddresses() in that getAddresses() takes the Company GUID and makes a query into k_x_company_addr table. |
static java.lang.String |
getIdFromEmail(JDCConnection oConn,
java.lang.String sEMail,
java.lang.String sWorkArea)
Get Address Unique Id. from its e-mail. |
boolean |
load(JDCConnection oConn,
java.lang.Object[] PKVals)
Load values set at table k_addresses This method trims the value of id_country column |
boolean |
load(JDCConnection oConn,
java.lang.String sGuAddress)
Load values set at table k_addresses This method trims the value of id_country column |
static int |
nextLocalIndex(java.sql.Connection oConn,
java.lang.String sLinkTable,
java.lang.String sLinkField,
java.lang.String sLinkValue)
Get next free address index for a given object. |
boolean |
store(JDCConnection oConn)
Store Address If gu_address is null a new GUID is automatically assigned. |
java.lang.String |
toXML()
Get an XML dump for the DBPersist values. |
java.lang.String |
toXML(java.lang.String sIdent)
Get an XML dump for the DBPersist values. |
java.lang.String |
toXML(java.lang.String sIdent,
java.lang.String sDelim)
Get an XML dump for the DBPersist values |
| 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, 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, 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 Address()
public Address(JDCConnection oConn,
java.lang.String guAddr)
throws java.sql.SQLException
oConn - Database ConnectionguAddr - GUID of address to be loaded
java.sql.SQLException| Method Detail |
|---|
public boolean load(JDCConnection oConn,
java.lang.Object[] PKVals)
throws java.sql.SQLException
Load values set at table k_addresses
This method trims the value of id_country column
load in class DBPersistoConn - Database ConnectionPKVals - An Array with a single String containing the GUID of the Address to be loaded
java.sql.SQLException
public boolean load(JDCConnection oConn,
java.lang.String sGuAddress)
throws java.sql.SQLException
Load values set at table k_addresses
This method trims the value of id_country column
load in class DBPersistoConn - JDCConnectionsGuAddress - String GUID of the Address to be loaded
java.sql.SQLException
public boolean delete(JDCConnection oConn)
throws java.sql.SQLException
Delete Address
Registers at k_welcome_packs, k_x_company_addr and k_x_contact_addr are deleted on cascade
delete in class DBPersistoConn - Database Connection
java.sql.SQLException
public boolean store(JDCConnection oConn)
throws java.sql.SQLException
Store Address
If gu_address is null a new GUID is automatically assigned.
store in class DBPersistoConn - Database Connection
java.sql.SQLException
public java.lang.String toXML(java.lang.String sIdent,
java.lang.String sDelim)
throws java.lang.IllegalStateException
Get an XML dump for the DBPersist values
toXML in class DBPersistsIdent - Number of blank spaces for left padding at every line.sDelim - Line delimiter (usually "\n" or "\r\n")
java.lang.IllegalStateExceptionpublic java.lang.String toXML(java.lang.String sIdent)
Get an XML dump for the DBPersist values.
Lines are delimited by a single Line Feed CHR(10) '\n' character.
toXML in class DBPersistsIdent - Number of blank spaces for left padding at every line.
public java.lang.String toXML()
Get an XML dump for the DBPersist values.
No left padding is placed to the left of each line.
Lines are delimited by a single Line Feed CHR(10) '\n' character.
toXML in class DBPersist
public static int nextLocalIndex(java.sql.Connection oConn,
java.lang.String sLinkTable,
java.lang.String sLinkField,
java.lang.String sLinkValue)
throws java.sql.SQLException
Get next free address index for a given object.
Address indexes are integers assigned on a per object basis.
oConn - Database ConnectionsLinkTable - Table used for linking addresses to instances of objects
of a given class (for example "k_x_company_addr" or "k_x_contact_addr").sLinkField - Foreign object column name at link table (for example "gu_company" or "gu_contact")sLinkValue - Value for foreign object GUID
java.sql.SQLException
public static java.lang.String getIdFromEmail(JDCConnection oConn,
java.lang.String sEMail,
java.lang.String sWorkArea)
throws java.sql.SQLException
Get Address Unique Id. from its e-mail.
oConn - Database ConnectionsEMail - Address e-mail (tx_email from k_addresses table)sWorkArea - WorkArea filter. If null all WorkAreas are seached
java.sql.SQLException
public static boolean addLookupState(java.sql.Connection oConn,
java.lang.String sGuWorkArea,
java.lang.String sIdCountry,
java.lang.String sNmState,
java.util.HashMap oTranslations)
throws java.sql.SQLException
Add a State for a given country at k_addresses_lookup table
This methods checks whether the given State Name exists at k_addresses_lookup for a given country and, if not, then inserts it.
oConn - ConnectionsGuWorkArea - String GUID of WorkAreasIdCountry - String Two letters country identifier from k_lu_countries tablesNmState - String Language Neutral State Name or CodeoTranslations - HashMap with one entry for each language
Language codes must be those from id_language column of k_lu_languages table.
java.sql.SQLException
public static boolean addLookupStreetType(java.sql.Connection oConn,
java.lang.String sGuWorkArea,
java.lang.String sTpStreet,
java.util.HashMap oTranslations)
throws java.sql.SQLException
Add a Street Type lookup value
oConn - ConnectionsGuWorkArea - String GUID of WorkAreasTpStreet - String Street Type Internal ValueoTranslations - HashMap with one entry for each language
java.sql.SQLException
public static DBSubset getAddressesByCompanyName(JDCConnection oConn,
java.lang.String sCompanyNm,
java.lang.String sWorkArea)
throws java.sql.SQLException
Get addresses given their company name
This method difers from Company.getAddresses() in that getAddresses() takes the Company GUID and makes a query into k_x_company_addr table. getAddressesForCompany() instead tests the value of nm_company column at k_addresses table.
oConn - ConnectionsCompanyNm - String Exact Company Name (case sensitive)sWorkArea - String GUID of WorkArea where to search
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||