Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.marketing
Class CampaignTarget

    java.lang.Object
      com.knowgate.dataobjs.DBPersist
          com.knowgate.marketing.CampaignTarget

All Implemented Interfaces:
  java.io.Serializable, java.util.Map

    public class CampaignTarget

extends DBPersist

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
`CampaignTarget()`

Method Summary
`static int` | `increaseTargetAchievement(JDCConnection oConn, java.lang.String sGuWorkArea, java.lang.String sGuZone, java.lang.String sGuProduct, float fQuantity)` Increase achieved sales of a given product for all active campaigns
`float` | `refreshTargetAchievement(JDCConnection oConn)` Lookup non cancelled orders at k_orders table and refresh achieved sales for this campaign target
`boolean` | `store(JDCConnection oConn)` Store a register at database representing this instance of DBPersist Insertions and updates : The store method automatically manages register insertions and updates.

Methods inherited from class com.knowgate.dataobjs.DBPersist
`allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, delete, 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, getStringHtml, 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, replace, setAuditTransact, setAuditUser, setCreationDate, 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

### ClassId

    public static final short ClassId

See Also:
  Constant Field Values

Constructor Detail

### CampaignTarget

    public CampaignTarget()

Method Detail

### store

    public boolean store(JDCConnection oConn)
                  throws java.sql.SQLException

  Description copied from class: `DBPersist`

  Store a register at database representing this instance of DBPersist

  Insertions and updates : The store method automatically manages register insertions and updates. If the stored object already exists at database then it is updated, if it does not exists then it is inserted. A primary key violation error is never thrown so ther is no need to call delete() method before re-writing an existing object.

  NULL fields : All values not set calling put() methods for DBPersist will be assumed to be NULL. If a not nullable field is not set then an SQLException will be raised.
  On storing an already existing object all values will we overwrited, so is a DBPersist is not fully loaded before storing it, values not set by calling put() methods that already were present at database will be lost.

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

### refreshTargetAchievement

    public float refreshTargetAchievement(JDCConnection oConn)
                                   throws java.sql.SQLException

  Lookup non cancelled orders at k_orders table and refresh achieved sales for this campaign target

  Parameters:
    `oConn` - JDCConnection
  Returns:
    float Total number of products actually sold for this campaign target
  Throws:
    `java.sql.SQLException`

### increaseTargetAchievement

    public static int increaseTargetAchievement(JDCConnection oConn,
                                                java.lang.String sGuWorkArea,
                                                java.lang.String sGuZone,
                                                java.lang.String sGuProduct,
                                                float fQuantity)
                                         throws java.sql.SQLException

  Increase achieved sales of a given product for all active campaigns

  Parameters:
    `oConn` - JDCConnection
    `sGuWorkArea` - String WorkArea GUID
    `sGuZone` - String GUID of thesauri Term representing the Geographic Zone
    `sGuProduct` - String product GUID
    `fQuantity` - float Count of new products sold (if negative sales are decreased)
  Returns:
    int Number of campaign targets updated
  Throws:
    `java.sql.SQLException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD