Package org.adempiere.model
Class POWrapper
java.lang.Object
org.adempiere.model.POWrapper
- All Implemented Interfaces:
InvocationHandler
Wrap a PO object to a given interface.
Example usage:
Example usage:
public interface I_C_Invoice_Customized { public int getCustomValue1(); public void setCustomValue1(int customValue1); public String getCustomString1(); public void setCustomString1(String customString1); } .... MInvoice invoice = ......; I_C_Invoice_Customized invoiceCustomized = POWrapper.create(invoice, I_C_Invoice_Customized.class); invoiceCustomized.setCustomValue1(12345); invoiceCustomized.setCustomString1("my test string"); invoice.saveEx();
- Author:
- Teo Sarca, teo.sarca@gmail.com
-
Method Summary
-
Method Details
-
create
Create wrapper of type cl for po- Type Parameters:
T
- iDempiere model interface type- Parameters:
po
-cl
- iDempiere model interface class- Returns:
- wrapped instance
-
getPO
Get wrapped PO instance- Type Parameters:
T
-- Parameters:
model
-- Returns:
- the wrapped PO
-
invoke
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
getPO
- Returns:
- wrapped PO instance
-