📄 mpaymentprocessor.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 Smart Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.util.*;
import java.sql.*;
import java.math.*;
import java.io.Serializable;
import org.compiere.util.*;
/**
* Payment Processor Model
*
* @author Jorg Janke
* @version $Id: MPaymentProcessor.java,v 1.2 2003/04/18 05:56:36 jjanke Exp $
*/
public class MPaymentProcessor
extends PO
{
/**
* Payment Processor Model
* @param ctx context
* @param C_PaymentProcessor_ID payment processor
*/
public MPaymentProcessor (Properties ctx, int C_PaymentProcessor_ID)
{
super (ctx, C_PaymentProcessor_ID);
if (C_PaymentProcessor_ID == 0)
{
setC_PaymentProcessor_ID (0);
setCommission (Env.ZERO);
setPassword (null);
setC_BankAccount_ID (0);
setAcceptVisa (false);
setAcceptMC (false);
setAcceptAMEX (false);
setAcceptDiners (false);
setCostPerTrx (Env.ZERO);
setUserID (null);
setHostPort (0);
setAcceptCheck (false);
setHostAddress (null);
setRequireVV (false);
setAcceptCorporate (false);
setAcceptDiscover (false);
setAcceptATM (false);
setAcceptACH (false);
setName (null);
}
} // MPaymentProcessor
/**
* Payment Processor Model
* @param ctx context
* @param rs result set
*/
public MPaymentProcessor (Properties ctx, ResultSet rs)
{
super (ctx, rs);
} // MPaymentProcessor
protected POInfo initPO (Properties ctx)
{
int AD_Table_ID = 398;
POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
return poi;
}
public boolean save ()
{
Log.trace (Log.l4_Data, "MPaymentProcessor.save");
return super.save ();
}
public String toString ()
{
StringBuffer sb = new StringBuffer ("MPaymentProcessor[").append (getID ()).append ("]");
return sb.toString ();
}
public void setProxyPort (int ProxyPort)
{
setValue ("ProxyPort", new Integer(ProxyPort));
}
public int getProxyPort ()
{
Integer ii = (Integer)getValue ("ProxyPort");
if (ii == null)
return 0;
return ii.intValue ();
}
void setC_PaymentProcessor_ID (int C_PaymentProcessor_ID)
{
setValueNoCheck ("C_PaymentProcessor_ID", new Integer (C_PaymentProcessor_ID));
}
public int getC_PaymentProcessor_ID ()
{
Integer ii = (Integer)getValue ("C_PaymentProcessor_ID");
if (ii == null)
return 0;
return ii.intValue ();
}
public void setProxyLogon (String ProxyLogon)
{
setValue ("ProxyLogon", ProxyLogon);
}
public String getProxyLogon ()
{
return (String)getValue ("ProxyLogon");
}
public void setCommission (BigDecimal Commission)
{
if (Commission == null)
throw new IllegalArgumentException ("Commission is mandatory");
setValue ("Commission", Commission);
}
public BigDecimal getCommission ()
{
BigDecimal bd = (BigDecimal)getValue ("Commission");
if (bd == null)
return Env.ZERO;
return bd;
}
public void setProxyPassword (String ProxyPassword)
{
setValue ("ProxyPassword", ProxyPassword);
}
public String getProxyPassword ()
{
return (String)getValue ("ProxyPassword");
}
public void setProxyAddress (String ProxyAddress)
{
setValue ("ProxyAddress", ProxyAddress);
}
public String getProxyAddress ()
{
return (String)getValue ("ProxyAddress");
}
public void setPassword (String Password)
{
if (Password == null)
throw new IllegalArgumentException ("Password is mandatory");
setValue ("Password", Password);
}
public String getPassword ()
{
return (String)getValue ("Password");
}
public void setDescription (String Description)
{
setValue ("Description", Description);
}
public String getDescription ()
{
return (String)getValue ("Description");
}
void setC_BankAccount_ID (int C_BankAccount_ID)
{
setValueNoCheck ("C_BankAccount_ID", new Integer (C_BankAccount_ID));
}
public int getC_BankAccount_ID ()
{
Integer ii = (Integer)getValue ("C_BankAccount_ID");
if (ii == null)
return 0;
return ii.intValue ();
}
public void setAcceptVisa (boolean AcceptVisa)
{
setValue ("AcceptVisa", new Boolean (AcceptVisa));
}
public boolean isAcceptVisa ()
{
Boolean bb = (Boolean)getValue ("AcceptVisa");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setAcceptMC (boolean AcceptMC)
{
setValue ("AcceptMC", new Boolean (AcceptMC));
}
public boolean isAcceptMC ()
{
Boolean bb = (Boolean)getValue ("AcceptMC");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setAcceptAMEX (boolean AcceptAMEX)
{
setValue ("AcceptAMEX", new Boolean (AcceptAMEX));
}
public boolean isAcceptAMEX ()
{
Boolean bb = (Boolean)getValue ("AcceptAMEX");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setAcceptDiners (boolean AcceptDiners)
{
setValue ("AcceptDiners", new Boolean (AcceptDiners));
}
public boolean isAcceptDiners ()
{
Boolean bb = (Boolean)getValue ("AcceptDiners");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setCostPerTrx (BigDecimal CostPerTrx)
{
if (CostPerTrx == null)
throw new IllegalArgumentException ("CostPerTrx is mandatory");
setValue ("CostPerTrx", CostPerTrx);
}
public BigDecimal getCostPerTrx ()
{
BigDecimal bd = (BigDecimal)getValue ("CostPerTrx");
if (bd == null)
return Env.ZERO;
return bd;
}
public void setUserID (String UserID)
{
if (UserID == null)
throw new IllegalArgumentException ("UserID is mandatory");
setValue ("UserID", UserID);
}
public String getUserID ()
{
return (String)getValue ("UserID");
}
public void setHostPort (int HostPort)
{
setValue ("HostPort", new Integer (HostPort));
}
public int getHostPort ()
{
Integer ii = (Integer)getValue ("HostPort");
if (ii == null)
return 0;
return ii.intValue ();
}
public void setAcceptCheck (boolean AcceptCheck)
{
setValue ("AcceptCheck", new Boolean (AcceptCheck));
}
public boolean isAcceptCheck ()
{
Boolean bb = (Boolean)getValue ("AcceptCheck");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setHostAddress (String HostAddress)
{
if (HostAddress == null)
throw new IllegalArgumentException ("HostAddress is mandatory");
setValue ("HostAddress", HostAddress);
}
public String getHostAddress ()
{
return (String)getValue ("HostAddress");
}
public void setRequireVV (boolean RequireVV)
{
setValue ("RequireVV", new Boolean (RequireVV));
}
public boolean isRequireVV ()
{
Boolean bb = (Boolean)getValue ("RequireVV");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setAcceptCorporate (boolean AcceptCorporate)
{
setValue ("AcceptCorporate", new Boolean (AcceptCorporate));
}
public boolean isAcceptCorporate ()
{
Boolean bb = (Boolean)getValue ("AcceptCorporate");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setC_Currency_ID (int C_Currency_ID)
{
setValue ("C_Currency_ID", new Integer (C_Currency_ID));
}
public int getC_Currency_ID ()
{
Integer ii = (Integer)getValue ("C_Currency_ID");
if (ii == null)
return 0;
return ii.intValue ();
}
public void setPayProcessorClass (String PayProcessorClass)
{
setValue ("PayProcessorClass", PayProcessorClass);
}
public String getPayProcessorClass ()
{
return (String)getValue ("PayProcessorClass");
}
public void setAcceptDiscover (boolean AcceptDiscover)
{
setValue ("AcceptDiscover", new Boolean (AcceptDiscover));
}
public boolean isAcceptDiscover ()
{
Boolean bb = (Boolean)getValue ("AcceptDiscover");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setAD_Sequence_ID (int AD_Sequence_ID)
{
setValue ("AD_Sequence_ID", new Integer (AD_Sequence_ID));
}
public int getAD_Sequence_ID ()
{
Integer ii = (Integer)getValue ("AD_Sequence_ID");
if (ii == null)
return 0;
return ii.intValue ();
}
public void setAcceptATM (boolean AcceptATM)
{
setValue ("AcceptATM", new Boolean (AcceptATM));
}
public boolean isAcceptATM ()
{
Boolean bb = (Boolean)getValue ("AcceptATM");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setAcceptACH (boolean AcceptACH)
{
setValue ("AcceptACH", new Boolean (AcceptACH));
}
public boolean isAcceptACH ()
{
Boolean bb = (Boolean)getValue ("AcceptACH");
if (bb != null)
return bb.booleanValue ();
return false;
}
public void setName (String Name)
{
if (Name == null)
throw new IllegalArgumentException ("Name is mandatory");
setValue ("Name", Name);
}
public String getName ()
{
return (String)getValue ("Name");
}
public void setVendorID (String VendorID)
{
setValue ("VendorID", VendorID);
}
public String getVendorID ()
{
return (String)getValue ("VendorID");
}
public void setPartnerID (String PartnerID)
{
setValue ("PartnerID", PartnerID);
}
public String getPartnerID ()
{
return (String)getValue ("PartnerID");
}
} // MPaymentProcessor
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -