예제 #1
0
  /**
   * Parent constructor
   *
   * @param parent
   * @param asi
   * @param qty
   * @param ctx
   * @param trxName
   */
  public MProductionLineMA(MProductionLine parent, int asi, BigDecimal qty) {

    super(parent.getCtx(), 0, parent.get_TrxName());
    setM_AttributeSetInstance_ID(asi);
    setM_ProductionLine_ID(parent.get_ID());
    setMovementQty(qty);
  }
예제 #2
0
  public static MProductionLineMA get(MProductionLine parent, int asi) {

    String where = " M_ProductionLine_ID = ? AND M_AttributeSetInstance_ID = ? ";

    MProductionLineMA lineMA =
        MTable.get(parent.getCtx(), MProductionLineMA.Table_Name)
            .createQuery(where, parent.get_TrxName())
            .setParameters(parent.getM_ProductionLine_ID(), asi)
            .firstOnly();

    if (lineMA != null) return lineMA;
    else return new MProductionLineMA(parent, asi, Env.ZERO);
  }