public class ProductItem extends ProductItem
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PRICE_TYPE_BEST
best price
|
static java.lang.String |
PRICE_TYPE_NORMAL
normal price
|
static java.lang.String |
PRICE_TYPE_QUOTE
quote price
|
DBCLASS_GID, DBCLASS_NAME
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Constructor and Description |
---|
ProductItem(DBClass def,
DataSource dataSource)
Std.
|
Modifier and Type | Method and Description |
---|---|
double |
calculatePrice(double price,
java.lang.String reportType)
Performs additional validations on this record.
|
protected void |
eventFieldUpdated(DBField field,
java.lang.Object previous,
GlobalKey previousKey,
FldParams params)
update dependent fields.
|
protected void |
extAutoEnterCreate()
Additional functionality when an object is created.
|
protected void |
extDelete()
touch the assoicated event so that we can update the concrete fields.
|
protected GlobalKey |
extGetDerivedGlobalKey(DBField field,
FldParams params)
Calculate the derived global key for this field.
|
protected java.lang.Object |
extGetDerivedValue(DBField field,
FldParams params)
Calculate the derived value for this field.
|
protected boolean |
extIsMandatory(DBField field)
Conditional mandatory field.
|
protected void |
extPreSaveRecord()
OVERRIDE this method to add functionality to stSoftware BEFORE saving the record to the database.
|
protected void |
extSetValue(DBField field,
java.lang.Object currentValue,
FldParams params)
OVERRIDE This method to filter ALL public calls to SetValue.
|
protected void |
extUpdateUnitPrice()
Handles the generation of the unit price based on the attributes selected
The unit price is retreived from the p
rice matrix that matches the selection
In cases where their is no price matrix then the price is set to zero
which means that it must be manually overridden
|
protected void |
extValidateRecord(ValidationList list)
Performs additional validations on this record.
|
BuildingSize |
findBuildingSize(java.lang.String... args)
Building size.
|
BuildingSize |
findCalcBuildSize(java.lang.String... args)
Calculated building size.
|
PriceType |
findPriceType(java.lang.String... args)
Price Type.
|
java.lang.Object |
findPriority(java.lang.String... args)
Priority.
|
protected static java.lang.Double |
findSpecialPrice(DataSource ds,
DBObject customer,
Product prod,
java.lang.String reportType,
java.lang.String calcSize) |
BuildingSize |
getBuildingSize(java.lang.String... args) |
BuildingSize |
getCalcBuildSize(java.lang.String... args) |
PriceType |
getPriceType(java.lang.String... args) |
java.lang.Object |
getPriority(java.lang.String... args) |
java.lang.String |
getProvider(java.lang.String... args) |
boolean |
hasPurchase(java.lang.String... args) |
boolean |
isBuildPestReport(java.lang.String... args) |
boolean |
isFromBuildingPestReport(java.lang.String... args) |
ProductItem |
setBuildingSize(com.dns.dal.BuildingSize value,
java.lang.String... args) |
ProductItem |
setBuildPestReport(boolean value,
java.lang.String... args) |
ProductItem |
setFromBuildingPestReport(boolean value,
java.lang.String... args) |
ProductItem |
setPriceType(com.dns.dal.PriceType value,
java.lang.String... args) |
ProductItem |
setPriority(java.lang.Object value,
java.lang.String... args) |
extCheckModifyAccess, extFixUp, extIsOnChange, findInventoryAdjustmentType, findInvoiceItem, findNextDeliverySchedule, findPicture, findProductID, findStockBinItem, getAdjNumDeliveries, getCalcNumDeliveries, getDeliveriesMade, getDeliveriesRemaining, getInventoryAdjustmentType, getInventoryAmountAdjusted, getInventoryQtyAdjusted, getInventoryQtyCommitted, getInvoice, getInvoiceItem, getLastDelivered, getNextDeliverySchedule, getNumDeliveries, getPicture, getProductID, getQtyOutstanding, getStockBinItem, getTotalQtyDelivered, getType, isInvoiceLocked, setAdjNumDeliveries, setInvoiceItem, setNumDeliveries, setPicture, setProductID, setStockBinItem, setType, updateUnitPrice
extCheckCreateAccess, extCheckModifyAccess, extCheckReadAccess, extPreValidate, extValidateField, findChargableTaskID, findGroupItem, getAdjTotalCostExcludingTax, getCalcTotalCostExcludingTax, getChargableTaskID, getChargeTask, getGroupItem, getTotalCostExcludingTax, getUnitCostExcludingTax, isOrderFromSupplier, setAdjTotalCostExcludingTax, setChargableTaskID, setGroupItem, setOrderFromSupplier, setUnitCostExcludingTax
copyIncludeField, extCopy, findAccount, findAdjPriceCheckedBy, findAdjPriceReason, findCalcPriceMatrix, findChargeItemStatus, findChargeItemType, findEnteredBy, findExportFg, findKey, findOwnerBusUnit, findRecurringBase, findTaxCodeId, getAccount, getAdjPriceCheckedBy, getAdjPriceCheckedNotes, getAdjPriceReason, getAdjPriceReasonNotes, getAdjTotalPrice, getAdjTotalPriceIncludingTax, getAdjUnitPrice, getAdjUnitPriceExcludingTax, getAdjUnitPriceIncludingTax, getBackOrdered, getCalcPriceMatrix, getCalcUnitPriceExcludingTax, getChargeItemStatus, getChargeItemType, getCode, getDescription, getDiscountRate, getEnteredBy, getEnteredTime, getExportedTime, getExportFg, getID, getItemCode, getMyobImportTime, getNotes, getOrdered, getOwnerBusUnit, getQty, getRecurringBase, getRoyalties, getTaxCodeId, getTaxRate, getTotalDiscount, getTotalPriceExcludingTax, getTotalPriceIncludingTax, getTotalRoyalties, getTotalTax, getUnitMeasure, getUnitPrice, getUnitPriceDisplay, getUnitPriceDisplayExcludingTax, getUnitPriceDisplayIncludingTax, getUnitPriceExcludingTax, getUnitPriceIncludingTax, hasReadAccess, isAdjPriceChecked, isAdjPriceReasonRequired, isAdjTotalPriceIncludesTax, isAdjUnitPriceIncludesTax, isAdjustItem, isMonthlyRecurring, isNeedToBeCloned, isUnitPriceIncludesTax, makeQuery, setAccount, setAdjPriceChecked, setAdjPriceCheckedBy, setAdjPriceCheckedNotes, setAdjPriceReason, setAdjPriceReasonNotes, setAdjPriceReasonRequired, setAdjTotalPrice, setAdjTotalPriceIncludesTax, setAdjTotalPriceIncludingTax, setAdjUnitPrice, setAdjUnitPriceIncludesTax, setAdjustItem, setBackOrdered, setChargeItemStatus, setCode, setDescription, setDiscountRate, setEnteredBy, setEnteredTime, setExportedTime, setExportFg, setID, setItemCode, setMonthlyRecurring, setMyobImportTime, setNotes, setOrdered, setOwnerBusUnit, setQty, setRecurringBase, setTaxCodeId, setTaxRate, setUnitMeasure, setUnitPrice, setUnitPriceExcludingTax, setUnitPriceIncludesTax, setUnitPriceIncludingTax
addReloadEventListener, archiveCheck, autoEnterCreate, calculateValue, calculateValue, calculateValue, callingRestoreByJournal, changeThreadMode, checkCreateAccess, checkDelete, checkDeleteAccess, checkModifyAccess, checkModifyAccess, checkReadAccess, clearCache, copy, copyFields, copyInwardLinks, delete, denormalizedResult, displayLogName, displayName, displayValue, doSearch, dump, equals, eventDataLoaded, extCanDeleteDependantObject, extCheckDeleteAccess, extDeleteRecord, extGetValue, extMarkSavePoint, extPostDeleteRecord, extPostSaveRecord, extPreDeleteRecord, extPreValidateDelete, extRaiseEvents, extRollbackTo, extSaveRecord, extUndelete, extValidateDelete, fetchLinkHolder, findGlobalKey, findGlobalKey, findGlobalKey, findGlobalKey, findLinkedObject, findLinkedObject, findLinkedObject, findRawData, fireEventDataLoaded, fixUp, forceLockedTransaction, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getChangedFieldInfo, getChangedFields, getDate, getDate, getDate, getDate, getDate, getDefaultValue, getDisableOnChangeEvent, getDouble, getDouble, getDouble, getDouble, getDouble, getFieldDouble, getFieldInt, getFieldLong, getFieldString, getFormattedString, getFormattedString, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getInt, getInt, getInt, getInt, getInt, getInt, getInwardLinkage, getKeyString, getKeyValue, getLinkedObject, getLinkedObject, getLinkedObject, getLinkedObjectByKey, getLinkedRowId, getLinkedRowId, getLinkedRowIdByData, getLinkHolder, getLockedTransaction, getLong, getLong, getLong, getLong, getLong, getLong, getMutableArrayValue, getMutableArrayValue, getOriginalKey, getOriginalValue, getOriginalValue, getProcessedValue, getPureValue, getRawData, getRawValue, getRawValue, getRowId, getRowKey, getSecondaryCacheGroupKey, getSrcLayerID, getString, getString, getString, getString, getString, getString, getValue, getValue, getValue, getValue, hasAutoChanged, hasAutoChanged, hasChanged, hasChangedByUser, hasChangedByUserField, hasChangedByUserField, hasFieldChanged, hasFieldChanged, hashCode, hasStoredResult, iCheckDeleteAccess, iCheckModifyAccess, iCheckReadAccess, iGetDenormalizedMap, iGetRawValue, iPlaceDenormalizedResult, iPostSaveOrDeleteRecord, iPreSaveOrDeleteRecord, iPreValidate, iRaiseEvents, iSaveOrDeleteRecord, isBrokenLink, isBrokenLink, isChanged, isDataCacheKnownToBeDirty, isDeleted, isEmpty, iSetValue, isForceReindex, isKeyWordField, isMandatory, isNew, isNull, isNull, isOnChange, isReindex, iValidateRecord, lastTouched, makeArchiveDataLoader, makeClone, makeDataLoader, makeDenormalizedDoc, makeLinkedArray, makeModifyAccessException, makeSearchPlan, makeWriteProvider, manualDenormalizeOnSave, markSavePoint, optLockedTransaction, registerWatchedObject, reindex, releaseDenormalized, removeReloadEventListener, restoreByJournal, rollbackTo, setBoolean, setBoolean, setBoolean, setBoolean, setDisableOnChangeEvent, setDouble, setDouble, setInt, setInt, setLong, setLong, setRawData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, touch, undelete, validateField, validateRecord, validateSubType
public static final java.lang.String PRICE_TYPE_NORMAL
public static final java.lang.String PRICE_TYPE_QUOTE
public static final java.lang.String PRICE_TYPE_BEST
public ProductItem(DBClass def, DataSource dataSource) throws java.lang.Exception
def
- The class of this objectdataSource
- The datasource for this objectjava.lang.Exception
- A serious problem occurred@CheckReturnValue @Nullable public BuildingSize getBuildingSize(java.lang.String... args)
@CheckReturnValue @Nonnull public final BuildingSize findBuildingSize(java.lang.String... args) throws NotFoundException
BuildingSize
(String, Searchable)args
- the optional argumentsNotFoundException
- BuildingSize was not found@Nonnull public ProductItem setBuildingSize(com.dns.dal.BuildingSize value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public BuildingSize getCalcBuildSize(java.lang.String... args)
@CheckReturnValue @Nonnull public final BuildingSize findCalcBuildSize(java.lang.String... args) throws NotFoundException
BuildingSize
(String, Derived,
Searchable)args
- the optional argumentsNotFoundException
- BuildingSize was not found@CheckReturnValue public boolean isFromBuildingPestReport(java.lang.String... args)
@Nonnull public ProductItem setFromBuildingPestReport(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean hasPurchase(java.lang.String... args)
@CheckReturnValue public boolean isBuildPestReport(java.lang.String... args)
@Nonnull public ProductItem setBuildPestReport(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public PriceType getPriceType(java.lang.String... args)
@CheckReturnValue @Nonnull public final PriceType findPriceType(java.lang.String... args) throws NotFoundException
PriceType
(String, Searchable)args
- the optional argumentsNotFoundException
- PriceType was not found@Nonnull public ProductItem setPriceType(com.dns.dal.PriceType value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.lang.Object getPriority(java.lang.String... args)
@CheckReturnValue @Nonnull public final java.lang.Object findPriority(java.lang.String... args) throws NotFoundException
Priority
(String, Searchable)args
- the optional argumentsNotFoundException
- Priority was not found@Nonnull public ProductItem setPriority(java.lang.Object value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getProvider(java.lang.String... args)
@OverridingMethodsMustInvokeSuper protected void extAutoEnterCreate() throws java.lang.Exception
extAutoEnterCreate
in class ChargeItem
java.lang.Exception
- A serious problemcom.aspc.DBObj.DBObject#autoEnterCreate()
@OverridingMethodsMustInvokeSuper protected void extValidateRecord(@Nonnull ValidationList list) throws java.lang.Exception
extValidateRecord
in class ProductItem
list
- The validation list.java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void eventFieldUpdated(@Nonnull DBField field, @Nullable java.lang.Object previous, @Nullable GlobalKey previousKey, @Nullable FldParams params) throws java.lang.Exception
eventFieldUpdated
in class ProductItem
field
- The field updated.previous
- The previous value for this field.previousKey
- The previous keyparams
- The parameters usedjava.lang.Exception
- a serious problemprotected void extUpdateUnitPrice() throws java.lang.Exception
extUpdateUnitPrice
in class ProductItem
java.lang.Exception
- a serious problemprotected void extSetValue(@Nonnull DBField field, @Nullable java.lang.Object currentValue, @Nullable FldParams params) throws java.lang.Exception
DBObject
extSetValue
in class DBObject
field
- The fieldcurrentValue
- params
- the field parametersjava.lang.Exception
- Exception A serious problem@CheckReturnValue protected boolean extIsMandatory(@Nonnull DBField field)
extIsMandatory
in class ProductItem
field
- The field to getDBObject.extIsMandatory( DBField)
@CheckReturnValue @Nullable protected java.lang.Object extGetDerivedValue(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
extGetDerivedValue
in class ProductItem
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extPreSaveRecord() throws java.lang.Exception
DBObject
extPreSaveRecord
in class DBObject
java.lang.Exception
- Exception A serious problem@Nullable @CheckReturnValue protected GlobalKey extGetDerivedGlobalKey(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
extGetDerivedGlobalKey
in class DBObject
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- A serious problempublic double calculatePrice(double price, java.lang.String reportType)
list
- The validation list.java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extDelete() throws java.lang.Exception
protected static java.lang.Double findSpecialPrice(DataSource ds, DBObject customer, Product prod, java.lang.String reportType, java.lang.String calcSize) throws java.lang.Exception
java.lang.Exception
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.