📄 acctserverwork.java
字号:
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2002 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.acct;
/**
* Acct Work Queue Element
*
* @author Jorg Janke
* @version $Id: AcctServerWork.java,v 1.1 2002/11/17 00:51:49 jjanke Exp $
*/
class AcctServerWork
{
/**
* Constructor
* @param AD_Client_ID client
* @param AD_Table_ID table
*/
public AcctServerWork (int AD_Client_ID, int AD_Table_ID)
{
m_AD_Client_ID = AD_Client_ID;
m_AD_Table_ID = AD_Table_ID;
} // AcctServerWork
private int m_AD_Client_ID;
private int m_AD_Table_ID;
private int m_noRuns = 0;
private int m_noSleeps = 0;
private int m_noOK = 0;
private int m_noFAIL = 0;
private int m_noTotalOK = 0;
private int m_noTotalFAIL = 0;
/**
* Get AD_Client_ID
* @return AD_Client_ID
*/
public int get_AD_Client_ID()
{
return m_AD_Client_ID;
} // getAD_Client_ID
/**
* Get AD_Table_ID
* @return AD_Table_ID
*/
public int get_AD_Table_ID()
{
return m_AD_Table_ID;
} // getAD_Table_ID
/**
* Add new Run
*/
public void addRun()
{
m_noRuns++;
m_noOK = 0;
m_noFAIL = 0;
} // addRun
/**
* Add new Sleep
*/
public void addSleep()
{
m_noSleeps++;
} // addSleep
/**
* Add Post
* @param ok ok
*/
public void addPost (boolean ok)
{
if (ok)
{
m_noTotalOK++;
m_noOK++;
}
else
{
m_noTotalFAIL++;
m_noFAIL++;
}
} // addPost
/**
* Get Trx in run
* @return no OK trx
*/
public int getTrxInRun()
{
return m_noOK; // + m_noFAIL;
} // getTrxInRun
/**
* String Representation
* @return String rep
*/
public String toString()
{
return "AcctServerWork[AD_Client_ID=" + m_AD_Client_ID + ",AD_Table_ID=" + m_AD_Table_ID
+ " - Run#=" + m_noRuns + ",Sleep#=" + m_noSleeps
+ " - Last(OK=" + m_noOK + ",Fail=" + m_noFAIL + ")"
+ " - Total(OK=" + m_noTotalOK + ",Fail=" + m_noTotalFAIL + ")]";
} // toString
} // AcctServerWork
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -