Package org.compiere.model
Class MPackage
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_M_Package
org.compiere.model.MPackage
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_M_Package
,I_Persistent
,Evaluatee
Shipment Package Model
- Version:
- $Id: MPackage.java,v 1.3 2006/07/30 00:51:04 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
Field Summary
Fields inherited from class org.compiere.model.X_M_Package
DELIVERYCONFIRMATIONTYPE_AD_Reference_ID, DELIVERYCONFIRMATIONTYPE_Adult, DELIVERYCONFIRMATIONTYPE_Direct, DELIVERYCONFIRMATIONTYPE_Indirect, DELIVERYCONFIRMATIONTYPE_ServiceDefault, DOTHAZARDCLASSORDIVISION_21_FlammableGas, DOTHAZARDCLASSORDIVISION_22_NonflammableGas, DOTHAZARDCLASSORDIVISION_41_FlammableSolids, DOTHAZARDCLASSORDIVISION_42_SpontaneousCombustibles, DOTHAZARDCLASSORDIVISION_43_DangerousWhenWet, DOTHAZARDCLASSORDIVISION_51_Oxidizers, DOTHAZARDCLASSORDIVISION_52_OrganicPeroxides, DOTHAZARDCLASSORDIVISION_61_ToxicSubstances, DOTHAZARDCLASSORDIVISION_62_InfectiousSubstances, DOTHAZARDCLASSORDIVISION_AD_Reference_ID, DOTHAZARDCLASSORDIVISION_Class1_Explosives, DOTHAZARDCLASSORDIVISION_Class2_Gases, DOTHAZARDCLASSORDIVISION_Class3_FlammableLiquids, DOTHAZARDCLASSORDIVISION_Class4, DOTHAZARDCLASSORDIVISION_Class5_OxidizingSubstancesAndOrganicPeroxides, DOTHAZARDCLASSORDIVISION_Class6_ToxicPoisonousAndInfectiousSubstances, DOTHAZARDCLASSORDIVISION_Class7_RadioactiveMaterial, DOTHAZARDCLASSORDIVISION_Class8_Corrosives, DOTHAZARDCLASSORDIVISION_Class9_MiscellaneousDangerousGoods, FOB_AD_Reference_ID, FOB_CFR_CostAndFreight, FOB_CIF_CostInsuranceAndFreightFedEx, FOB_CIP_CarriageAndInsurancePaidToFedEx, FOB_CPT_CarriagePaidTo, FOB_DAF_DeliveredAtFrontier, FOB_DDP_DeliveredDutyPaidFedEx, FOB_DDU_DeliveredDutyUnpaidFedEx, FOB_DEQ_DeliveredExQuay, FOB_DES_DeliveredExShip, FOB_DomesticFOBDestination, FOB_EXW_ExWorksFedEx, FOB_ExWorks, FOB_FAS_FreeAlongsideShip, FOB_FCA_FreeCarrierFedEx, FOB_FOB_FreeOnBoardFedEx, FOB_FOBOrigin, FREIGHTCHARGES_3rdParty, FREIGHTCHARGES_AD_Reference_ID, FREIGHTCHARGES_Collect, FREIGHTCHARGES_Consignee, FREIGHTCHARGES_Prepaid, FREIGHTCHARGES_PrepaidAndBill, HOMEDELIVERYPREMIUMTYPE_AD_Reference_ID, HOMEDELIVERYPREMIUMTYPE_Appointment, HOMEDELIVERYPREMIUMTYPE_DateCertain, HOMEDELIVERYPREMIUMTYPE_Evening, INSURANCE_AD_Reference_ID, INSURANCE_DoNotInsure, INSURANCE_Insure, NOTIFICATIONTYPE_AD_Reference_ID, NOTIFICATIONTYPE_Recipient, NOTIFICATIONTYPE_RecipientSender, NOTIFICATIONTYPE_Sender, PAYMENTRULE_AD_Reference_ID, PAYMENTRULE_Cash, PAYMENTRULE_Check, PAYMENTRULE_CreditCard, PAYMENTRULE_DirectDebit, PAYMENTRULE_DirectDeposit, PAYMENTRULE_MixedPOSPayment, PAYMENTRULE_OnCredit
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
Fields inherited from interface org.compiere.model.I_M_Package
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_BoxCount, COLUMNNAME_C_BP_ShippingAcct_ID, COLUMNNAME_C_BPartner_Location_ID, COLUMNNAME_C_Currency_ID, COLUMNNAME_C_UOM_Length_ID, COLUMNNAME_C_UOM_Weight_ID, COLUMNNAME_CashOnDelivery, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DateReceived, COLUMNNAME_DeliveryConfirmation, COLUMNNAME_DeliveryConfirmationType, COLUMNNAME_Description, COLUMNNAME_DocumentNo, COLUMNNAME_DotHazardClassOrDivision, COLUMNNAME_DryIceWeight, COLUMNNAME_DutiesShipperAccount, COLUMNNAME_EstimatedWeight, COLUMNNAME_FOB, COLUMNNAME_FreightCharges, COLUMNNAME_HandlingCharge, COLUMNNAME_Height, COLUMNNAME_HoldAddress_ID, COLUMNNAME_HomeDeliveryPremiumDate, COLUMNNAME_HomeDeliveryPremiumPhone, COLUMNNAME_HomeDeliveryPremiumType, COLUMNNAME_Insurance, COLUMNNAME_InsuredAmount, COLUMNNAME_IsAccessible, COLUMNNAME_IsActive, COLUMNNAME_IsAddedHandling, COLUMNNAME_IsCargoAircraftOnly, COLUMNNAME_IsDryIce, COLUMNNAME_IsDutiable, COLUMNNAME_IsFutureDayShipment, COLUMNNAME_IsHazMat, COLUMNNAME_IsHoldAtLocation, COLUMNNAME_IsIgnoreZipNotFound, COLUMNNAME_IsIgnoreZipStateNotMatch, COLUMNNAME_IsResidential, COLUMNNAME_IsSaturdayDelivery, COLUMNNAME_IsSaturdayPickup, COLUMNNAME_IsVerbalConfirmation, COLUMNNAME_LabelPrint, COLUMNNAME_LatestPickupTime, COLUMNNAME_Length, COLUMNNAME_M_InOut_ID, COLUMNNAME_M_Package_ID, COLUMNNAME_M_Package_UU, COLUMNNAME_M_Shipper_ID, COLUMNNAME_M_ShipperLabels_ID, COLUMNNAME_M_ShipperPackaging_ID, COLUMNNAME_M_ShipperPickupTypes_ID, COLUMNNAME_M_ShippingProcessor_ID, COLUMNNAME_NotificationMessage, COLUMNNAME_NotificationType, COLUMNNAME_OProcessing, COLUMNNAME_PaymentRule, COLUMNNAME_Price, COLUMNNAME_PriceActual, COLUMNNAME_Processed, COLUMNNAME_RateInquiryMessage, COLUMNNAME_ReceivedInfo, COLUMNNAME_ShipDate, COLUMNNAME_ShipperAccount, COLUMNNAME_ShippingRateInquiry, COLUMNNAME_ShippingRespMessage, COLUMNNAME_Surcharges, COLUMNNAME_TotalPrice, COLUMNNAME_TrackingInfo, COLUMNNAME_TrackingNo, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_VoidIt, COLUMNNAME_Weight, COLUMNNAME_Width, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMPackage
(Properties ctx, int M_Package_ID, String trxName) MPackage
(Properties ctx, String M_Package_UU, String trxName) UUID based ConstructorMPackage
(Properties ctx, ResultSet rs, String trxName) Load ConstructorShipment Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
afterSave
(boolean newRecord, boolean success) Called after Save for Post-Save Operationprotected boolean
Executed before Delete operation.protected boolean
beforeSave
(boolean newRecord) Called before Save for Pre-Save Operationstatic MPackage
Create Package with one MPackageMPS for Shipmentstatic MPackage
createPackage
(MInOut shipment, MShipper shipper, Timestamp shipDate) Create shipment packagecreateShippingTransaction
(String action, boolean isPriviledgedRate, String trxName) Create online shipping transactionboolean
processOnline
(String action, boolean isPriviledgedRate) Execute online processing of shipment packagevoid
setErrorMessage
(String errorMessage) Methods inherited from class org.compiere.model.X_M_Package
get_AccessLevel, getBoxCount, getC_BP_ShippingAcct, getC_BP_ShippingAcct_ID, getC_BPartner_Location, getC_BPartner_Location_ID, getC_Currency, getC_Currency_ID, getC_UOM_Length, getC_UOM_Length_ID, getC_UOM_Weight, getC_UOM_Weight_ID, getDateReceived, getDeliveryConfirmationType, getDescription, getDocumentNo, getDotHazardClassOrDivision, getDryIceWeight, getDutiesShipperAccount, getEstimatedWeight, getFOB, getFreightCharges, getHandlingCharge, getHeight, getHoldAddress, getHoldAddress_ID, getHomeDeliveryPremiumDate, getHomeDeliveryPremiumPhone, getHomeDeliveryPremiumType, getInsurance, getInsuredAmount, getLabelPrint, getLatestPickupTime, getLength, getM_InOut, getM_InOut_ID, getM_Package_ID, getM_Package_UU, getM_Shipper, getM_Shipper_ID, getM_ShipperLabels, getM_ShipperLabels_ID, getM_ShipperPackaging, getM_ShipperPackaging_ID, getM_ShipperPickupTypes, getM_ShipperPickupTypes_ID, getM_ShippingProcessor, getM_ShippingProcessor_ID, getNotificationMessage, getNotificationType, getOProcessing, getPaymentRule, getPrice, getPriceActual, getRateInquiryMessage, getReceivedInfo, getShipDate, getShipperAccount, getShippingRateInquiry, getShippingRespMessage, getSurcharges, getTotalPrice, getTrackingInfo, getTrackingNo, getVoidIt, getWeight, getWidth, initPO, isAccessible, isAddedHandling, isCargoAircraftOnly, isCashOnDelivery, isDeliveryConfirmation, isDryIce, isDutiable, isFutureDayShipment, isHazMat, isHoldAtLocation, isIgnoreZipNotFound, isIgnoreZipStateNotMatch, isProcessed, isResidential, isSaturdayDelivery, isSaturdayPickup, isVerbalConfirmation, setBoxCount, setC_BP_ShippingAcct_ID, setC_BPartner_Location_ID, setC_Currency_ID, setC_UOM_Length_ID, setC_UOM_Weight_ID, setCashOnDelivery, setDateReceived, setDeliveryConfirmation, setDeliveryConfirmationType, setDescription, setDocumentNo, setDotHazardClassOrDivision, setDryIceWeight, setDutiesShipperAccount, setEstimatedWeight, setFOB, setFreightCharges, setHandlingCharge, setHeight, setHoldAddress_ID, setHomeDeliveryPremiumDate, setHomeDeliveryPremiumPhone, setHomeDeliveryPremiumType, setInsurance, setInsuredAmount, setIsAccessible, setIsAddedHandling, setIsCargoAircraftOnly, setIsDryIce, setIsDutiable, setIsFutureDayShipment, setIsHazMat, setIsHoldAtLocation, setIsIgnoreZipNotFound, setIsIgnoreZipStateNotMatch, setIsResidential, setIsSaturdayDelivery, setIsSaturdayPickup, setIsVerbalConfirmation, setLabelPrint, setLatestPickupTime, setLength, setM_InOut_ID, setM_Package_ID, setM_Package_UU, setM_Shipper_ID, setM_ShipperLabels_ID, setM_ShipperPackaging_ID, setM_ShipperPickupTypes_ID, setM_ShippingProcessor_ID, setNotificationMessage, setNotificationType, setOProcessing, setPaymentRule, setPrice, setPriceActual, setProcessed, setRateInquiryMessage, setReceivedInfo, setShipDate, setShipperAccount, setShippingRateInquiry, setShippingRespMessage, setSurcharges, setTotalPrice, setTrackingInfo, setTrackingNo, setVoidIt, setWeight, setWidth, toString
Methods inherited from class org.compiere.model.PO
afterDelete, buildInsertSQL, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, toInsertSQL, unlock, update_Tree, validForeignKeys
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface org.compiere.model.I_M_Package
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
Methods inherited from interface org.compiere.model.I_Persistent
save
-
Constructor Details
-
MPackage
UUID based Constructor- Parameters:
ctx
- ContextM_Package_UU
- UUID keytrxName
- Transaction
-
MPackage
- Parameters:
ctx
- contextM_Package_ID
- idtrxName
- transaction
-
MPackage
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
MPackage
Shipment Constructor- Parameters:
shipment
- shipmentshipper
- shipper
-
-
Method Details
-
create
Create Package with one MPackageMPS for Shipment- Parameters:
shipment
- shipmentshipper
- shippershipDate
- null for today- Returns:
- package
-
createPackage
Create shipment package- Parameters:
shipment
-shipper
-shipDate
-- Returns:
-
beforeSave
protected boolean beforeSave(boolean newRecord) Description copied from class:PO
Called before Save for Pre-Save Operation- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new record- Returns:
- true if record can be saved
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) Description copied from class:PO
Called after Save for Post-Save Operation -
beforeDelete
protected boolean beforeDelete()Description copied from class:PO
Executed before Delete operation.- Overrides:
beforeDelete
in classPO
- Returns:
- true if record can be deleted
-
setErrorMessage
- Parameters:
errorMessage
-
-
getErrorMessage
- Returns:
- error message
-
processOnline
Execute online processing of shipment package- Parameters:
action
- MShippingTransaction.ACTION_*isPriviledgedRate
-- Returns:
- true if success
-
createShippingTransaction
public MShippingTransaction createShippingTransaction(String action, boolean isPriviledgedRate, String trxName) Create online shipping transaction- Parameters:
action
- MShippingTransaction.ACTION_*isPriviledgedRate
-trxName
-- Returns:
- MShippingTransaction
-