IDEMPIERE-2981 Implement JSON Field type - generate model for Test (#2402)

This commit is contained in:
Carlos Ruiz 2024-06-20 18:52:27 +02:00
parent 0641e614c2
commit b28edf2be1
2 changed files with 204 additions and 207 deletions

View File

@ -41,22 +41,11 @@ public interface I_Test
/** Load Meta Data */ /** Load Meta Data */
/** Column name Account_Acct */
public static final String COLUMNNAME_Account_Acct = "Account_Acct";
/** Set Account_Acct */
public void setAccount_Acct (int Account_Acct);
/** Get Account_Acct */
public int getAccount_Acct();
public I_C_ValidCombination getAccount_A() throws RuntimeException;
/** Column name AD_Client_ID */ /** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client. /** Get Tenant.
* Client/Tenant for this installation. * Tenant for this installation.
*/ */
public int getAD_Client_ID(); public int getAD_Client_ID();
@ -64,12 +53,12 @@ public interface I_Test
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization. /** Set Organization.
* Organizational entity within client * Organizational entity within tenant
*/ */
public void setAD_Org_ID (int AD_Org_ID); public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization. /** Get Organization.
* Organizational entity within client * Organizational entity within tenant
*/ */
public int getAD_Org_ID(); public int getAD_Org_ID();
@ -88,18 +77,29 @@ public interface I_Test
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException; public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException;
/** Column name Account_Acct */
public static final String COLUMNNAME_Account_Acct = "Account_Acct";
/** Set Account_Acct */
public void setAccount_Acct (int Account_Acct);
/** Get Account_Acct */
public int getAccount_Acct();
public I_C_ValidCombination getAccount_A() throws RuntimeException;
/** Column name BinaryData */ /** Column name BinaryData */
public static final String COLUMNNAME_BinaryData = "BinaryData"; public static final String COLUMNNAME_BinaryData = "BinaryData";
/** Set Binary Data. /** Set Binary Data.
* Binary Data * Binary Data
*/ */
public void setBinaryData (int BinaryData); public void setBinaryData (byte[] BinaryData);
/** Get Binary Data. /** Get Binary Data.
* Binary Data * Binary Data
*/ */
public int getBinaryData(); public byte[] getBinaryData();
/** Column name C_BPartner_ID */ /** Column name C_BPartner_ID */
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
@ -131,19 +131,6 @@ public interface I_Test
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException; public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException;
/** Column name CharacterData */
public static final String COLUMNNAME_CharacterData = "CharacterData";
/** Set Character Data.
* Long Character Field
*/
public void setCharacterData (String CharacterData);
/** Get Character Data.
* Long Character Field
*/
public String getCharacterData();
/** Column name C_Location_ID */ /** Column name C_Location_ID */
public static final String COLUMNNAME_C_Location_ID = "C_Location_ID"; public static final String COLUMNNAME_C_Location_ID = "C_Location_ID";
@ -159,15 +146,6 @@ public interface I_Test
public I_C_Location getC_Location() throws RuntimeException; public I_C_Location getC_Location() throws RuntimeException;
/** Column name Color */
public static final String COLUMNNAME_Color = "Color";
/** Set Color */
public void setColor (String Color);
/** Get Color */
public String getColor();
/** Column name C_Payment_ID */ /** Column name C_Payment_ID */
public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID"; public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID";
@ -183,6 +161,43 @@ public interface I_Test
public org.compiere.model.I_C_Payment getC_Payment() throws RuntimeException; public org.compiere.model.I_C_Payment getC_Payment() throws RuntimeException;
/** Column name C_UOM_ID */
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
/** Set UOM.
* Unit of Measure
*/
public void setC_UOM_ID (int C_UOM_ID);
/** Get UOM.
* Unit of Measure
*/
public int getC_UOM_ID();
public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException;
/** Column name CharacterData */
public static final String COLUMNNAME_CharacterData = "CharacterData";
/** Set Character Data.
* Long Character Field
*/
public void setCharacterData (String CharacterData);
/** Get Character Data.
* Long Character Field
*/
public String getCharacterData();
/** Column name Color */
public static final String COLUMNNAME_Color = "Color";
/** Set Color */
public void setColor (String Color);
/** Get Color */
public String getColor();
/** Column name Created */ /** Column name Created */
public static final String COLUMNNAME_Created = "Created"; public static final String COLUMNNAME_Created = "Created";
@ -199,21 +214,6 @@ public interface I_Test
*/ */
public int getCreatedBy(); public int getCreatedBy();
/** Column name C_UOM_ID */
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
/** Set UOM.
* Unit of Measure
*/
public void setC_UOM_ID (int C_UOM_ID);
/** Get UOM.
* Unit of Measure
*/
public int getC_UOM_ID();
public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException;
/** Column name Description */ /** Column name Description */
public static final String COLUMNNAME_Description = "Description"; public static final String COLUMNNAME_Description = "Description";
@ -259,12 +259,12 @@ public interface I_Test
/** Set JSON Data. /** Set JSON Data.
* The json field stores json data. * The json field stores json data.
*/ */
public void setJsonData (Object JsonData); public void setJsonData (String JsonData);
/** Get JSON Data. /** Get JSON Data.
* The json field stores json data. * The json field stores json data.
*/ */
public Object getJsonData(); public String getJsonData();
/** Column name M_Locator_ID */ /** Column name M_Locator_ID */
public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID"; public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID";
@ -380,37 +380,6 @@ public interface I_Test
/** Get DateTime */ /** Get DateTime */
public Timestamp getT_DateTime(); public Timestamp getT_DateTime();
/** Column name Test_ID */
public static final String COLUMNNAME_Test_ID = "Test_ID";
/** Set Test ID */
public void setTest_ID (int Test_ID);
/** Get Test ID */
public int getTest_ID();
/** Column name Test_UU */
public static final String COLUMNNAME_Test_UU = "Test_UU";
/** Set Test_UU */
public void setTest_UU (String Test_UU);
/** Get Test_UU */
public String getTest_UU();
/** Column name TestVirtualQty */
public static final String COLUMNNAME_TestVirtualQty = "TestVirtualQty";
/** Set Virtual Quantity.
* Used only for testing purposes
*/
public void setTestVirtualQty (BigDecimal TestVirtualQty);
/** Get Virtual Quantity.
* Used only for testing purposes
*/
public BigDecimal getTestVirtualQty();
/** Column name T_Integer */ /** Column name T_Integer */
public static final String COLUMNNAME_T_Integer = "T_Integer"; public static final String COLUMNNAME_T_Integer = "T_Integer";
@ -451,6 +420,37 @@ public interface I_Test
*/ */
public Timestamp getT_Timestamp(); public Timestamp getT_Timestamp();
/** Column name TestVirtualQty */
public static final String COLUMNNAME_TestVirtualQty = "TestVirtualQty";
/** Set Virtual Quantity.
* Used only for testing purposes
*/
public void setTestVirtualQty (BigDecimal TestVirtualQty);
/** Get Virtual Quantity.
* Used only for testing purposes
*/
public BigDecimal getTestVirtualQty();
/** Column name Test_ID */
public static final String COLUMNNAME_Test_ID = "Test_ID";
/** Set Test ID */
public void setTest_ID (int Test_ID);
/** Get Test ID */
public int getTest_ID();
/** Column name Test_UU */
public static final String COLUMNNAME_Test_UU = "Test_UU";
/** Set Test_UU */
public void setTest_UU (String Test_UU);
/** Get Test_UU */
public String getTest_UU();
/** Column name Updated */ /** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated"; public static final String COLUMNNAME_Updated = "Updated";

View File

@ -34,7 +34,7 @@ public class X_Test extends PO implements I_Test, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20240226L; private static final long serialVersionUID = 20240620L;
/** Standard Constructor */ /** Standard Constructor */
public X_Test (Properties ctx, int Test_ID, String trxName) public X_Test (Properties ctx, int Test_ID, String trxName)
@ -108,30 +108,6 @@ public class X_Test extends PO implements I_Test, I_Persistent
return sb.toString(); return sb.toString();
} }
public I_C_ValidCombination getAccount_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_ID)
.getPO(getAccount_Acct(), get_TrxName());
}
/** Set Account_Acct.
@param Account_Acct Account_Acct
*/
public void setAccount_Acct (int Account_Acct)
{
set_Value (COLUMNNAME_Account_Acct, Integer.valueOf(Account_Acct));
}
/** Get Account_Acct.
@return Account_Acct */
public int getAccount_Acct()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Account_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException
{ {
return (org.compiere.model.I_AD_Table)MTable.get(getCtx(), org.compiere.model.I_AD_Table.Table_ID) return (org.compiere.model.I_AD_Table)MTable.get(getCtx(), org.compiere.model.I_AD_Table.Table_ID)
@ -160,23 +136,44 @@ public class X_Test extends PO implements I_Test, I_Persistent
return ii.intValue(); return ii.intValue();
} }
public I_C_ValidCombination getAccount_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_ID)
.getPO(getAccount_Acct(), get_TrxName());
}
/** Set Account_Acct.
@param Account_Acct Account_Acct
*/
public void setAccount_Acct (int Account_Acct)
{
set_Value (COLUMNNAME_Account_Acct, Integer.valueOf(Account_Acct));
}
/** Get Account_Acct.
@return Account_Acct */
public int getAccount_Acct()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Account_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Binary Data. /** Set Binary Data.
@param BinaryData Binary Data @param BinaryData Binary Data
*/ */
public void setBinaryData (int BinaryData) public void setBinaryData (byte[] BinaryData)
{ {
set_Value (COLUMNNAME_BinaryData, Integer.valueOf(BinaryData)); set_Value (COLUMNNAME_BinaryData, BinaryData);
} }
/** Get Binary Data. /** Get Binary Data.
@return Binary Data @return Binary Data
*/ */
public int getBinaryData() public byte[] getBinaryData()
{ {
Integer ii = (Integer)get_Value(COLUMNNAME_BinaryData); return (byte[])get_Value(COLUMNNAME_BinaryData);
if (ii == null)
return 0;
return ii.intValue();
} }
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
@ -235,22 +232,6 @@ public class X_Test extends PO implements I_Test, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** Set Character Data.
@param CharacterData Long Character Field
*/
public void setCharacterData (String CharacterData)
{
set_Value (COLUMNNAME_CharacterData, CharacterData);
}
/** Get Character Data.
@return Long Character Field
*/
public String getCharacterData()
{
return (String)get_Value(COLUMNNAME_CharacterData);
}
public I_C_Location getC_Location() throws RuntimeException public I_C_Location getC_Location() throws RuntimeException
{ {
return (I_C_Location)MTable.get(getCtx(), I_C_Location.Table_ID) return (I_C_Location)MTable.get(getCtx(), I_C_Location.Table_ID)
@ -279,21 +260,6 @@ public class X_Test extends PO implements I_Test, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** Set Color.
@param Color Color
*/
public void setColor (String Color)
{
set_Value (COLUMNNAME_Color, Color);
}
/** Get Color.
@return Color */
public String getColor()
{
return (String)get_Value(COLUMNNAME_Color);
}
public org.compiere.model.I_C_Payment getC_Payment() throws RuntimeException public org.compiere.model.I_C_Payment getC_Payment() throws RuntimeException
{ {
return (org.compiere.model.I_C_Payment)MTable.get(getCtx(), org.compiere.model.I_C_Payment.Table_ID) return (org.compiere.model.I_C_Payment)MTable.get(getCtx(), org.compiere.model.I_C_Payment.Table_ID)
@ -350,6 +316,37 @@ public class X_Test extends PO implements I_Test, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** Set Character Data.
@param CharacterData Long Character Field
*/
public void setCharacterData (String CharacterData)
{
set_Value (COLUMNNAME_CharacterData, CharacterData);
}
/** Get Character Data.
@return Long Character Field
*/
public String getCharacterData()
{
return (String)get_Value(COLUMNNAME_CharacterData);
}
/** Set Color.
@param Color Color
*/
public void setColor (String Color)
{
set_Value (COLUMNNAME_Color, Color);
}
/** Get Color.
@return Color */
public String getColor()
{
return (String)get_Value(COLUMNNAME_Color);
}
/** Set Description. /** Set Description.
@param Description Optional short description of the record @param Description Optional short description of the record
*/ */
@ -385,7 +382,7 @@ public class X_Test extends PO implements I_Test, I_Persistent
/** Set JSON Data. /** Set JSON Data.
@param JsonData The json field stores json data. @param JsonData The json field stores json data.
*/ */
public void setJsonData (Object JsonData) public void setJsonData (String JsonData)
{ {
set_Value (COLUMNNAME_JsonData, JsonData); set_Value (COLUMNNAME_JsonData, JsonData);
} }
@ -393,9 +390,9 @@ public class X_Test extends PO implements I_Test, I_Persistent
/** Get JSON Data. /** Get JSON Data.
@return The json field stores json data. @return The json field stores json data.
*/ */
public Object getJsonData() public String getJsonData()
{ {
return get_Value(COLUMNNAME_JsonData); return (String)get_Value(COLUMNNAME_JsonData);
} }
public I_M_Locator getM_Locator() throws RuntimeException public I_M_Locator getM_Locator() throws RuntimeException
@ -608,60 +605,6 @@ public class X_Test extends PO implements I_Test, I_Persistent
return (Timestamp)get_Value(COLUMNNAME_T_DateTime); return (Timestamp)get_Value(COLUMNNAME_T_DateTime);
} }
/** Set Test ID.
@param Test_ID Test ID
*/
public void setTest_ID (int Test_ID)
{
if (Test_ID < 1)
set_ValueNoCheck (COLUMNNAME_Test_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Test_ID, Integer.valueOf(Test_ID));
}
/** Get Test ID.
@return Test ID */
public int getTest_ID()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Test_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Test_UU.
@param Test_UU Test_UU
*/
public void setTest_UU (String Test_UU)
{
set_Value (COLUMNNAME_Test_UU, Test_UU);
}
/** Get Test_UU.
@return Test_UU */
public String getTest_UU()
{
return (String)get_Value(COLUMNNAME_Test_UU);
}
/** Set Virtual Quantity.
@param TestVirtualQty Used only for testing purposes
*/
public void setTestVirtualQty (BigDecimal TestVirtualQty)
{
throw new IllegalArgumentException ("TestVirtualQty is virtual column"); }
/** Get Virtual Quantity.
@return Used only for testing purposes
*/
public BigDecimal getTestVirtualQty()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TestVirtualQty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Integer. /** Set Integer.
@param T_Integer Integer @param T_Integer Integer
*/ */
@ -731,4 +674,58 @@ public class X_Test extends PO implements I_Test, I_Persistent
{ {
return (Timestamp)get_Value(COLUMNNAME_T_Timestamp); return (Timestamp)get_Value(COLUMNNAME_T_Timestamp);
} }
/** Set Virtual Quantity.
@param TestVirtualQty Used only for testing purposes
*/
public void setTestVirtualQty (BigDecimal TestVirtualQty)
{
throw new IllegalArgumentException ("TestVirtualQty is virtual column"); }
/** Get Virtual Quantity.
@return Used only for testing purposes
*/
public BigDecimal getTestVirtualQty()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TestVirtualQty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Test ID.
@param Test_ID Test ID
*/
public void setTest_ID (int Test_ID)
{
if (Test_ID < 1)
set_ValueNoCheck (COLUMNNAME_Test_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Test_ID, Integer.valueOf(Test_ID));
}
/** Get Test ID.
@return Test ID */
public int getTest_ID()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Test_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Test_UU.
@param Test_UU Test_UU
*/
public void setTest_UU (String Test_UU)
{
set_Value (COLUMNNAME_Test_UU, Test_UU);
}
/** Get Test_UU.
@return Test_UU */
public String getTest_UU()
{
return (String)get_Value(COLUMNNAME_Test_UU);
}
} }