Search in sources :

Example 6 with X_AD_Reference

use of org.compiere.model.X_AD_Reference in project adempiere by adempiere.

the class TrifonTest method testMProductCreation.

public void testMProductCreation() {
    boolean singleCommit = true;
    MTable mTable = MTable.get(Env.getCtx(), MInvoice.Table_Name);
    System.out.println("XML presentation... is: " + mTable.get_xmlDocument(false));
    MColumn[] mcolumn = mTable.getColumns(true);
    for (int i = 0; i < mcolumn.length; i++) {
        System.out.println("Name............ is: " + mcolumn[i].getName());
        System.out.println("ColumnName...... is: " + mcolumn[i].getColumnName());
        System.out.println("Desc............ is: " + mcolumn[i].getDescription());
        System.out.println("Length.......... is: " + mcolumn[i].getFieldLength());
        System.out.println("Reference_ID.... is: " + mcolumn[i].getAD_Reference_ID());
        X_AD_Reference reference = new X_AD_Reference(Env.getCtx(), mcolumn[i].getAD_Reference_ID(), getTrxName());
        System.out.println("ReferenceName... is: " + reference.getName());
        System.out.println("..............................");
    }
    assertTrue(this.getClass().getName(), true);
}
Also used : MColumn(org.compiere.model.MColumn) MTable(org.compiere.model.MTable) X_AD_Reference(org.compiere.model.X_AD_Reference)

Aggregations

X_AD_Reference (org.compiere.model.X_AD_Reference)6 PreparedStatement (java.sql.PreparedStatement)3 ResultSet (java.sql.ResultSet)3 MColumn (org.compiere.model.MColumn)3 MTable (org.compiere.model.MTable)3 SQLException (java.sql.SQLException)2 POSaveFailedException (org.adempiere.pipo.exception.POSaveFailedException)2 MRefTable (org.compiere.model.MRefTable)2 DecimalFormat (java.text.DecimalFormat)1 ArrayList (java.util.ArrayList)1 Properties (java.util.Properties)1 QName (javax.xml.namespace.QName)1 DatabaseAccessException (org.adempiere.pipo.exception.DatabaseAccessException)1 XFireFault (org.codehaus.xfire.fault.XFireFault)1 I_AD_Reference (org.compiere.model.I_AD_Reference)1 MEntityType (org.compiere.model.MEntityType)1 MRole (org.compiere.model.MRole)1 MUser (org.compiere.model.MUser)1 X_AD_Val_Rule (org.compiere.model.X_AD_Val_Rule)1 Attributes (org.xml.sax.Attributes)1