X_GL_DistributionLine.java
| Index Score | ||
|---|---|---|
![]() |
![]() |
org.compiere.model |
![]() |
![]() |
Compiere |
View: Reasons, Metrics, Source Code
These are the metrics that contribute to the Enerjy Score for this file, ranked by impact. So the metrics listed at the top influence the score to a greater extent that the metrics listed at the bottom.
/******************************************************************************
* Product: Compiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 3600 Bridge Parkway #102, Redwood City, CA 94065, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.sql.*;
import java.math.*;
import org.compiere.framework.*;
import org.compiere.util.*;
/** Generated Model for GL_DistributionLine
* @author Jorg Janke (generated)
* @version Release 3.1.0 - $Id$ */
public class X_GL_DistributionLine extends PO
{
/** Standard Constructor
@param ctx context
@param GL_DistributionLine_ID id
@param trxName transaction
*/
public X_GL_DistributionLine (Ctx ctx, int GL_DistributionLine_ID, String trxName)
{
super (ctx, GL_DistributionLine_ID, trxName);
/** if (GL_DistributionLine_ID == 0)
{
setGL_DistributionLine_ID (0);
setGL_Distribution_ID (0);
setLine (0); // @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM GL_DistributionLine WHERE GL_Distribution_ID=@GL_Distribution_ID@
setOverwriteAcct (false);
setOverwriteActivity (false);
setOverwriteBPartner (false);
setOverwriteCampaign (false);
setOverwriteLocFrom (false);
setOverwriteLocTo (false);
setOverwriteOrg (false);
setOverwriteOrgTrx (false);
setOverwriteProduct (false);
setOverwriteProject (false);
setOverwriteSalesRegion (false);
setOverwriteUser1 (false);
setOverwriteUser2 (false);
setPercentDistribution (Env.ZERO);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_GL_DistributionLine (Ctx ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** Serial Version No */
static final long serialVersionUID = 27495261242789L;
/** Last Updated Timestamp 2008-06-10 15:12:06.0 */
public static final long updatedMS = 1213135926000L;
/** AD_Table_ID=707 */
public static final int Table_ID=707;
/** TableName=GL_DistributionLine */
public static final String Table_Name="GL_DistributionLine";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"GL_DistributionLine");
protected BigDecimal accessLevel = new BigDecimal(2);
/** AccessLevel
@return 2 - Client
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Ctx ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_GL_DistributionLine[").append(get_ID()).append("]");
return sb.toString();
}
/** AD_OrgTrx_ID AD_Reference_ID=130 */
public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
/** Set Trx Organization.
@param AD_OrgTrx_ID Performing or initiating organization */
public void setAD_OrgTrx_ID (int AD_OrgTrx_ID)
{
if (AD_OrgTrx_ID <= 0) set_Value ("AD_OrgTrx_ID", null);
else
set_Value ("AD_OrgTrx_ID", new Integer(AD_OrgTrx_ID));
}
/** Get Trx Organization.
@return Performing or initiating organization */
public int getAD_OrgTrx_ID()
{
Integer ii = (Integer)get_Value("AD_OrgTrx_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Account_ID AD_Reference_ID=132 */
public static final int ACCOUNT_ID_AD_Reference_ID=132;
/** Set Account.
@param Account_ID Account used */
public void setAccount_ID (int Account_ID)
{
if (Account_ID <= 0) set_Value ("Account_ID", null);
else
set_Value ("Account_ID", new Integer(Account_ID));
}
/** Get Account.
@return Account used */
public int getAccount_ID()
{
Integer ii = (Integer)get_Value("Account_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Activity.
@param C_Activity_ID Business Activity */
public void setC_Activity_ID (int C_Activity_ID)
{
if (C_Activity_ID <= 0) set_Value ("C_Activity_ID", null);
else
set_Value ("C_Activity_ID", new Integer(C_Activity_ID));
}
/** Get Activity.
@return Business Activity */
public int getC_Activity_ID()
{
Integer ii = (Integer)get_Value("C_Activity_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Business Partner.
@param C_BPartner_ID Identifies a Business Partner */
public void setC_BPartner_ID (int C_BPartner_ID)
{
if (C_BPartner_ID <= 0) set_Value ("C_BPartner_ID", null);
else
set_Value ("C_BPartner_ID", new Integer(C_BPartner_ID));
}
/** Get Business Partner.
@return Identifies a Business Partner */
public int getC_BPartner_ID()
{
Integer ii = (Integer)get_Value("C_BPartner_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Campaign.
@param C_Campaign_ID Marketing Campaign */
public void setC_Campaign_ID (int C_Campaign_ID)
{
if (C_Campaign_ID <= 0) set_Value ("C_Campaign_ID", null);
else
set_Value ("C_Campaign_ID", new Integer(C_Campaign_ID));
}
/** Get Campaign.
@return Marketing Campaign */
public int getC_Campaign_ID()
{
Integer ii = (Integer)get_Value("C_Campaign_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** C_LocFrom_ID AD_Reference_ID=133 */
public static final int C_LOCFROM_ID_AD_Reference_ID=133;
/** Set Location From.
@param C_LocFrom_ID Location that inventory was moved from */
public void setC_LocFrom_ID (int C_LocFrom_ID)
{
if (C_LocFrom_ID <= 0) set_Value ("C_LocFrom_ID", null);
else
set_Value ("C_LocFrom_ID", new Integer(C_LocFrom_ID));
}
/** Get Location From.
@return Location that inventory was moved from */
public int getC_LocFrom_ID()
{
Integer ii = (Integer)get_Value("C_LocFrom_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** C_LocTo_ID AD_Reference_ID=133 */
public static final int C_LOCTO_ID_AD_Reference_ID=133;
/** Set Location To.
@param C_LocTo_ID Location that inventory was moved to */
public void setC_LocTo_ID (int C_LocTo_ID)
{
if (C_LocTo_ID <= 0) set_Value ("C_LocTo_ID", null);
else
set_Value ("C_LocTo_ID", new Integer(C_LocTo_ID));
}
/** Get Location To.
@return Location that inventory was moved to */
public int getC_LocTo_ID()
{
Integer ii = (Integer)get_Value("C_LocTo_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Project.
@param C_Project_ID Financial Project */
public void setC_Project_ID (int C_Project_ID)
{
if (C_Project_ID <= 0) set_Value ("C_Project_ID", null);
else
set_Value ("C_Project_ID", new Integer(C_Project_ID));
}
/** Get Project.
@return Financial Project */
public int getC_Project_ID()
{
Integer ii = (Integer)get_Value("C_Project_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Sales Region.
@param C_SalesRegion_ID Sales coverage region */
public void setC_SalesRegion_ID (int C_SalesRegion_ID)
{
if (C_SalesRegion_ID <= 0) set_Value ("C_SalesRegion_ID", null);
else
set_Value ("C_SalesRegion_ID", new Integer(C_SalesRegion_ID));
}
/** Get Sales Region.
@return Sales coverage region */
public int getC_SalesRegion_ID()
{
Integer ii = (Integer)get_Value("C_SalesRegion_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
int length = p_info.getFieldLength("Description");
if (Description != null && Description.length() > length)
{
log.warning("Length > " + length + " - truncated");
Description = Description.substring(0,length);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription()
{
return (String)get_Value("Description");
}
/** Set GL Distribution Line.
@param GL_DistributionLine_ID General Ledger Distribution Line */
public void setGL_DistributionLine_ID (int GL_DistributionLine_ID)
{
if (GL_DistributionLine_ID < 1) throw new IllegalArgumentException ("GL_DistributionLine_ID is mandatory.");
set_ValueNoCheck ("GL_DistributionLine_ID", new Integer(GL_DistributionLine_ID));
}
/** Get GL Distribution Line.
@return General Ledger Distribution Line */
public int getGL_DistributionLine_ID()
{
Integer ii = (Integer)get_Value("GL_DistributionLine_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set GL Distribution.
@param GL_Distribution_ID General Ledger Distribution */
public void setGL_Distribution_ID (int GL_Distribution_ID)
{
if (GL_Distribution_ID < 1) throw new IllegalArgumentException ("GL_Distribution_ID is mandatory.");
set_ValueNoCheck ("GL_Distribution_ID", new Integer(GL_Distribution_ID));
}
/** Get GL Distribution.
@return General Ledger Distribution */
public int getGL_Distribution_ID()
{
Integer ii = (Integer)get_Value("GL_Distribution_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Line No.
@param Line Unique line for this document */
public void setLine (int Line)
{
set_Value ("Line", new Integer(Line));
}
/** Get Line No.
@return Unique line for this document */
public int getLine()
{
Integer ii = (Integer)get_Value("Line");
if (ii == null) return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair */
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getLine()));
}
/** Set Product.
@param M_Product_ID Product, Service, Item */
public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID <= 0) set_Value ("M_Product_ID", null);
else
set_Value ("M_Product_ID", new Integer(M_Product_ID));
}
/** Get Product.
@return Product, Service, Item */
public int getM_Product_ID()
{
Integer ii = (Integer)get_Value("M_Product_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Org_ID AD_Reference_ID=130 */
public static final int ORG_ID_AD_Reference_ID=130;
/** Set Organization.
@param Org_ID Organizational entity within client */
public void setOrg_ID (int Org_ID)
{
if (Org_ID <= 0) set_Value ("Org_ID", null);
else
set_Value ("Org_ID", new Integer(Org_ID));
}
/** Get Organization.
@return Organizational entity within client */
public int getOrg_ID()
{
Integer ii = (Integer)get_Value("Org_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Overwrite Account.
@param OverwriteAcct Overwrite the account segment Account with the value specified */
public void setOverwriteAcct (boolean OverwriteAcct)
{
set_Value ("OverwriteAcct", new Boolean(OverwriteAcct));
}
/** Get Overwrite Account.
@return Overwrite the account segment Account with the value specified */
public boolean isOverwriteAcct()
{
Object oo = get_Value("OverwriteAcct");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Activity.
@param OverwriteActivity Overwrite the account segment Activity with the value specified */
public void setOverwriteActivity (boolean OverwriteActivity)
{
set_Value ("OverwriteActivity", new Boolean(OverwriteActivity));
}
/** Get Overwrite Activity.
@return Overwrite the account segment Activity with the value specified */
public boolean isOverwriteActivity()
{
Object oo = get_Value("OverwriteActivity");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Bus.Partner.
@param OverwriteBPartner Overwrite the account segment Business Partner with the value specified */
public void setOverwriteBPartner (boolean OverwriteBPartner)
{
set_Value ("OverwriteBPartner", new Boolean(OverwriteBPartner));
}
/** Get Overwrite Bus.Partner.
@return Overwrite the account segment Business Partner with the value specified */
public boolean isOverwriteBPartner()
{
Object oo = get_Value("OverwriteBPartner");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Campaign.
@param OverwriteCampaign Overwrite the account segment Campaign with the value specified */
public void setOverwriteCampaign (boolean OverwriteCampaign)
{
set_Value ("OverwriteCampaign", new Boolean(OverwriteCampaign));
}
/** Get Overwrite Campaign.
@return Overwrite the account segment Campaign with the value specified */
public boolean isOverwriteCampaign()
{
Object oo = get_Value("OverwriteCampaign");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Location From.
@param OverwriteLocFrom Overwrite the account segment Location From with the value specified */
public void setOverwriteLocFrom (boolean OverwriteLocFrom)
{
set_Value ("OverwriteLocFrom", new Boolean(OverwriteLocFrom));
}
/** Get Overwrite Location From.
@return Overwrite the account segment Location From with the value specified */
public boolean isOverwriteLocFrom()
{
Object oo = get_Value("OverwriteLocFrom");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Location To.
@param OverwriteLocTo Overwrite the account segment Location From with the value specified */
public void setOverwriteLocTo (boolean OverwriteLocTo)
{
set_Value ("OverwriteLocTo", new Boolean(OverwriteLocTo));
}
/** Get Overwrite Location To.
@return Overwrite the account segment Location From with the value specified */
public boolean isOverwriteLocTo()
{
Object oo = get_Value("OverwriteLocTo");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Organization.
@param OverwriteOrg Overwrite the account segment Organization with the value specified */
public void setOverwriteOrg (boolean OverwriteOrg)
{
set_Value ("OverwriteOrg", new Boolean(OverwriteOrg));
}
/** Get Overwrite Organization.
@return Overwrite the account segment Organization with the value specified */
public boolean isOverwriteOrg()
{
Object oo = get_Value("OverwriteOrg");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Trx Organization.
@param OverwriteOrgTrx Overwrite the account segment Transaction Organization with the value specified */
public void setOverwriteOrgTrx (boolean OverwriteOrgTrx)
{
set_Value ("OverwriteOrgTrx", new Boolean(OverwriteOrgTrx));
}
/** Get Overwrite Trx Organization.
@return Overwrite the account segment Transaction Organization with the value specified */
public boolean isOverwriteOrgTrx()
{
Object oo = get_Value("OverwriteOrgTrx");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Product.
@param OverwriteProduct Overwrite the account segment Product with the value specified */
public void setOverwriteProduct (boolean OverwriteProduct)
{
set_Value ("OverwriteProduct", new Boolean(OverwriteProduct));
}
/** Get Overwrite Product.
@return Overwrite the account segment Product with the value specified */
public boolean isOverwriteProduct()
{
Object oo = get_Value("OverwriteProduct");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Project.
@param OverwriteProject Overwrite the account segment Project with the value specified */
public void setOverwriteProject (boolean OverwriteProject)
{
set_Value ("OverwriteProject", new Boolean(OverwriteProject));
}
/** Get Overwrite Project.
@return Overwrite the account segment Project with the value specified */
public boolean isOverwriteProject()
{
Object oo = get_Value("OverwriteProject");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Sales Region.
@param OverwriteSalesRegion Overwrite the account segment Sales Region with the value specified */
public void setOverwriteSalesRegion (boolean OverwriteSalesRegion)
{
set_Value ("OverwriteSalesRegion", new Boolean(OverwriteSalesRegion));
}
/** Get Overwrite Sales Region.
@return Overwrite the account segment Sales Region with the value specified */
public boolean isOverwriteSalesRegion()
{
Object oo = get_Value("OverwriteSalesRegion");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite User1.
@param OverwriteUser1 Overwrite the account segment User 1 with the value specified */
public void setOverwriteUser1 (boolean OverwriteUser1)
{
set_Value ("OverwriteUser1", new Boolean(OverwriteUser1));
}
/** Get Overwrite User1.
@return Overwrite the account segment User 1 with the value specified */
public boolean isOverwriteUser1()
{
Object oo = get_Value("OverwriteUser1");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite User2.
@param OverwriteUser2 Overwrite the account segment User 2 with the value specified */
public void setOverwriteUser2 (boolean OverwriteUser2)
{
set_Value ("OverwriteUser2", new Boolean(OverwriteUser2));
}
/** Get Overwrite User2.
@return Overwrite the account segment User 2 with the value specified */
public boolean isOverwriteUser2()
{
Object oo = get_Value("OverwriteUser2");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Percent.
@param PercentDistribution Percentage to be distributed */
public void setPercentDistribution (BigDecimal PercentDistribution)
{
if (PercentDistribution == null) throw new IllegalArgumentException ("PercentDistribution is mandatory.");
set_Value ("PercentDistribution", PercentDistribution);
}
/** Get Percent.
@return Percentage to be distributed */
public BigDecimal getPercentDistribution()
{
BigDecimal bd = (BigDecimal)get_Value("PercentDistribution");
if (bd == null) return Env.ZERO;
return bd;
}
/** User1_ID AD_Reference_ID=134 */
public static final int USER1_ID_AD_Reference_ID=134;
/** Set User List 1.
@param User1_ID User defined list element #1 */
public void setUser1_ID (int User1_ID)
{
if (User1_ID <= 0) set_Value ("User1_ID", null);
else
set_Value ("User1_ID", new Integer(User1_ID));
}
/** Get User List 1.
@return User defined list element #1 */
public int getUser1_ID()
{
Integer ii = (Integer)get_Value("User1_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** User2_ID AD_Reference_ID=137 */
public static final int USER2_ID_AD_Reference_ID=137;
/** Set User List 2.
@param User2_ID User defined list element #2 */
public void setUser2_ID (int User2_ID)
{
if (User2_ID <= 0) set_Value ("User2_ID", null);
else
set_Value ("User2_ID", new Integer(User2_ID));
}
/** Get User List 2.
@return User defined list element #2 */
public int getUser2_ID()
{
Integer ii = (Integer)get_Value("User2_ID");
if (ii == null) return 0;
return ii.intValue();
}
}
The table below shows all metrics for X_GL_DistributionLine.java.




