MPPOrderBOM: organized imports, fix indentation, major cleanup

This commit is contained in:
teo_sarca 2008-08-13 07:28:14 +00:00
parent 2e27910d9b
commit 148d0ad69a
1 changed files with 6 additions and 76 deletions

View File

@ -16,18 +16,11 @@
//package org.compiere.mfg.model;
package org.eevolution.model;
import java.util.*;
import java.sql.*;
import java.math.*;
import org.compiere.util.*;
import org.compiere.model.*;
import java.sql.ResultSet;
import java.util.Properties;
/**
* Order Model.
* Please do not set DocStatus and C_DocType_ID directly.
* They are set in the process() method.
* Use DocAction and C_DocTypeTarget_ID instead.
* Order BOM Model.
*
* @author Victor Perez www.e-evolution.com
* @version $Id: MOrder.java,v 1.40 2004/04/13 04:19:30 vpj-cd Exp $
@ -49,9 +42,6 @@ public class MPPOrderBOM extends X_PP_Order_BOM
}
} // MOrder
/**
* Load Constructor
* @param ctx context
@ -59,27 +49,9 @@ public class MPPOrderBOM extends X_PP_Order_BOM
*/
public MPPOrderBOM(Properties ctx, ResultSet rs,String trxName)
{
super (ctx, rs,trxName);
super (ctx, rs, trxName);
} // MOrder
/**
* Overwrite Client/Org if required
* @param AD_Client_ID client
* @param AD_Org_ID org
*/
public void setClientOrg (int AD_Client_ID, int AD_Org_ID)
{
super.setClientOrg(AD_Client_ID, AD_Org_ID);
} // setClientOrg
/*************************************************************************/
/**
* String Representation
* @return info
@ -87,50 +59,8 @@ public class MPPOrderBOM extends X_PP_Order_BOM
public String toString ()
{
StringBuffer sb = new StringBuffer ("MPPOrderBOM[")
.append(get_ID()).append("-").append(getDocumentNo())
.append ("]");
.append(get_ID()).append("-").append(getDocumentNo())
.append ("]");
return sb.toString ();
} // toString
/**************************************************************************
* Get Invoices of Order
* @return invoices
*/
public MPPOrderBOMLine[] getLines()
{
return getLines (getPP_Order_BOM_ID());
} // getLines
/**
* Get Invoices of Order
* @param C_Order_ID id
* @return invoices
*/
public MPPOrderBOMLine[] getLines (int PP_Order_ID)
{
ArrayList list = new ArrayList();
QueryDB query = new QueryDB("org.compiere.model.X_PP_Order_BOMLine");
String filter = "PP_Order_ID = " + PP_Order_ID;
List results = query.execute(filter);
Iterator select = results.iterator();
while (select.hasNext())
{
X_PP_Order_BOMLine bomline = (X_PP_Order_BOMLine) select.next();
System.out.println("linea de product bom2 ************ " + bomline.getPP_Order_BOMLine_ID());
list.add(new MPPOrderBOMLine(getCtx(), bomline.getPP_Order_BOM_ID(),"PP_Order_BOM_Line"));
//list.add(bomline);
}
MPPOrderBOMLine[] retValue = new MPPOrderBOMLine[list.size()];
list.toArray(retValue);
return retValue;
} // getLines
} // MOrder