com.knowgate.hipergate
Class Warehouse

java.lang.Object
  extended by com.knowgate.dataobjs.DBPersist
      extended by com.knowgate.hipergate.Address
          extended by com.knowgate.hipergate.Warehouse
All Implemented Interfaces:
java.io.Serializable, java.util.Map

public class Warehouse
extends Address

See Also:
Serialized Form

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
Warehouse()
           
Warehouse(JDCConnection oConn, java.lang.String sGuid)
           
 
Method Summary
 boolean delete(JDCConnection oConn)
          Delete Address Registers at k_welcome_packs, k_x_company_addr, k_x_contact_addr, k_meetings, k_sms_audit, k_activities, k_x_activity_audience are deleted on cascade
 java.util.HashMap getItemMap()
           
 boolean load(JDCConnection oConn, java.lang.Object[] aPk)
          Load values set at table k_addresses This method trims the value of id_country column and loads the translated value for street type
 boolean load(JDCConnection oConn, java.lang.String sPk)
          Load values set at table k_addresses This method trims the value of id_country column
 boolean store(JDCConnection oConn)
          Store Address If gu_address is null a new GUID is automatically assigned.
 
Methods inherited from class com.knowgate.hipergate.Address
addLookupState, addLookupStreetType, getAddressesByCompanyName, getIdFromEmail, nextLocalIndex, toLocaleString, toLocaleString, toXML, toXML, toXML
 
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, 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, 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

ClassId

public static final short ClassId
See Also:
Constant Field Values
Constructor Detail

Warehouse

public Warehouse()

Warehouse

public Warehouse(JDCConnection oConn,
                 java.lang.String sGuid)
          throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

getItemMap

public java.util.HashMap getItemMap()
Overrides:
getItemMap in class DBPersist
Returns:
Values Map

load

public boolean load(JDCConnection oConn,
                    java.lang.Object[] aPk)
             throws java.sql.SQLException
Description copied from class: Address

Load values set at table k_addresses

This method trims the value of id_country column and loads the translated value for street type

Overrides:
load in class Address
Parameters:
oConn - Database Connection
aPk - An Array with a single String containing the GUID of the Address to be loaded
Returns:
true if Address was found, false otherwise.
Throws:
java.sql.SQLException

load

public boolean load(JDCConnection oConn,
                    java.lang.String sPk)
             throws java.sql.SQLException
Description copied from class: Address

Load values set at table k_addresses

This method trims the value of id_country column

Overrides:
load in class Address
Parameters:
oConn - JDCConnection
sPk - String GUID of the Address to be loaded
Returns:
true if Address was found, false otherwise.
Throws:
java.sql.SQLException

store

public boolean store(JDCConnection oConn)
              throws java.sql.SQLException
Description copied from class: Address

Store Address

If gu_address is null a new GUID is automatically assigned.
dt_modified field is set to current date.
For generating a new address index call nextLocalIndex() and set property ix_address.
For example:
this.put (DB.ix_address, Address.nextLocalIndex(Connection, "k_x_company_addr", "gu_company"))

Overrides:
store in class Address
Parameters:
oConn - Database Connection
Returns:
boolean true if Address was stored for the first time, false if register already existed.
Throws:
java.sql.SQLException

delete

public boolean delete(JDCConnection oConn)
               throws java.sql.SQLException
Description copied from class: Address

Delete Address

Registers at k_welcome_packs, k_x_company_addr, k_x_contact_addr, k_meetings, k_sms_audit, k_activities, k_x_activity_audience are deleted on cascade

Overrides:
delete in class Address
Parameters:
oConn - Database Connection
Returns:
true if Address existed at k_addresses table.
Throws:
java.sql.SQLException