Package org.compiere.model
Class PO
java.lang.Object
org.compiere.model.PO
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,Evaluatee
- Direct Known Subclasses:
DocActionTemplate
,GenericPO
,X_A_Asset
,X_A_Asset_Acct
,X_A_Asset_Addition
,X_A_Asset_Change
,X_A_Asset_Class
,X_A_Asset_Delivery
,X_A_Asset_Disposed
,X_A_Asset_Group
,X_A_Asset_Group_Acct
,X_A_Asset_Info_Fin
,X_A_Asset_Info_Ins
,X_A_Asset_Info_Lic
,X_A_Asset_Info_Oth
,X_A_Asset_Info_Tax
,X_A_Asset_Product
,X_A_Asset_Retirement
,X_A_Asset_Reval
,X_A_Asset_Reval_Entry
,X_A_Asset_Reval_Index
,X_A_Asset_Split
,X_A_Asset_Transfer
,X_A_Asset_Type
,X_A_Asset_Use
,X_A_Depreciation
,X_A_Depreciation_Build
,X_A_Depreciation_Convention
,X_A_Depreciation_Entry
,X_A_Depreciation_Exp
,X_A_Depreciation_Forecast
,X_A_Depreciation_Method
,X_A_Depreciation_Table_Detail
,X_A_Depreciation_Table_Header
,X_A_Depreciation_Workfile
,X_A_FundingMode
,X_A_FundingMode_Acct
,X_A_Registration
,X_A_RegistrationAttribute
,X_A_RegistrationProduct
,X_A_RegistrationValue
,X_AD_AccessLog
,X_AD_Alert
,X_AD_AlertProcessor
,X_AD_AlertProcessorLog
,X_AD_AlertRecipient
,X_AD_AlertRule
,X_AD_AllClients_V
,X_AD_AllUsers_V
,X_AD_Archive
,X_AD_Attachment
,X_AD_AttachmentNote
,X_AD_Attribute
,X_AD_Attribute_Value
,X_AD_AuthorizationAccount
,X_AD_AuthorizationCredential
,X_AD_AuthorizationProvider
,X_AD_AuthorizationScopeProv
,X_AD_BroadcastMessage
,X_AD_ChangeLog
,X_AD_Chart
,X_AD_ChartDatasource
,X_AD_Client
,X_AD_ClientInfo
,X_AD_ClientShare
,X_AD_Color
,X_AD_Column
,X_AD_Column_Access
,X_AD_CtxHelp
,X_AD_CtxHelpMsg
,X_AD_CtxHelpSuggestion
,X_AD_Document_Action_Access
,X_AD_Element
,X_AD_EntityType
,X_AD_Error
,X_AD_Field
,X_AD_FieldGroup
,X_AD_FieldSuggestion
,X_AD_Find
,X_AD_Form
,X_AD_Form_Access
,X_AD_HouseKeeping
,X_AD_Image
,X_AD_ImpFormat
,X_AD_ImpFormat_Row
,X_AD_ImportTemplate
,X_AD_ImportTemplateAccess
,X_AD_IndexColumn
,X_AD_InfoColumn
,X_AD_InfoProcess
,X_AD_InfoRelated
,X_AD_InfoWindow
,X_AD_InfoWindow_Access
,X_AD_Issue
,X_AD_Label
,X_AD_LabelAssignment
,X_AD_LabelCategory
,X_AD_LabelCategoryTable
,X_AD_LabelPrinter
,X_AD_LabelPrinterFunction
,X_AD_Language
,X_AD_LdapAccess
,X_AD_LdapProcessor
,X_AD_LdapProcessorLog
,X_AD_Menu
,X_AD_Message
,X_AD_MigrationScript
,X_AD_ModelGeneratorTemplate
,X_AD_ModelValidator
,X_AD_Modification
,X_AD_Note
,X_AD_Org
,X_AD_OrgInfo
,X_AD_OrgType
,X_AD_Package_Exp
,X_AD_Package_Exp_Detail
,X_AD_Package_Imp
,X_AD_Package_Imp_Backup
,X_AD_Package_Imp_Detail
,X_AD_Package_Imp_Inst
,X_AD_Package_Imp_Proc
,X_AD_Package_UUID_Map
,X_AD_Password_History
,X_AD_PasswordRule
,X_AD_PInstance
,X_AD_PInstance_Log
,X_AD_PInstance_Para
,X_AD_PostIt
,X_AD_Preference
,X_AD_PrintColor
,X_AD_PrintFont
,X_AD_PrintForm
,X_AD_PrintFormat
,X_AD_PrintFormatItem
,X_AD_PrintGraph
,X_AD_PrintHeaderFooter
,X_AD_PrintLabel
,X_AD_PrintLabelLine
,X_AD_PrintPaper
,X_AD_PrintTableFormat
,X_AD_Private_Access
,X_AD_Process
,X_AD_Process_Access
,X_AD_Process_DrillRule
,X_AD_Process_DrillRule_Para
,X_AD_Process_Para
,X_AD_RecentItem
,X_AD_Record_Access
,X_AD_Ref_List
,X_AD_Ref_Table
,X_AD_Reference
,X_AD_Registration
,X_AD_RelationType
,X_AD_Replication
,X_AD_Replication_Log
,X_AD_Replication_Run
,X_AD_ReplicationDocument
,X_AD_ReplicationStrategy
,X_AD_ReplicationTable
,X_AD_ReportView
,X_AD_ReportView_Col
,X_AD_ReportView_Column
,X_AD_Role
,X_AD_Role_Included
,X_AD_Role_OrgAccess
,X_AD_Rule
,X_AD_Schedule
,X_AD_Scheduler
,X_AD_Scheduler_Para
,X_AD_SchedulerLog
,X_AD_SchedulerRecipient
,X_AD_SearchDefinition
,X_AD_Sequence
,X_AD_Sequence_Audit
,X_AD_Sequence_No
,X_AD_Session
,X_AD_SMTP
,X_AD_StatusLine
,X_AD_StatusLineUsedIn
,X_AD_StorageProvider
,X_AD_Style
,X_AD_StyleLine
,X_AD_SysConfig
,X_AD_System
,X_AD_Tab
,X_AD_Tab_Customization
,X_AD_Table
,X_AD_Table_Access
,X_AD_Table_ScriptValidator
,X_AD_TableIndex
,X_AD_TablePartition
,X_AD_TableValRule
,X_AD_Task
,X_AD_Task_Access
,X_AD_TaskInstance
,X_AD_ToolBarButton
,X_AD_ToolBarButtonRestrict
,X_AD_Tree
,X_AD_Tree_Favorite
,X_AD_Tree_Favorite_Node
,X_AD_TreeBar
,X_AD_TreeNode
,X_AD_TreeNodeBP
,X_AD_TreeNodeCMC
,X_AD_TreeNodeCMM
,X_AD_TreeNodeCMS
,X_AD_TreeNodeCMT
,X_AD_TreeNodeMM
,X_AD_TreeNodePR
,X_AD_TreeNodeU1
,X_AD_TreeNodeU2
,X_AD_TreeNodeU3
,X_AD_TreeNodeU4
,X_AD_User
,X_AD_User_OrgAccess
,X_AD_User_Roles
,X_AD_User_Substitute
,X_AD_UserBPAccess
,X_AD_UserDef_Field
,X_AD_UserDef_Info
,X_AD_UserDef_Info_Column
,X_AD_UserDef_Info_Related
,X_AD_UserDef_Proc
,X_AD_UserDef_Proc_Parameter
,X_AD_UserDef_Tab
,X_AD_UserDef_Win
,X_AD_UserMail
,X_AD_UserPreference
,X_AD_UserQuery
,X_AD_Val_Rule
,X_AD_VerifyMigration
,X_AD_ViewColumn
,X_AD_ViewComponent
,X_AD_WF_Activity
,X_AD_WF_ActivityApprover
,X_AD_WF_ActivityResult
,X_AD_WF_Block
,X_AD_WF_EventAudit
,X_AD_WF_NextCondition
,X_AD_WF_Node
,X_AD_WF_Node_Para
,X_AD_WF_NodeNext
,X_AD_WF_Process
,X_AD_WF_ProcessData
,X_AD_WF_Responsible
,X_AD_Window
,X_AD_Window_Access
,X_AD_WizardProcess
,X_AD_Wlistbox_Customization
,X_AD_Workflow
,X_AD_Workflow_Access
,X_AD_WorkflowProcessor
,X_AD_WorkflowProcessorLog
,X_AD_ZoomCondition
,X_ASP_ClientException
,X_ASP_ClientLevel
,X_ASP_Field
,X_ASP_Form
,X_ASP_Level
,X_ASP_Module
,X_ASP_Process
,X_ASP_Process_Para
,X_ASP_Ref_List
,X_ASP_Tab
,X_ASP_Task
,X_ASP_Window
,X_ASP_Workflow
,X_B_Bid
,X_B_BidComment
,X_B_Buyer
,X_B_BuyerFunds
,X_B_Offer
,X_B_Seller
,X_B_SellerFunds
,X_B_Topic
,X_B_TopicCategory
,X_B_TopicType
,X_C_1099Box
,X_C_AcctProcessor
,X_C_AcctProcessorLog
,X_C_AcctSchema
,X_C_AcctSchema_Default
,X_C_AcctSchema_Element
,X_C_AcctSchema_GL
,X_C_Activity
,X_C_AddressTransaction
,X_C_AddressValidation
,X_C_AddressValidationCfg
,X_C_AllocationHdr
,X_C_AllocationLine
,X_C_Bank
,X_C_BankAccount
,X_C_BankAccount_Acct
,X_C_BankAccount_Processor
,X_C_BankAccountDoc
,X_C_BankStatement
,X_C_BankStatementLine
,X_C_BankStatementLoader
,X_C_BankStatementMatcher
,X_C_BankTransfer
,X_C_BP_BankAccount
,X_C_BP_Customer_Acct
,X_C_BP_EDI
,X_C_BP_Employee_Acct
,X_C_BP_Group
,X_C_BP_Group_Acct
,X_C_BP_Relation
,X_C_BP_ShippingAcct
,X_C_BP_Vendor_Acct
,X_C_BP_Withholding
,X_C_BPartner
,X_C_BPartner_Location
,X_C_BPartner_Product
,X_C_Calendar
,X_C_Campaign
,X_C_Cash
,X_C_CashBook
,X_C_CashBook_Acct
,X_C_CashLine
,X_C_CashPlan
,X_C_CashPlanLine
,X_C_Channel
,X_C_Charge
,X_C_Charge_Acct
,X_C_ChargeType
,X_C_ChargeType_DocType
,X_C_City
,X_C_Commission
,X_C_CommissionAmt
,X_C_CommissionDetail
,X_C_CommissionLine
,X_C_CommissionRun
,X_C_ContactActivity
,X_C_Conversion_Rate
,X_C_ConversionType
,X_C_Country
,X_C_CountryGroup
,X_C_CountryGroupCountry
,X_C_Currency
,X_C_Currency_Acct
,X_C_Cycle
,X_C_CyclePhase
,X_C_CycleStep
,X_C_DepositBatch
,X_C_DepositBatchLine
,X_C_DocBaseGroup
,X_C_DocBaseGroupLine
,X_C_DocType
,X_C_DocTypeCounter
,X_C_Dunning
,X_C_DunningLevel
,X_C_DunningRun
,X_C_DunningRunEntry
,X_C_DunningRunLine
,X_C_Element
,X_C_ElementValue
,X_C_Greeting
,X_C_InterOrg_Acct
,X_C_Invoice
,X_C_InvoiceBatch
,X_C_InvoiceBatchLine
,X_C_InvoiceLine
,X_C_InvoicePaySchedule
,X_C_InvoiceSchedule
,X_C_InvoiceTax
,X_C_Job
,X_C_JobAssignment
,X_C_JobCategory
,X_C_JobRemuneration
,X_C_LandedCost
,X_C_LandedCostAllocation
,X_C_Location
,X_C_NonBusinessDay
,X_C_OnlineTrxHistory
,X_C_Opportunity
,X_C_Order
,X_C_OrderLandedCost
,X_C_OrderLandedCostAllocation
,X_C_OrderLine
,X_C_OrderPaySchedule
,X_C_OrderSource
,X_C_OrderTax
,X_C_OrgAssignment
,X_C_Payment
,X_C_PaymentAllocate
,X_C_PaymentBatch
,X_C_PaymentProcessor
,X_C_PaymentTerm
,X_C_PaymentTransaction
,X_C_PaySchedule
,X_C_PaySelection
,X_C_PaySelectionCheck
,X_C_PaySelectionLine
,X_C_Period
,X_C_PeriodControl
,X_C_Phase
,X_C_POS
,X_C_POSKey
,X_C_POSKeyLayout
,X_C_POSPayment
,X_C_POSTenderType
,X_C_Project
,X_C_Project_Acct
,X_C_ProjectIssue
,X_C_ProjectIssueMA
,X_C_ProjectLine
,X_C_ProjectPhase
,X_C_ProjectTask
,X_C_ProjectType
,X_C_Recurring
,X_C_Recurring_Run
,X_C_RecurringGroup
,X_C_Region
,X_C_Remuneration
,X_C_RevenueRecog_Service
,X_C_RevenueRecognition
,X_C_RevenueRecognition_Plan
,X_C_RevenueRecognition_Run
,X_C_RfQ
,X_C_RfQ_Topic
,X_C_RfQ_TopicSubscriber
,X_C_RfQ_TopicSubscriberOnly
,X_C_RfQLine
,X_C_RfQLineQty
,X_C_RfQResponse
,X_C_RfQResponseLine
,X_C_RfQResponseLineQty
,X_C_SalesRegion
,X_C_SalesStage
,X_C_ServiceLevel
,X_C_ServiceLevelLine
,X_C_SubAcct
,X_C_Subscription
,X_C_Subscription_Delivery
,X_C_SubscriptionType
,X_C_Task
,X_C_Tax
,X_C_Tax_Acct
,X_C_TaxBase
,X_C_TaxCategory
,X_C_TaxDeclaration
,X_C_TaxDeclarationAcct
,X_C_TaxDeclarationLine
,X_C_TaxDefinition
,X_C_TaxGroup
,X_C_TaxPostal
,X_C_TaxProvider
,X_C_TaxProviderCfg
,X_C_TaxType
,X_C_UOM
,X_C_UOM_Conversion
,X_C_UserRemuneration
,X_C_ValidCombination
,X_C_Withholding
,X_C_Withholding_Acct
,X_C_Year
,X_CM_Chat
,X_CM_ChatEntry
,X_CM_ChatType
,X_CM_ChatTypeUpdate
,X_CM_ChatUpdate
,X_COF_Activity
,X_COF_Activity_Action
,X_COF_Activity_Status
,X_COF_Activity_Type
,X_COF_AjusteEstoquePrevisto
,X_COF_AjusteEstoquePrvstLine
,X_COF_AjusteQtDContabil
,X_COF_ArmazenamentoNuvem
,X_COF_AutorizadosXML
,X_COF_C_Acct_IgnoreElement
,X_COF_C_Adjustment
,X_COF_C_Adjustment_Code
,X_COF_C_AdjustTable
,X_COF_C_Alinea
,X_COF_C_BankIntegration
,X_COF_C_BankOccurrence
,X_COF_C_CardNetwork
,X_COF_C_CheckAllocate
,X_COF_C_CheckCustody
,X_COF_C_CNABConfig
,X_COF_C_CNABConfig_Line
,X_COF_C_CollectionGuide
,X_COF_C_ComexInfo
,X_COF_C_ControlCheck
,X_COF_C_Custody
,X_COF_C_Determination_Group
,X_COF_C_DI
,X_COF_C_DIAdi
,X_COF_C_DocType_Return
,X_COF_C_Dossier
,X_COF_C_GeneroItem_SPED
,X_COF_C_IBPTax
,X_COF_C_LeadExpirationReason
,X_COF_C_MarketSegment
,X_COF_C_Markup
,X_COF_C_PlanoFinanceiro
,X_COF_C_PrevisaoEntregaFutura
,X_COF_C_PriceChange
,X_COF_C_SNRange
,X_COF_C_TaxClassification
,X_COF_C_TaxClassificationLine
,X_COF_C_TaxDetermination_Fact
,X_COF_C_TaxDetermination_Hdr
,X_COF_C_TaxDetermination_Line
,X_COF_C_Titulo_Audit
,X_COF_Cbenef_Config
,X_COF_CEnq
,X_COF_CEST
,X_COF_ChamadaPBX
,X_COF_ClasseParceiro
,X_COF_Cobranca_PIX
,X_COF_Combustivel
,X_COF_ConciliacaoCartao
,X_COF_ConfAttachment
,X_COF_ConfigExportContab
,X_COF_ConfigExportContabContas
,X_COF_ConfigExportContabCustos
,X_COF_ConfigExportContabExcecoes
,X_COF_ConfigExportContabFormato
,X_COF_ConfigOVS
,X_COF_ConfigRateio
,X_COF_ConfigRateioLinha
,X_COF_ConfiguracaoEstoqueFiscal
,X_COF_ConfiguracaoMeta
,X_COF_ConfrontoOFX
,X_COF_Contract
,X_COF_ContractCategory
,X_cof_ContractGroup
,X_COF_ContractParticipantes
,X_COF_ControleAbastecimento
,X_COF_ControleMulta
,X_COF_ControleRemessasInd
,X_COF_CreditAnalysis
,X_COF_CreditReferences
,X_COF_CSC
,X_COF_DeliveryOccurrence
,X_COF_DeliveryRestriction
,X_COF_DFe
,X_COF_DocFiscal_Inut
,X_COF_Driver
,X_COF_ElementValueReference
,X_COF_EquipLeitura
,X_COF_Equipments
,X_COF_EstoquePrevisto
,X_COF_FCI
,X_COF_FCI_Prod
,X_COF_FCILine
,X_COF_FormacaoPreco
,X_COF_FormacaoPrecoLista
,X_COF_GrupoFornecedor
,X_COF_GrupoSeparacao
,X_COF_Guarantors
,X_COF_HistoricoConsultas
,X_COF_ItemSubstituto
,X_COF_Label
,X_COF_LabelConfig
,X_COF_LabelEntry
,X_COF_LabelField
,X_COF_LabelWindow
,X_COF_LocalSeparation
,X_COF_M_ShipRegion
,X_COF_M_ShipRegion_CIty
,X_COF_MaterialAplicado
,X_COF_Member
,X_COF_MetaDeVendas
,X_COF_MetaRepresentante
,X_COF_ModBC
,X_COF_MotDeson
,X_COF_MotivoParalisacao
,X_COF_MPRecebida
,X_COF_NBS
,X_COF_NFSeCancelamento
,X_cof_nve
,X_cof_nve_product
,X_COF_OcorrenciaEmbDes
,X_COF_OperadorasCartao
,X_COF_Orcamento
,X_COF_OrcamentoConfig
,X_COF_OrcamentoGrupo
,X_COF_OrcamentoItem
,X_COF_OrcamentoOrgs
,X_COF_OrcamentoPeriodo
,X_COF_OrdemServico
,X_COF_OrgST
,X_COF_OSApontamentos
,X_COF_OSProduto
,X_COF_OSServico
,X_COF_PackingList
,X_COF_PackingList_Line
,X_COF_ParamFormacaoPreco
,X_COF_ParceirosAdicionais
,X_COF_Participant
,X_COF_Pesagem
,X_COF_PMP_Apontamento_Producao_Manual
,X_COF_Pneu
,X_COF_Pneu_Apontamento
,X_COF_Pneu_Dimensao
,X_COF_Pneu_Manutencao
,X_COF_Pneu_Marca
,X_COF_Pneu_Montagem
,X_COF_Pneu_Status
,X_COF_Pneu_Tipo
,X_COF_PontoRemessa
,X_COF_PositividadeRepresentante
,X_COF_PP_ApontamentosManuais
,X_COF_PP_CentroTrabalho
,X_COF_PP_ConsumoMateriaPrima
,X_COF_PP_Ferramenta
,X_COF_PP_FerramentaRest
,X_COF_PP_GestaoMP
,X_COF_PP_OcorrenciaProd
,X_COF_PP_PlanoMestreProd
,X_COF_PP_PlanoMestreProdLine
,X_COF_PP_Recursos
,X_COF_PP_RecursosConfig
,X_COF_PP_RoteiroDetalhe
,X_COF_PP_RoteiroProd
,X_COF_PreferenciaXML
,X_COF_ProductClass
,X_COF_ProductGroup
,X_COF_Products
,X_COF_ProductType
,X_COF_ProjecaoEstoqueFiscal
,X_COF_R_Question_Value
,X_COF_R_RequestTypeCategory
,X_COF_R_RequestTypeGroup
,X_COF_R_Survey
,X_COF_R_Survey_Answer
,X_COF_R_Survey_Answer_Value
,X_COF_R_Survey_Question
,X_COF_RealGoods
,X_COF_Reason_Closing_Order
,X_COF_RestricaoAcesso
,X_COF_RetentionConfig
,X_COF_RPS
,X_COF_RPS_Line
,X_COF_RPS_Lote
,X_COF_RV_DetalhesEstoquePrevisto
,X_COF_schedule
,X_COF_SpareWarehouse
,X_COF_StatusInternoOS
,X_COF_TaxDefinition_Group
,X_COF_TerminalCFe
,X_COF_TipoMetaRepresentante
,X_COF_TipoOcorrenciaEmbDes
,X_COF_TipoParceiro
,X_COF_Titulo
,X_COF_TratamentoPedido
,X_COF_TrxEstoquePrevisto
,X_COF_WPP_ConfigWhatsApp
,X_DD_NetworkDistribution
,X_DD_NetworkDistributionLine
,X_DD_Order
,X_DD_OrderLine
,X_EXP_Format
,X_EXP_FormatLine
,X_EXP_Processor
,X_EXP_Processor_Type
,X_EXP_ProcessorParameter
,X_Fact_Acct
,X_Fact_Acct_Summary
,X_Fact_Reconciliation
,X_GL_Budget
,X_GL_BudgetControl
,X_GL_Category
,X_GL_Distribution
,X_GL_DistributionLine
,X_GL_Fund
,X_GL_FundRestriction
,X_GL_Journal
,X_GL_JournalBatch
,X_GL_JournalGenerator
,X_GL_JournalGeneratorLine
,X_GL_JournalGeneratorSource
,X_GL_JournalLine
,X_HR_Attribute
,X_HR_Concept
,X_HR_Concept_Acct
,X_HR_Concept_Category
,X_HR_Contract
,X_HR_Department
,X_HR_Employee
,X_HR_Job
,X_HR_List
,X_HR_ListLine
,X_HR_ListType
,X_HR_ListVersion
,X_HR_Movement
,X_HR_Payroll
,X_HR_PayrollConcept
,X_HR_Period
,X_HR_Process
,X_HR_Year
,X_I_Asset
,X_I_BankStatement
,X_I_BPartner
,X_I_Conversion_Rate
,X_I_ElementValue
,X_I_FAJournal
,X_I_FixedAsset
,X_I_GLJournal
,X_I_HR_Movement
,X_I_InOut
,X_I_InOutLineConfirm
,X_I_Inventory
,X_I_Invoice
,X_I_Movement
,X_I_Order
,X_I_Payment
,X_I_PriceList
,X_I_Product
,X_I_ProductPlanning
,X_I_ReportLine
,X_I_TaxImport
,X_IMP_Processor
,X_IMP_Processor_Type
,X_IMP_ProcessorLog
,X_IMP_ProcessorParameter
,X_LBR_BPartnerCategory
,X_LBR_CFOP
,X_LBR_CFOPLine
,X_LBR_DigitalCertificate
,X_LBR_DocFiscal
,X_LBR_DocFiscal_autXML
,X_LBR_DocFiscal_cana_deduc
,X_LBR_DocFiscal_cana_forDia
,X_LBR_DocFiscal_Cobr_Dup
,X_LBR_DocFiscal_detPag
,X_LBR_DocFiscal_Line
,X_LBR_DocFiscal_Line_arma
,X_LBR_DocFiscal_Line_detExport
,X_LBR_DocFiscal_Line_DI
,X_LBR_DocFiscal_Line_DI_adi
,X_LBR_DocFiscal_Line_NVE
,X_LBR_DocFiscal_Line_Rastro
,X_LBR_DocFiscal_obsCont
,X_LBR_DocFiscal_obsFisco
,X_LBR_DocFiscal_procRef
,X_LBR_DocFiscal_Ref
,X_LBR_DocFiscal_Transp_Lacres
,X_LBR_DocFiscal_Transp_Vol
,X_LBR_EventoNFe
,X_LBR_FiscalGroup_BPartner
,X_LBR_FiscalGroup_Product
,X_LBR_Formula
,X_LBR_ICMSMatrix
,X_LBR_InutilizacaoNFe
,X_LBR_ISSMatrix
,X_LBR_LegalMessage
,X_LBR_NCM
,X_LBR_NFeLot
,X_LBR_NFeWebService
,X_LBR_ProductCategory
,X_LBR_Tax
,X_LBR_TaxDefinition
,X_LBR_TaxFormula
,X_LBR_TaxLine
,X_LBR_TaxName
,X_LBR_TaxStatus
,X_M_Attribute
,X_M_AttributeInstance
,X_M_AttributeSearch
,X_M_AttributeSet
,X_M_AttributeSetExclude
,X_M_AttributeSetInstance
,X_M_AttributeUse
,X_M_AttributeValue
,X_M_BOM
,X_M_BOMAlternative
,X_M_BOMProduct
,X_M_BP_Price
,X_M_ChangeNotice
,X_M_ChangeRequest
,X_M_CommodityShipment
,X_M_Cost
,X_M_CostDetail
,X_M_CostElement
,X_M_CostHistory
,X_M_CostQueue
,X_M_CostType
,X_M_Demand
,X_M_DemandDetail
,X_M_DemandLine
,X_M_DiscountSchema
,X_M_DiscountSchemaBreak
,X_M_DiscountSchemaLine
,X_M_DistributionList
,X_M_DistributionListLine
,X_M_DistributionRun
,X_M_DistributionRunLine
,X_M_Forecast
,X_M_ForecastLine
,X_M_Freight
,X_M_FreightCategory
,X_M_InOut
,X_M_InOutConfirm
,X_M_InOutLine
,X_M_InOutLineConfirm
,X_M_InOutLineMA
,X_M_Inventory
,X_M_InventoryLine
,X_M_InventoryLineMA
,X_M_Locator
,X_M_LocatorType
,X_M_Lot
,X_M_LotCtl
,X_M_LotCtlExclude
,X_M_MatchInv
,X_M_MatchPO
,X_M_Movement
,X_M_MovementConfirm
,X_M_MovementLine
,X_M_MovementLineConfirm
,X_M_MovementLineMA
,X_M_OperationResource
,X_M_Package
,X_M_PackageLine
,X_M_PackageMPS
,X_M_PartType
,X_M_PerpetualInv
,X_M_PriceList
,X_M_PriceList_Version
,X_M_Product
,X_M_Product_Acct
,X_M_Product_BOM
,X_M_Product_Category
,X_M_Product_Category_Acct
,X_M_Product_PO
,X_M_Product_QualityTest
,X_M_ProductDownload
,X_M_Production
,X_M_ProductionLine
,X_M_ProductionLineMA
,X_M_ProductionPlan
,X_M_ProductOperation
,X_M_ProductPrice
,X_M_ProductPriceVendorBreak
,X_M_Promotion
,X_M_PromotionDistribution
,X_M_PromotionGroup
,X_M_PromotionGroupLine
,X_M_PromotionLine
,X_M_PromotionPreCondition
,X_M_PromotionReward
,X_M_QualityTest
,X_M_QualityTestResult
,X_M_RelatedProduct
,X_M_Replenish
,X_M_Requisition
,X_M_RequisitionLine
,X_M_RMA
,X_M_RMALine
,X_M_RMATax
,X_M_RMAType
,X_M_SerNoCtl
,X_M_SerNoCtlExclude
,X_M_Shipper
,X_M_ShipperCfg
,X_M_ShipperLabels
,X_M_ShipperLabelsCfg
,X_M_ShipperPackaging
,X_M_ShipperPackagingCfg
,X_M_ShipperPickupTypes
,X_M_ShipperPickupTypesCfg
,X_M_ShippingProcessor
,X_M_ShippingProcessorCfg
,X_M_ShippingTransaction
,X_M_ShippingTransactionLine
,X_M_StorageOnHand
,X_M_StorageReservation
,X_M_StorageReservationLog
,X_M_Substitute
,X_M_Transaction
,X_M_TransactionAllocation
,X_M_Warehouse
,X_M_Warehouse_Acct
,X_MFA_Method
,X_MFA_RegisteredDevice
,X_MFA_Registration
,X_MFA_Rule
,X_MP_AssetMeter
,X_MP_AssetMeter_Log
,X_MP_JobStandar
,X_MP_JobStandar_Resource
,X_MP_JobStandar_Task
,X_MP_Maintain
,X_MP_Maintain_Resource
,X_MP_Maintain_Task
,X_MP_Meter
,X_MP_OT
,X_MP_OT_Request
,X_MP_OT_Resource
,X_MP_OT_Task
,X_MP_Prognosis
,X_PA_Achievement
,X_PA_Benchmark
,X_PA_BenchmarkData
,X_PA_ColorSchema
,X_PA_DashboardContent
,X_PA_DashboardContent_Access
,X_PA_DashboardPreference
,X_PA_DocumentStatus
,X_PA_DocumentStatusAccess
,X_PA_Goal
,X_PA_GoalRestriction
,X_PA_Hierarchy
,X_PA_Measure
,X_PA_MeasureCalc
,X_PA_Ratio
,X_PA_RatioElement
,X_PA_Report
,X_PA_ReportColumn
,X_PA_ReportColumnSet
,X_PA_ReportCube
,X_PA_ReportLine
,X_PA_ReportLineSet
,X_PA_ReportSource
,X_PA_SLA_Criteria
,X_PA_SLA_Goal
,X_PA_SLA_Measure
,X_PP_Cost_Collector
,X_PP_Cost_CollectorMA
,X_PP_MRP
,X_PP_Order
,X_PP_Order_BOM
,X_PP_Order_BOMLine
,X_PP_Order_Cost
,X_PP_Order_Node
,X_PP_Order_Node_Asset
,X_PP_Order_Node_Product
,X_PP_Order_NodeNext
,X_PP_Order_Workflow
,X_PP_Product_BOM
,X_PP_Product_BOMLine
,X_PP_Product_Planning
,X_PP_WF_Node_Asset
,X_PP_WF_Node_Product
,X_QM_Specification
,X_QM_SpecificationLine
,X_R_Category
,X_R_CategoryUpdates
,X_R_ContactInterest
,X_R_Group
,X_R_GroupUpdates
,X_R_InterestArea
,X_R_IssueKnown
,X_R_IssueProject
,X_R_IssueRecommendation
,X_R_IssueStatus
,X_R_IssueSystem
,X_R_IssueUser
,X_R_MailText
,X_R_Request
,X_R_RequestAction
,X_R_RequestProcessor
,X_R_RequestProcessor_Route
,X_R_RequestProcessorLog
,X_R_RequestType
,X_R_RequestTypeUpdates
,X_R_RequestUpdate
,X_R_RequestUpdates
,X_R_Resolution
,X_R_StandardResponse
,X_R_Status
,X_R_StatusCategory
,X_RV_BPartner
,X_RV_WarehousePrice
,X_S_ExpenseType
,X_S_Resource
,X_S_ResourceAssignment
,X_S_ResourceType
,X_S_ResourceUnAvailable
,X_S_TimeExpense
,X_S_TimeExpenseLine
,X_S_TimeType
,X_S_Training
,X_S_Training_Class
,X_SSO_PrincipalConfig
,X_T_1099Extract
,X_T_Aging
,X_T_BankRegister
,X_T_BOM_Indented
,X_T_BOMLine
,X_T_CashFlow
,X_T_COF_FluxoPlanoFinanceiro
,X_T_COF_RelatorioCompra
,X_T_COF_RelatorioMRP
,X_T_DistributionRunDetail
,X_T_InventoryTrxSummary
,X_T_InventoryValue
,X_T_InvoiceGL
,X_T_ItensAProduzir
,X_T_ItensNaoVendidosAClientes
,X_T_MRP_CRP
,X_T_Reconciliation
,X_T_Replenish
,X_T_Report
,X_T_ReportStatement
,X_T_Transaction
,X_T_TrialBalance
,X_Test
,X_TestUU
,X_TestUUDet
,X_U_BlackListCheque
,X_U_POSTerminal
,X_U_RoleMenu
,X_U_Web_Properties
,X_U_WebMenu
,X_WS_WebService
,X_WS_WebService_Para
,X_WS_WebServiceFieldInput
,X_WS_WebServiceFieldOutput
,X_WS_WebServiceMethod
,X_WS_WebServiceType
,X_WS_WebServiceTypeAccess
public abstract class PO
extends Object
implements Serializable, Comparator<Object>, Evaluatee, Cloneable
Persistent Object.
Superclass for actual implementations
- Version:
- $Id: PO.java,v 1.12 2006/08/09 16:38:47 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
- FR [ 1675490 ] ModelValidator on modelChange after events
- BF [ 1704828 ] PO.is_Changed() and PO.is_ValueChanged are not consistent
- FR [ 1720995 ] Add PO.saveEx() and PO.deleteEx() methods
- BF [ 1990856 ] PO.set_Value* : truncate string more than needed
- FR [ 2042844 ] PO.get_Translation improvements
- FR [ 2818369 ] Implement PO.get_ValueAs*(columnName) https://sourceforge.net/p/adempiere/feature-requests/754/
- BF [ 2849122 ] PO.AfterSave is not rollback on error https://sourceforge.net/p/adempiere/bugs/2073/
- BF [ 2859125 ] Can't set AD_OrgBP_ID https://sourceforge.net/p/adempiere/bugs/2095/
- BF [ 2866493 ] VTreePanel is not saving who did the node move https://sourceforge.net/p/adempiere/bugs/2135/, Teo Sarca, teo.sarca@gmail.com
- BF [ 2876259 ] PO.insertTranslation query is not correct https://sourceforge.net/p/adempiere/bugs/2168/, Victor Perez, e-Evolution SC
- [ 2195894 ] Improve performance in PO engine
- https://sourceforge.net/p/adempiere/feature-requests/555/
- BF [2947622] The replication ID (Primary Key) is not working
- https://sourceforge.net/p/adempiere/bugs/2308/
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Access Level SCO 111 7 System shared infostatic final int
Access Level _C_ 010 2 Client infostatic final int
Access Level _CO 011 3 Client shared infostatic final int
Access Level __O 001 1 Organization infostatic final int
Access Level S__ 100 4 System infostatic final int
Access Level SC_ 110 6 System/Client infostatic final String
Dictionary Maintained Entity Typestatic final String
User Maintained Entity Typeprotected static final Integer
Zero Integerstatic final String
protected CLogger
Loggerprotected Properties
Contextprotected POInfo
Model Infostatic final String
protected static final String
Table ID Attributeprotected static final String
Record ID Attribute -
Constructor Summary
ConstructorDescriptionPO
(Properties ctx) Create New Persistent ObjectPO
(Properties ctx, int ID, String trxName) Create and Load existing Persistent ObjectPO
(Properties ctx, int ID, String trxName, String... virtualColumns) Create and load existing Persistent ObjectPO
(Properties ctx, int ID, String trxName, ResultSet rs, String... virtualColumns) Create and Load existing Persistent Object.PO
(Properties ctx, String UUID, String trxName) Create and Load existing Persistent ObjectPO
(Properties ctx, String UUID, String trxName, String... virtualColumns) Create and load existing Persistent ObjectCreate and Load existing Persistent Object.PO
(Properties ctx, ResultSet rs, String trxName) Create and Load existing Persistent Object.PO
(Properties ctx, PO source, int AD_Client_ID, int AD_Org_ID) Create New PO by Copying existing (key not copied). -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
afterDelete
(boolean success) Executed after Delete operation.protected 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 Operationprotected int
buildInsertSQL
(StringBuilder sqlInsert, boolean withValues, List<Object> params, MSession session, int AD_ChangeLog_ID, boolean generateScriptOnly) Build insert SQL statement and capture change logprotected void
static void
protected Object
clone()
Deprecated.boolean
columnExists
(String columnName) Verify if a column existsboolean
columnExists
(String columnName, boolean throwException) Verify if a column existsint
Compare based on DocumentNo, Value, Name, Descriptionprotected void
Copy all properties from copy.static void
copyValues
(PO from, PO to) Copy old values of From to new values of To.protected static void
copyValues
(PO from, PO to, int AD_Client_ID, int AD_Org_ID) Copy old values of From to new values of To.Create/return Attachment for PO.boolean
delete
(boolean force) Delete Current Recordboolean
Delete Current Recordprotected boolean
delete_Accounting
(String acctTable) Deprecated.protected boolean
delete_Tree
(String treeType) Delete ID Tree Nodesvoid
deleteEx
(boolean force) Delete Current Recordvoid
Delete Current Recordvoid
dump()
Dump where clause and column valuesvoid
dump
(int index) Dump column (index:columnName=oldValue (newValue))boolean
Equals based on IDprotected abstract int
Get Table Access Levelget_Attribute
(String attributeName) int
Get Column Countprotected String
get_ColumnDescription
(int index) Get Column Descriptionprotected int
get_ColumnDisplayType
(int index) Get Column DisplayTypefinal int
get_ColumnIndex
(String columnName) Get Column Indexprotected String
get_ColumnLabel
(int index) Get Column Labelprotected Lookup
get_ColumnLookup
(int index) Get Lookupget_ColumnName
(int index) Get Column Nameget_DisplayValue
(String columnName, boolean currentValue) Get Display Value of valueCreate Hashmap with data as Stringsint
get_ID()
Return Single Key Record IDint
Return Deleted Single Key Record IDString[]
Get Key Columns.Get LoggerString[]
int
Get Table ID.Get TableName.get_Translation
(String columnName) Get Translation of columnget_Translation
(String columnName, boolean fallback) Get Translation of columnget_Translation
(String columnName, String AD_Language) get_Translation
(String columnName, String AD_Language, boolean reload) Get Translation of columnget_Translation
(String columnName, String AD_Language, boolean reload, boolean fallback) Get Translation of column (if needed).Get Trxget_UUID()
final Object
get_Value
(int index) Get Valuefinal Object
Get Valueboolean
get_ValueAsBoolean
(String columnName) Get value as Booleanint
get_ValueAsInt
(int index) Get Value as intint
get_ValueAsInt
(String columnName) Get Integer Valueget_ValueAsString
(int idx) Get String Valueget_ValueAsString
(String columnName) Get String Valuefinal Object
get_ValueDifference
(int index) Return new - oldfinal Object
get_ValueDifference
(String columnName) Return new - oldprotected final Object
get_ValueE
(String columnName) Get Encrypted Valuefinal Object
get_ValueOfColumn
(int AD_Column_ID) Get Value of Columnfinal Object
get_ValueOld
(int index) Get Old Valuefinal Object
get_ValueOld
(String columnName) Get Old Valueint
get_ValueOldAsInt
(String columnName) Get Old Value as intget_WhereClause
(boolean withValues) Create Single/Multi Key Where Clauseget_WhereClause
(boolean withValues, String uuID) Create Single/Multi Key Where Clauseget_xmlDocument
(boolean noComment) Get XML Document representationGet Object xml representation as stringfinal int
Get AD_Clientint
Get AD_Orgstatic int[]
Get All IDs of Table.Get Attachments.getAttachment
(boolean requery) Get Attachmentsbyte[]
getAttachmentData
(String extension) Get Attachment Data of typefinal Timestamp
Get Createdfinal int
Get CreatedBygetCtx()
Get ContextgetDoc()
Set the accounting document associated to the PO - for use in POST ModelValidatorprotected static String
getFindParameter
(String query) Get Find parameter.byte[]
Get PDF Attachment Datafinal Timestamp
Get Updatedfinal int
Get UpdatedBystatic String
getUUIDColumnName
(String tableName) int
hashCode()
protected abstract POInfo
initPO
(Properties ctx) Initialize and return PO_Infoprotected boolean
insert_Accounting
(String acctTableName, String acctBaseTable, String whereClause) Insert Accounting Recordsprotected boolean
insert_Tree
(String treeType) Insert id data into Treeprotected boolean
insert_Tree
(String treeType, int C_Element_ID) Insert id data into Treeboolean
Is there a Change to be saved?boolean
boolean
is_new()
Is new recordboolean
final boolean
is_ValueChanged
(int index) Is Value Changedfinal boolean
is_ValueChanged
(String columnName) Is Value Changedfinal boolean
isActive()
Is Activeboolean
isAttachment
(String extension) Do we have a Attachment of typeprotected boolean
isColumnMandatory
(int index) Is Column Mandatoryprotected boolean
isColumnUpdateable
(int index) Is Column Updateableprotected boolean
Are all mandatory Fields filled (i.e. can we save)?.boolean
Do we have a PDF Attachmentboolean
protected void
Load record with IDboolean
(re)Load record with m_ID[*]protected boolean
Load from the current position of a ResultSetprotected boolean
Load from HashMapvoid
Load record with UUIDprotected void
loadComplete
(boolean success) Load is completeprotected void
Load Defaultsprotected boolean
(re)Load record with uuID orm_IDs
protected Object
loadSpecial
(ResultSet rs, int index) Load data for custom Java type that has no build in implementation (images, ..).boolean
lock()
Lock it.protected void
Turn on immutable checkprotected boolean
Executed after the Delete operation is committed in the database.static int
retrieveIdOfParentValue
(String value, String tableName, int clientID, String trxName) Returns the summary node with the corresponding valuestatic int
retrieveIdOfParentValue
(String value, String tableName, String linkCol, int linkID, int clientID, String trxName) boolean
save()
Update Value or create new record.boolean
Update or insert new record.
To reload call load().boolean
Update Value or create new record, used when writing a cross tenant recordvoid
Update Value or create new record, used when writing a cross tenant recordvoid
saveCrossTenantSafeEx
(String trxName) Update Value or create new record, used when writing a cross tenant recordvoid
saveEx()
Update Value or create new record.void
Update Value or create new record.protected void
Call after ID have been assigned for new recordprotected int
Get ID for new record during save.protected String
saveNewSpecial
(Object value, int index) Save data for custom Java type that have no build in implementation.
To be extended by sub-classes (default implementation just call value.toString()).void
saveReplica
(boolean isFromReplication) protected boolean
Update Record directlyvoid
set_Attribute
(String attributeName, Object value) set attribute valueprotected void
set_ColumnUpdateable
(int index, boolean updateable) Set Column Updateablefinal void
set_CustomColumn
(String columnName, Object value) Set Custom Columnfinal boolean
set_CustomColumnReturningBoolean
(String columnName, Object value) Set Custom Column returning booleanvoid
set_OptimisticLockingColumns
(String[] columns) set columns use for optimistic locking (auto add to where clause for update and delete)void
set_TrxName
(String trxName) Set Trxstatic void
set_TrxName
(PO[] lines, String trxName) PO.setTrxName - set given trxName to an array of POs As suggested by teo in [ 1854603 ]void
set_UseOptimisticLocking
(boolean enable) enable/disable optimistic lockingprotected final boolean
Set Value if updateable and correct class.protected final boolean
Set Value if updateable and correct class.protected final boolean
Set Valueprotected final boolean
Set Valueprotected final boolean
set_ValueE
(String ColumnName, Object value) Set Encrypted Valuefinal boolean
set_ValueNoCheck
(String ColumnName, Object value) Set Value w/o check (update, r/o, ..).protected final boolean
set_ValueNoCheckE
(String ColumnName, Object value) Set Encrypted Value w/o check (update, r/o, ..).final void
set_ValueOfColumn
(int AD_Column_ID, Object value) Set Value of Columnfinal void
set_ValueOfColumn
(String columnName, Object value) Set value of Columnfinal boolean
set_ValueOfColumnReturningBoolean
(int AD_Column_ID, Object value) Set Value of Columnfinal boolean
set_ValueOfColumnReturningBoolean
(String columnName, Object value) Set value of Column returning booleanprotected final void
setAD_Client_ID
(int AD_Client_ID) Set AD_Clientfinal void
setAD_Org_ID
(int AD_Org_ID) Set AD_Orgprotected void
setClientOrg
(int AD_Client_ID, int AD_Org_ID) Overwrite Client Org if differentprotected void
setClientOrg
(PO po) Overwrite Client Org if differentstatic void
void
Set the accounting document associated to the PO - for use in POST ModelValidatorstatic void
setDocWorkflowMgr
(DocWorkflowMgr docWFMgr) Set Document Value Workflow Managerfinal void
setIsActive
(boolean active) Set Activevoid
setProcessedOn
(String ColumnName, Object value, Object oldValue) void
setReplication
(boolean isFromReplication) protected void
Set Default values.protected void
setUpdateable
(boolean updateable) Set all columns updateableprotected final void
setUpdatedBy
(int AD_User_ID) Set UpdatedByExport data as insert SQL statementtoString()
String representationboolean
UnLock itvoid
update_Tree
(String treeType) Update parent key and seqno based on value if the tree is driven by valueboolean
Validate Foreign keys for cross tenant to be called programmatically before saving in programs that can receive arbitrary values in IDs This is an expensive operation in terms of database, use it wisely TODO: there is huge room for performance improvement, for example: - caching the valid values found on foreign tables - caching the column ID of the foreign column - caching the systemAccessMethods 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
-
Field Details
-
UUID_NEW_RECORD
- See Also:
-
LOCAL_TRX_PREFIX
- See Also:
-
ENTITYTYPE_UserMaintained
User Maintained Entity Type- See Also:
-
ENTITYTYPE_Dictionary
Dictionary Maintained Entity Type- See Also:
-
log
Logger -
p_ctx
Context -
p_info
Model Info -
I_ZERO
Zero Integer -
ACCESSLEVEL_SYSTEM
public static final int ACCESSLEVEL_SYSTEMAccess Level S__ 100 4 System info- See Also:
-
ACCESSLEVEL_CLIENT
public static final int ACCESSLEVEL_CLIENTAccess Level _C_ 010 2 Client info- See Also:
-
ACCESSLEVEL_ORG
public static final int ACCESSLEVEL_ORGAccess Level __O 001 1 Organization info- See Also:
-
ACCESSLEVEL_ALL
public static final int ACCESSLEVEL_ALLAccess Level SCO 111 7 System shared info- See Also:
-
ACCESSLEVEL_SYSTEMCLIENT
public static final int ACCESSLEVEL_SYSTEMCLIENTAccess Level SC_ 110 6 System/Client info- See Also:
-
ACCESSLEVEL_CLIENTORG
public static final int ACCESSLEVEL_CLIENTORGAccess Level _CO 011 3 Client shared info- See Also:
-
XML_ATTRIBUTE_AD_Table_ID
Table ID Attribute- See Also:
-
XML_ATTRIBUTE_Record_ID
Record ID Attribute- See Also:
-
-
Constructor Details
-
PO
Create New Persistent Object- Parameters:
ctx
- context
-
PO
Create and Load existing Persistent Object- Parameters:
ctx
- contextID
- The unique ID of the objecttrxName
- transaction name
-
PO
Create and Load existing Persistent Object- Parameters:
ctx
- contextUUID
- The unique UUID of the objecttrxName
- transaction name
-
PO
Create and load existing Persistent Object- Parameters:
ctx
- ContextID
- Unique ID of the objecttrxName
- Transaction namevirtualColumns
- names of virtual columns to load along with the regular table columns
-
PO
Create and load existing Persistent Object- Parameters:
ctx
- ContextUUID
- Unique UUID of the objecttrxName
- Transaction namevirtualColumns
- names of virtual columns to load along with the regular table columns
-
PO
Create and Load existing Persistent Object.- Parameters:
ctx
- contextrs
- optional - load from current result set position (no navigation, not closed) if null, a new record is created.trxName
- transaction name
-
PO
Create and Load existing Persistent Object.You load - an existing single key record with new PO (ctx, Record_ID) or new PO (ctx, Record_ID, trxName) or new PO (ctx, rs, get_TrxName()) - a new single key record with new PO (ctx, 0) - an existing multi key record with new PO (ctx, rs, get_TrxName()) - a new multi key record with new PO (ctx, null) The ID for new single key records is created automatically, you need to set the IDs for multi-key records explicitly.
- Parameters:
ctx
- contextID
- the ID if 0, the record defaults are applied - ignored if re existstrxName
- transaction namers
- optional - load from current result set position (no navigation, not closed)virtualColumns
- optional - names of virtual columns to load along with the regular table columns
-
PO
Create and Load existing Persistent Object.You load - an existing single key record with new PO (ctx, Record_ID) or new PO (ctx, Record_ID, trxName) or new PO (ctx, rs, get_TrxName()) - a new single key record with new PO (ctx, 0) - an existing multi key record with new PO (ctx, rs, get_TrxName()) - a new multi key record with new PO (ctx, null) The ID for new single key records is created automatically, you need to set the IDs for multi-key records explicitly.
- Parameters:
ctx
- contextUUID
- the UUID if "", the record defaults are applied - ignored if re existstrxName
- transaction namers
- optional - load from current result set position (no navigation, not closed)virtualColumns
- optional - names of virtual columns to load along with the regular table columns
-
PO
Create New PO by Copying existing (key not copied).- Parameters:
ctx
- contextsource
- source objectAD_Client_ID
- clientAD_Org_ID
- org
-
-
Method Details
-
setDocWorkflowMgr
Set Document Value Workflow Manager- Parameters:
docWFMgr
- mgr
-
copyPO
Copy all properties from copy. Method to help the implementation of copy constructor.- Parameters:
copy
-
-
initPO
Initialize and return PO_Info- Parameters:
ctx
- context- Returns:
- POInfo
-
get_AccessLevel
protected abstract int get_AccessLevel()Get Table Access Level- Returns:
- Access Level
-
toString
String representation -
equals
Equals based on ID- Specified by:
equals
in interfaceComparator<Object>
- Overrides:
equals
in classObject
- Parameters:
cmp
- comparator- Returns:
- true if ID the same
-
hashCode
public int hashCode() -
compare
Compare based on DocumentNo, Value, Name, Description- Specified by:
compare
in interfaceComparator<Object>
- Parameters:
o1
- Object 1o2
- Object 2- Returns:
- -1 if o1 < o2
-
get_TableName
Get TableName.- Returns:
- table name
-
get_KeyColumns
Get Key Columns.- Returns:
- table name
-
get_Table_ID
public int get_Table_ID()Get Table ID.- Returns:
- table id
-
get_ID
public int get_ID()Return Single Key Record ID- Returns:
- ID or 0
-
get_IDOld
public int get_IDOld()Return Deleted Single Key Record ID- Returns:
- ID or 0
-
get_UUID
- Returns:
- UUID value
-
getCtx
Get Context- Returns:
- context
-
get_Logger
Get Logger- Returns:
- logger
-
get_Value
Get Value- Parameters:
index
- index- Returns:
- value
-
get_ValueAsInt
public int get_ValueAsInt(int index) Get Value as int- Parameters:
index
- index- Returns:
- int value or 0
-
get_Value
Get Value- Parameters:
columnName
- column name- Returns:
- value or null
-
get_ValueE
Get Encrypted Value- Parameters:
columnName
- column name- Returns:
- value or null
-
get_ValueAsString
Get String Value- Specified by:
get_ValueAsString
in interfaceEvaluatee
- Parameters:
columnName
-- Returns:
- String value
-
get_ValueAsString
Get String Value- Parameters:
idx
- column index- Returns:
- String value or ""
-
get_ValueOfColumn
Get Value of Column- Parameters:
AD_Column_ID
- column- Returns:
- value or null
-
get_ValueOld
Get Old Value- Parameters:
index
- index- Returns:
- value
-
get_ValueOld
Get Old Value- Parameters:
columnName
- column name- Returns:
- value or null
-
get_ValueOldAsInt
Get Old Value as int- Parameters:
columnName
- column name- Returns:
- int value or 0
-
is_ValueChanged
public final boolean is_ValueChanged(int index) Is Value Changed- Parameters:
index
- index- Returns:
- true if changed
-
is_ValueChanged
Is Value Changed- Parameters:
columnName
- column name- Returns:
- true if changed
-
get_ValueDifference
Return new - old. - New Value if Old Value is null - New Value - Old Value if Number - otherwise null- Parameters:
index
- index- Returns:
- new - old or null if not appropriate or not changed
-
get_ValueDifference
Return new - old. - New Value if Old Value is null - New Value - Old Value if Number - otherwise null- Parameters:
columnName
- column name- Returns:
- new - old or null if not appropriate or not changed
-
set_Value
Set Value- Parameters:
ColumnName
- column namevalue
- value- Returns:
- true if value set
-
set_Value
Set Value- Parameters:
ColumnName
- column namevalue
- valuecheckWritable
-- Returns:
- true if value set
-
set_ValueE
Set Encrypted Value- Parameters:
ColumnName
- column namevalue
- value- Returns:
- true if value set
-
set_Value
Set Value if updateable and correct class. (and to NULL if not mandatory)- Parameters:
index
- indexvalue
- value- Returns:
- true if value set
-
set_Value
Set Value if updateable and correct class. (and to NULL if not mandatory)- Parameters:
index
- indexvalue
- valuecheckWritable
-- Returns:
- true if value set
-
setProcessedOn
-
set_ValueNoCheck
Set Value w/o check (update, r/o, ..). Used when Column is R/O Required for key and parent values- Parameters:
ColumnName
- column namevalue
- value- Returns:
- true if value set
-
set_ValueNoCheckE
Set Encrypted Value w/o check (update, r/o, ..). Used when Column is R/O Required for key and parent values- Parameters:
ColumnName
- column namevalue
- value- Returns:
- true if value set
-
set_ValueOfColumn
Set value of Column- Parameters:
columnName
-value
-
-
set_ValueOfColumnReturningBoolean
Set value of Column returning boolean- Parameters:
columnName
-value
-
-
set_ValueOfColumn
Set Value of Column- Parameters:
AD_Column_ID
- columnvalue
- value
-
set_ValueOfColumnReturningBoolean
Set Value of Column- Parameters:
AD_Column_ID
- columnvalue
- value
-
set_CustomColumn
Set Custom Column- Parameters:
columnName
- columnvalue
- value
-
set_CustomColumnReturningBoolean
Set Custom Column returning boolean- Parameters:
columnName
- columnvalue
- value
-
get_ColumnCount
public int get_ColumnCount()Get Column Count- Returns:
- column count
-
get_ColumnName
Get Column Name- Parameters:
index
- index- Returns:
- ColumnName
-
get_ColumnLabel
Get Column Label- Parameters:
index
- index- Returns:
- Column Label
-
get_ColumnDescription
Get Column Description- Parameters:
index
- index- Returns:
- column description
-
isColumnMandatory
protected boolean isColumnMandatory(int index) Is Column Mandatory- Parameters:
index
- index- Returns:
- true if column mandatory
-
isColumnUpdateable
protected boolean isColumnUpdateable(int index) Is Column Updateable- Parameters:
index
- index- Returns:
- true if column updateable
-
set_ColumnUpdateable
protected void set_ColumnUpdateable(int index, boolean updateable) Set Column Updateable- Parameters:
index
- indexupdateable
- column updateable
-
setUpdateable
protected void setUpdateable(boolean updateable) Set all columns updateable- Parameters:
updateable
- updateable
-
get_ColumnDisplayType
protected int get_ColumnDisplayType(int index) Get Column DisplayType- Parameters:
index
- index- Returns:
- display type
-
get_ColumnLookup
Get Lookup- Parameters:
index
- index- Returns:
- Lookup or null
-
get_ColumnIndex
Get Column Index- Parameters:
columnName
- column name- Returns:
- index of column with ColumnName or -1 if not found
-
get_DisplayValue
Get Display Value of value- Parameters:
columnName
- columnNamecurrentValue
- current value- Returns:
- String value with "./." as null
-
copyValues
Copy old values of From to new values of To. Does not copy Keys- Parameters:
from
- old, existing and unchanged POto
- new, not saved POAD_Client_ID
- clientAD_Org_ID
- org
-
copyValues
Copy old values of From to new values of To. Does not copy Keys and AD_Client_ID/AD_Org_ID- Parameters:
from
- old, existing and unchanged POto
- new, not saved PO
-
load
Load record with ID- Parameters:
ID
- IDtrxName
- transaction namevirtualColumns
- names of virtual columns to load along with the regular table columns
-
loadByUU
Load record with UUID- Parameters:
uuID
- universally unique identifiertrxName
- transaction namevirtualColumns
- names of virtual columns to load along with the regular table columns
-
load
(re)Load record with m_ID[*]- Parameters:
trxName
- transactionvirtualColumns
- names of virtual columns to load along with the regular table columns- Returns:
- true if loaded
-
loadPO
(re)Load record with uuID orm_IDs
- Parameters:
uuID
- RecrodUU if not null, load by uuID, otherwise by m_IDstrxName
- transactionvirtualColumns
- names of virtual columns to load along with the regular table columns- Returns:
- true if loaded
-
load
Load from the current position of a ResultSet- Parameters:
rs
- result set- Returns:
- true if loaded
-
load
Load from HashMap- Parameters:
hmIn
- hash map- Returns:
- true if loaded
-
checkImmutable
protected void checkImmutable() -
get_HashMap
Create Hashmap with data as Strings- Returns:
- HashMap
-
loadSpecial
Load data for custom Java type that has no build in implementation (images, ..). To be extended by sub-classes (default implementation just return null).- Parameters:
rs
- result setindex
- zero based index- Returns:
- value value
- Throws:
SQLException
-
loadComplete
protected void loadComplete(boolean success) Load is complete- Parameters:
success
- success To be extended by sub-classes
-
loadDefaults
protected void loadDefaults()Load Defaults -
setStandardDefaults
protected void setStandardDefaults()Set Default values. Client, Org, Created/Updated, *By, IsActive -
isMandatoryOK
protected boolean isMandatoryOK()Are all mandatory Fields filled (i.e. can we save)?. Stops at first null mandatory field- Returns:
- true if all mandatory fields are ok
-
setAD_Client_ID
protected final void setAD_Client_ID(int AD_Client_ID) Set AD_Client- Parameters:
AD_Client_ID
- client
-
getAD_Client_ID
public final int getAD_Client_ID()Get AD_Client- Returns:
- AD_Client_ID
-
setAD_Org_ID
public final void setAD_Org_ID(int AD_Org_ID) Set AD_Org- Parameters:
AD_Org_ID
- org
-
getAD_Org_ID
public int getAD_Org_ID()Get AD_Org- Returns:
- AD_Org_ID
-
setClientOrg
protected void setClientOrg(int AD_Client_ID, int AD_Org_ID) Overwrite Client Org if different- Parameters:
AD_Client_ID
- clientAD_Org_ID
- org
-
setClientOrg
Overwrite Client Org if different- Parameters:
po
- persistent object
-
setIsActive
public final void setIsActive(boolean active) Set Active- Parameters:
active
- active
-
isActive
public final boolean isActive()Is Active- Returns:
- is active
-
getCreated
Get Created- Returns:
- created
-
getUpdated
Get Updated- Returns:
- updated
-
getCreatedBy
public final int getCreatedBy()Get CreatedBy- Returns:
- AD_User_ID
-
getUpdatedBy
public final int getUpdatedBy()Get UpdatedBy- Returns:
- AD_User_ID
-
setUpdatedBy
protected final void setUpdatedBy(int AD_User_ID) Set UpdatedBy- Parameters:
AD_User_ID
- user
-
get_Translation
-
get_Translation
public String get_Translation(String columnName, String AD_Language, boolean reload, boolean fallback) Get Translation of column (if needed). It checks if the base language is used or the column is not translated. If there is no translation then it fallback to original value.- Parameters:
columnName
-AD_Language
-reload
- don't use cache, reload from DBfallback
- fallback to base if no translation found- Returns:
- translated string
- Throws:
IllegalArgumentException
- if columnName or AD_Language is null or model has multiple PK
-
get_Translation
Get Translation of column- Parameters:
columnName
-
-
get_Translation
Get Translation of column- Parameters:
columnName
-AD_Language
-reload
- don't use cache, reload from DB
-
get_Translation
Get Translation of column- Parameters:
columnName
-fallback
- fallback to base if no translation found- Returns:
- translation
-
is_new
public boolean is_new()Is new record- Returns:
- true if new
-
save
public boolean save()Update Value or create new record. To reload call load() - not updated- Returns:
- true if saved
-
saveEx
Update Value or create new record.- Throws:
AdempiereException
- See Also:
-
saveCrossTenantSafe
public boolean saveCrossTenantSafe()Update Value or create new record, used when writing a cross tenant record- Throws:
AdempiereException
- See Also:
-
saveCrossTenantSafeEx
public void saveCrossTenantSafeEx()Update Value or create new record, used when writing a cross tenant record- Throws:
AdempiereException
- See Also:
-
save
Update or insert new record.
To reload call load().- Parameters:
trxName
- transaction- Returns:
- true if saved
-
saveReplica
- Throws:
AdempiereException
-
saveCrossTenantSafeEx
Update Value or create new record, used when writing a cross tenant record- Parameters:
trxName
- transaction- Throws:
AdempiereException
- See Also:
-
saveEx
Update Value or create new record.- Parameters:
trxName
- transaction- Throws:
AdempiereException
- See Also:
-
is_Changed
public boolean is_Changed()Is there a Change to be saved?- Returns:
- true if record changed
-
beforeSave
protected boolean beforeSave(boolean newRecord) Called before Save for Pre-Save Operation- Parameters:
newRecord
- new record- Returns:
- true if record can be saved
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) Called after Save for Post-Save Operation- Parameters:
newRecord
- new recordsuccess
- true if save operation was success- Returns:
- if save was a success
-
saveUpdate
protected boolean saveUpdate()Update Record directly- Returns:
- true if updated
-
is_UseOptimisticLocking
public boolean is_UseOptimisticLocking()- Returns:
- true if optimistic locking is enable
-
set_UseOptimisticLocking
public void set_UseOptimisticLocking(boolean enable) enable/disable optimistic locking- Parameters:
enable
-
-
get_OptimisticLockingColumns
- Returns:
- optimistic locking columns
-
set_OptimisticLockingColumns
set columns use for optimistic locking (auto add to where clause for update and delete)- Parameters:
columns
-
-
toInsertSQL
Export data as insert SQL statement -
buildInsertSQL
protected int buildInsertSQL(StringBuilder sqlInsert, boolean withValues, List<Object> params, MSession session, int AD_ChangeLog_ID, boolean generateScriptOnly) Build insert SQL statement and capture change log- Parameters:
sqlInsert
-withValues
- true to create statement with column values, false to use parameter binding (i.e with ?)params
- statement parameters when withValues is falsesession
- to capture change log. null when call from toInsertSQL (i.e to build sql only, not for real insert to DB)AD_ChangeLog_ID
- initial change log idgenerateScriptOnly
- true if it is to generate sql script only, false for real DB insert- Returns:
- last AD_ChangeLog_ID
-
saveNew_getID
protected int saveNew_getID()Get ID for new record during save. You can overwrite this to explicitly set the ID- Returns:
- ID to be used or 0 for default logic
-
saveNew_afterSetID
protected void saveNew_afterSetID()Call after ID have been assigned for new record -
get_WhereClause
Create Single/Multi Key Where Clause- Parameters:
withValues
- if true uses actual values otherwise ?- Returns:
- where clause
-
get_WhereClause
Create Single/Multi Key Where Clause- Parameters:
withValues
- if true uses actual values otherwise ?uuID
- RecordUU- Returns:
- where clause
-
saveNewSpecial
Save data for custom Java type that have no build in implementation.
To be extended by sub-classes (default implementation just call value.toString()).- Parameters:
value
- valueindex
- index- Returns:
- SQL code for INSERT VALUES clause
-
delete
public boolean delete(boolean force) Delete Current Record- Parameters:
force
- delete also processed records- Returns:
- true if deleted
-
deleteEx
Delete Current Record- Parameters:
force
- delete also processed records- Throws:
AdempiereException
- See Also:
-
delete
Delete Current Record- Parameters:
force
- delete also processed recordstrxName
- transaction- Returns:
- true if deleted
-
deleteEx
Delete Current Record- Parameters:
force
- delete also processed recordstrxName
- transaction- Throws:
AdempiereException
-
beforeDelete
protected boolean beforeDelete()Executed before Delete operation.- Returns:
- true if record can be deleted
-
afterDelete
protected boolean afterDelete(boolean success) Executed after Delete operation.- Parameters:
success
- true if record deleted- Returns:
- true if delete is a success
-
postDelete
protected boolean postDelete()Executed after the Delete operation is committed in the database.- Returns:
- true if post delete is a success
-
insert_Accounting
Insert Accounting Records- Parameters:
acctTableName
- accounting sub tableacctBaseTable
- acct table to get data fromwhereClause
- optional where clause with alias "p" for acctBaseTable- Returns:
- true if records inserted
-
delete_Accounting
Deprecated.Delete Accounting records. NOP - done by database constraints- Parameters:
acctTable
- accounting sub table- Returns:
- true
-
insert_Tree
Insert id data into Tree- Parameters:
treeType
- MTree TREETYPE_*- Returns:
- true if inserted
-
insert_Tree
Insert id data into Tree- Parameters:
treeType
- MTree TREETYPE_*C_Element_ID
- element for accounting element values- Returns:
- true if inserted
-
update_Tree
Update parent key and seqno based on value if the tree is driven by value- Parameters:
treeType
- MTree TREETYPE_*
-
retrieveIdOfParentValue
public static int retrieveIdOfParentValue(String value, String tableName, int clientID, String trxName) Returns the summary node with the corresponding value -
retrieveIdOfParentValue
-
delete_Tree
Delete ID Tree Nodes- Parameters:
treeType
- MTree TREETYPE_*- Returns:
- true if deleted
-
lock
public boolean lock()Lock it.- Returns:
- true if locked
-
unlock
UnLock it- Parameters:
trxName
- transaction- Returns:
- true if unlocked (false only if unlock fails)
-
set_TrxName
Set Trx- Parameters:
trxName
- transaction
-
get_TrxName
Get Trx- Returns:
- transaction
-
getAttachment
Get Attachments. An attachment may have multiple entries- Returns:
- Attachment or null
-
getAttachment
Get Attachments- Parameters:
requery
- requery- Returns:
- Attachment or null
-
createAttachment
Create/return Attachment for PO. If not exist, create new- Returns:
- attachment
-
isAttachment
Do we have a Attachment of type- Parameters:
extension
- extension e.g. .pdf- Returns:
- true if there is a attachment of type
-
getAttachmentData
Get Attachment Data of type- Parameters:
extension
- extension e.g. .pdf- Returns:
- data or null
-
isPdfAttachment
public boolean isPdfAttachment()Do we have a PDF Attachment- Returns:
- true if there is a PDF attachment
-
getPdfAttachment
public byte[] getPdfAttachment()Get PDF Attachment Data- Returns:
- data or null
-
dump
public void dump()Dump where clause and column values -
dump
public void dump(int index) Dump column (index:columnName=oldValue (newValue))- Parameters:
index
- column index
-
getAllIDs
Get All IDs of Table. Used for listing of all recordsint[] IDs = PO.getAllIDs ("AD_PrintFont", null); for (int i = 0; i < IDs.length; i++) { pf = new MPrintFont(Env.getCtx(), IDs[i]); System.out.println(IDs[i] + " = " + pf.getFont()); }
- Parameters:
TableName
- table name (key column with _ID)WhereClause
- optional where clausetrxName
- transaction- Returns:
- array of IDs or null
-
getFindParameter
Get Find parameter. Convert to upper case and add % at the end- Parameters:
query
- in string- Returns:
- out string
-
get_xmlString
Get Object xml representation as string- Parameters:
xml
- optional string buffer- Returns:
- updated/new string buffer header is only added once
-
get_xmlDocument
Get XML Document representation- Parameters:
noComment
- do not add comment- Returns:
- XML document
-
setDoc
Set the accounting document associated to the PO - for use in POST ModelValidator- Parameters:
doc
- Document
-
setReplication
public void setReplication(boolean isFromReplication) -
isReplication
public boolean isReplication() -
getDoc
Set the accounting document associated to the PO - for use in POST ModelValidator- Returns:
- Doc Document
-
set_TrxName
PO.setTrxName - set given trxName to an array of POs As suggested by teo in [ 1854603 ] -
get_ValueAsInt
Get Integer Value- Parameters:
columnName
-- Returns:
- int value
-
get_ValueAsBoolean
Get value as Boolean- Parameters:
columnName
-- Returns:
- boolean value
-
getUUIDColumnName
- Returns:
- uuid column name
-
getUUIDColumnName
- Parameters:
tableName
-- Returns:
- uuid column name
-
clone
Deprecated.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
set_Attribute
set attribute value- Parameters:
attributeName
-value
-
-
get_Attribute
- Parameters:
attributeName
-- Returns:
- attribute value
-
get_Attributes
- Returns:
- map of attributes
-
makeImmutable
protected void makeImmutable()Turn on immutable check -
is_Immutable
public boolean is_Immutable()- Returns:
- true if PO is immutable, false otherwise
-
setCrossTenantSafe
public static void setCrossTenantSafe() -
clearCrossTenantSafe
public static void clearCrossTenantSafe() -
validForeignKeys
public boolean validForeignKeys()Validate Foreign keys for cross tenant to be called programmatically before saving in programs that can receive arbitrary values in IDs This is an expensive operation in terms of database, use it wisely TODO: there is huge room for performance improvement, for example: - caching the valid values found on foreign tables - caching the column ID of the foreign column - caching the systemAccess- Returns:
- true if all the foreign keys are valid
-
columnExists
Verify if a column exists- Parameters:
columnName
-throwException
- - must throw an exception when the column doesn't exist- Returns:
-
columnExists
Verify if a column exists- Parameters:
columnName
-- Returns:
- boolean
-