Class Transaction
- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Transaction>
-
- com.aoindustries.aoserv.client.billing.Transaction
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,Transaction>
public final class Transaction extends CachedObjectIntegerKey<Transaction>
EachAccounthas an account of all the charges and payments processed. Each entry in this account is aTransaction.- Author:
- AO Industries, Inc.
- See Also:
Account
-
-
Field Summary
Fields Modifier and Type Field Description static byteCONFIRMEDPayment confirmation.static byteNOT_CONFIRMEDPayment confirmation.static intNUM_PAYMENT_CONFIRMATION_STATESstatic intUNASSIGNEDRepresents not being assigned for a field of theinttype.static byteWAITING_CONFIRMATIONPayment confirmation.-
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
-
Fields inherited from class com.aoindustries.aoserv.client.AOServObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
-
Constructor Summary
Constructors Constructor Description Transaction()
-
Method Summary
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
-
Methods inherited from class com.aoindustries.aoserv.client.AOServObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxID, getLinuxUserName, getMacAddress, getMySQLDatabaseName, getMySQLServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
-
-
-
Field Detail
-
UNASSIGNED
public static final int UNASSIGNED
Represents not being assigned for a field of theinttype.- See Also:
- Constant Field Values
-
WAITING_CONFIRMATION
public static final byte WAITING_CONFIRMATION
Payment confirmation.- See Also:
- Constant Field Values
-
CONFIRMED
public static final byte CONFIRMED
Payment confirmation.- See Also:
- Constant Field Values
-
NOT_CONFIRMED
public static final byte NOT_CONFIRMED
Payment confirmation.- See Also:
- Constant Field Values
-
NUM_PAYMENT_CONFIRMATION_STATES
public static final int NUM_PAYMENT_CONFIRMATION_STATES
- See Also:
- Constant Field Values
-
-
Method Detail
-
approved
public void approved(int creditCardTransaction, String paymentInfo) throws IOException, SQLException- Parameters:
paymentInfo- (Optional) The card info may have been updated during the transaction.- Throws:
IOExceptionSQLException
-
approved
@Deprecated public void approved(int creditCardTransaction) throws IOException, SQLException
Deprecated.Please provide updated cardInfo viaapproved(int, java.lang.String).- Throws:
IOExceptionSQLException- See Also:
approved(int, java.lang.String)
-
declined
public void declined(int creditCardTransaction, String paymentInfo) throws IOException, SQLException- Parameters:
paymentInfo- (Optional) The card info may have been updated during the transaction.- Throws:
IOExceptionSQLException
-
declined
@Deprecated public void declined(int creditCardTransaction) throws IOException, SQLException
Deprecated.Please provide updated cardInfo viadeclined(int, java.lang.String).- Throws:
IOExceptionSQLException- See Also:
declined(int, java.lang.String)
-
held
public void held(int creditCardTransaction, String paymentInfo) throws IOException, SQLException- Parameters:
paymentInfo- (Optional) The card info may have been updated during the transaction.- Throws:
IOExceptionSQLException
-
held
@Deprecated public void held(int creditCardTransaction) throws IOException, SQLException
Deprecated.Please provide updated cardInfo viaheld(int, java.lang.String).- Throws:
IOExceptionSQLException- See Also:
held(int, java.lang.String)
-
getAprNum
@Deprecated public String getAprNum() throws SQLException, IOException
Deprecated.- Throws:
SQLExceptionIOException- See Also:
getPayment(),Payment.getAuthorizationApprovalCode()
-
getAccount_name
public Account.Name getAccount_name()
-
getAccount
public Account getAccount() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getSourceAccount_name
public Account.Name getSourceAccount_name()
-
getSourceAccount
public Account getSourceAccount() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getAdministrator_username
public User.Name getAdministrator_username()
-
getAdministrator
public Administrator getAdministrator() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Transaction>
-
getDescription
public String getDescription()
-
getProcessor_providerId
public String getProcessor_providerId()
-
getProcessor
public Processor getProcessor() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getPayment_id
public Integer getPayment_id()
-
getPayment
public Payment getPayment() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getPaymentConfirmed
public byte getPaymentConfirmed()
-
getPaymentConfirmedLabel
public static String getPaymentConfirmedLabel(int index)
-
getPaymentInfo
public String getPaymentInfo()
-
getPaymentType_name
public String getPaymentType_name()
-
getPaymentType
public PaymentType getPaymentType() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getAmount
public Money getAmount()
Gets the effective amount of quantity * rate.
-
getQuantity
public int getQuantity()
-
getRate
public Money getRate()
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Transaction>
-
getTime
public UnmodifiableTimestamp getTime()
-
getTransid
public int getTransid()
-
getType_name
public String getType_name()
-
getType
public TransactionType getType() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,Transaction>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,Transaction>- Throws:
IOException
-
toStringImpl
public String toStringImpl()
Description copied from class:AOServObjectAOServObject.toString()implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAOServObject.toString()on the key (fromAOServObject.getKey()). When the key isnull, uses the default implementation fromObject.toString().- Overrides:
toStringImplin classCachedObjectIntegerKey<Transaction>
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,Transaction>- Throws:
IOException
-
-