com.tao_harmony.fx2extend.journal.Journal.java Source code

Java tutorial

Introduction

Here is the source code for com.tao_harmony.fx2extend.journal.Journal.java

Source

/*
 * Copyright (C) 2014 kyanai
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * 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
 * aDouble with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.tao_harmony.fx2extend.journal;

import com.orangesignal.csv.annotation.CsvColumn;
import com.orangesignal.csv.annotation.CsvEntity;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.commons.lang3.math.NumberUtils;

/**
 * @author kyanai e21???FX2. ??ProFIT????.
 */
@CsvEntity(header = false)
public class Journal {

    /**
     * .
     */
    @CsvColumn(position = 0)
    private Short clientCode;
    /**
     * ?.??.
     */
    @CsvColumn(position = 1, defaultValue = "999")
    private final Short systemClass = JournalUtil.FX2_SYSTEM_CLASS;
    /**
     * ?.
     */
    @CsvColumn(position = 2)
    private Integer recordNumber;
    /**
     * ?.??.
     */
    @CsvColumn(position = 3)
    private Integer tradingDay;
    /**
     * ??.??????????????????.
     */
    @CsvColumn(position = 4)
    private Integer slipNumber;
    /**
     * ?.4.
     */
    @CsvColumn(position = 5)
    private String evidenceNumber;
    /**
     * .
     */
    @CsvColumn(position = 6)
    private Byte taxClass;
    /**
     * .
     */
    @CsvColumn(position = 7, defaultValue = "0")
    private Byte segmentCode;
    /**
     * .
     */
    @CsvColumn(position = 8)
    private Short debitCode;
    /**
     * .
     */
    @CsvColumn(position = 9)
    private String debitSubCode;
    /**
     * .
     */
    @CsvColumn(position = 10)
    private Short creditCode;
    /**
     * .
     */
    @CsvColumn(position = 11)
    private String creditSubCode;
    /**
     * ??.
     */
    @CsvColumn(position = 12)
    private String checkNumber;
    /**
     * 1.
     */
    @CsvColumn(position = 13)
    private final Short filler1 = JournalUtil.FX2_FILLER;
    /**
     * ??.
     */
    @CsvColumn(position = 14)
    private Long ammount;
    /**
     * ?.??????????????.
     */
    @CsvColumn(position = 15)
    private Long taxAmmount;
    /**
     * ?.????????????1.
     */
    @CsvColumn(position = 16)
    private Byte taxInputClass;
    /**
     * .?100??.????????0.
     */
    @CsvColumn(position = 17)
    private Integer taxRate;
    /**
     * ?.?????????.
     * ???????????????????????????.
     */
    @CsvColumn(position = 18)
    private Integer customerCode;
    /**
     * ???.?????????????????????????????.
     */
    @CsvColumn(position = 19)
    private String customer;
    /**
     * ?.
     */
    @CsvColumn(position = 20)
    private Byte purchasePattern;
    /**
     * ?.???2??00?.
     */
    @CsvColumn(position = 21)
    private Integer purchaseDayBegins;
    /**
     * ?.
     */
    @CsvColumn(position = 22)
    private Integer purchaseDayEnds;
    /**
     * ?.
     */
    @CsvColumn(position = 23)
    private String summary;
    /**
     * 2.
     */
    @CsvColumn(position = 24, defaultValue = "")
    private final String filler2 = JournalUtil.FX2_NULL;
    /**
     * .
     */
    @CsvColumn(position = 25)
    private Byte fundBalanceMajor;
    /**
     * ?.
     */
    @CsvColumn(position = 26)
    private Byte fundBalanceMinor;
    /**
     * .
     */
    @CsvColumn(position = 27)
    private Short departmentCode;
    /**
     * .????????1????.
     */
    @CsvColumn(position = 28)
    private Byte departmentCount;
    /**
     * ?.????????.1?. ?????.
     */
    @CsvColumn(position = 29)
    private Byte departmentAmmountClass;
    /**
     * 3.
     */
    @CsvColumn(position = 30)
    private final Short filler3 = JournalUtil.FX2_FILLER;
    /**
     * ?.??????.
     */
    @CsvColumn(position = 31)
    private Integer ruleNumber;
    /**
     * .??????????.
     */
    @CsvColumn(position = 32)
    private Integer paymentDay;
    /**
     * ?.??????????.
     */
    @CsvColumn(position = 33)
    private Integer recoveryDay;

    /**
     * @return clientCode
     */
    public Short getClientCode() {
        return clientCode;
    }

    /**
     * @param clientCode clientCode?
     */
    public void setClientCode(Short clientCode) {
        this.clientCode = clientCode;
    }

    /**
     * @return recordNumber
     */
    public Integer getRecordNumber() {
        return recordNumber;
    }

    /**
     * @param recordNumber recordNumber?
     */
    public void setRecordNumber(Integer recordNumber) {
        this.recordNumber = recordNumber;
    }

    /**
     * @return tradingDay
     */
    public Integer getTradingDay() {
        return tradingDay;
    }

    /**
     * @param tradingDay tradingDay?
     */
    public void setTradingDay(Integer tradingDay) {
        this.tradingDay = tradingDay;
    }

    /**
     * @return slipNumber
     */
    public Integer getSlipNumber() {
        return slipNumber;
    }

    /**
     * @param slipNumber slipNumber?
     */
    public void setSlipNumber(Integer slipNumber) {
        this.slipNumber = slipNumber;
    }

    /**
     * @return evidenceNumber
     */
    public String getEvidenceNumber() {
        return evidenceNumber;
    }

    /**
     * @param evidenceNumber evidenceNumber?
     */
    public void setEvidenceNumber(String evidenceNumber) {
        this.evidenceNumber = evidenceNumber;
    }

    /**
     * @return taxClass
     */
    public Byte getTaxClass() {
        return taxClass;
    }

    /**
     * @param taxClass taxClass?
     */
    public void setTaxClass(Byte taxClass) {
        this.taxClass = taxClass;
    }

    /**
     * @return segmentCode
     */
    public Byte getSegmentCode() {
        return segmentCode;
    }

    /**
     * @param segmentCode segmentCode?
     */
    public void setSegmentCode(Byte segmentCode) {
        this.segmentCode = segmentCode;
    }

    /**
     * @return debitCode
     */
    public Short getDebitCode() {
        return debitCode;
    }

    /**
     * @param debitCode debitCode?
     */
    public void setDebitCode(Short debitCode) {
        this.debitCode = debitCode;
    }

    /**
     * @return debitSubCode
     */
    public String getDebitSubCode() {
        return debitSubCode;
    }

    /**
     * @param debitSubCode debitSubCode?
     */
    public void setDebitSubCode(String debitSubCode) {
        this.debitSubCode = debitSubCode;
    }

    /**
     * @return creditCode
     */
    public Short getCreditCode() {
        return creditCode;
    }

    /**
     * @param creditCode creditCode?
     */
    public void setCreditCode(Short creditCode) {
        this.creditCode = creditCode;
    }

    /**
     * @return creditSubCode
     */
    public String getCreditSubCode() {
        return creditSubCode;
    }

    /**
     * @param creditSubCode creditSubCode?
     */
    public void setCreditSubCode(String creditSubCode) {
        this.creditSubCode = creditSubCode;
    }

    /**
     * @return checkNumber
     */
    public String getCheckNumber() {
        return checkNumber;
    }

    /**
     * @param checkNumber checkNumber?
     */
    public void setCheckNumber(String checkNumber) {
        this.checkNumber = checkNumber;
    }

    /**
     * @return ammount
     */
    public Long getAmmount() {
        return ammount;
    }

    /**
     * @param ammount ammount?
     */
    public void setAmmount(Long ammount) {
        this.ammount = ammount;
    }

    /**
     * @return taxAmmount
     */
    public Long getTaxAmmount() {
        return taxAmmount;
    }

    /**
     * @param taxAmmount taxAmmount?
     */
    public void setTaxAmmount(Long taxAmmount) {
        this.taxAmmount = taxAmmount;
    }

    /**
     * @return taxInputClass
     */
    public Byte getTaxInputClass() {
        return taxInputClass;
    }

    /**
     * @param taxInputClass taxInputClass?
     */
    public void setTaxInputClass(Byte taxInputClass) {
        this.taxInputClass = taxInputClass;
    }

    /**
     * @return taxRate
     */
    public Integer getTaxRate() {
        return taxRate;
    }

    /**
     * @param taxRate taxRate?
     */
    public void setTaxRate(Integer taxRate) {
        this.taxRate = taxRate;
    }

    /**
     * @return customerCode
     */
    public Integer getCustomerCode() {
        return customerCode;
    }

    /**
     * @param customerCode customerCode?
     */
    public void setCustomerCode(Integer customerCode) {
        this.customerCode = customerCode;
    }

    /**
     * @return customer
     */
    public String getCustomer() {
        return customer;
    }

    /**
     * @param customer customer?
     */
    public void setCustomer(String customer) {
        this.customer = customer;
    }

    /**
     * @return purchasePattern
     */
    public Byte getPurchasePattern() {
        return purchasePattern;
    }

    /**
     * @param purchasePattern purchasePattern?
     */
    public void setPurchasePattern(Byte purchasePattern) {
        this.purchasePattern = purchasePattern;
    }

    /**
     * @return purchaseDayBegins
     */
    public Integer getPurchaseDayBegins() {
        return purchaseDayBegins;
    }

    /**
     * @param purchaseDayBegins purchaseDayBegins?
     */
    public void setPurchaseDayBegins(Integer purchaseDayBegins) {
        this.purchaseDayBegins = purchaseDayBegins;
    }

    /**
     * @return purchaseDayEnds
     */
    public Integer getPurchaseDayEnds() {
        return purchaseDayEnds;
    }

    /**
     * @param purchaseDayEnds purchaseDayEnds?
     */
    public void setPurchaseDayEnds(Integer purchaseDayEnds) {
        this.purchaseDayEnds = purchaseDayEnds;
    }

    /**
     * @return summary
     */
    public String getSummary() {
        return summary;
    }

    /**
     * @param summary summary?
     */
    public void setSummary(String summary) {
        this.summary = summary;
    }

    /**
     * @return fundBalanceMajor
     */
    public Byte getFundBalanceMajor() {
        return fundBalanceMajor;
    }

    /**
     * @param fundBalanceMajor fundBalanceMajor?
     */
    public void setFundBalanceMajor(Byte fundBalanceMajor) {
        this.fundBalanceMajor = fundBalanceMajor;
    }

    /**
     * @return fundBalanceMinor
     */
    public Byte getFundBalanceMinor() {
        return fundBalanceMinor;
    }

    /**
     * @param fundBalanceMinor fundBalanceMinor?
     */
    public void setFundBalanceMinor(Byte fundBalanceMinor) {
        this.fundBalanceMinor = fundBalanceMinor;
    }

    /**
     * @return departmentCode
     */
    public Short getDepartmentCode() {
        return departmentCode;
    }

    /**
     * @param departmentCode departmentCode?
     */
    public void setDepartmentCode(Short departmentCode) {
        this.departmentCode = departmentCode;
    }

    /**
     * @return departmentCount
     */
    public Byte getDepartmentCount() {
        return departmentCount;
    }

    /**
     * @param departmentCount departmentCount?
     */
    public void setDepartmentCount(Byte departmentCount) {
        this.departmentCount = departmentCount;
    }

    /**
     * @return departmentAmmountClass
     */
    public Byte getDepartmentAmmountClass() {
        return departmentAmmountClass;
    }

    /**
     * @param departmentAmmountClass departmentAmmountClass?
     */
    public void setDepartmentAmmountClass(Byte departmentAmmountClass) {
        this.departmentAmmountClass = departmentAmmountClass;
    }

    /**
     * @return ruleNumber
     */
    public Integer getRuleNumber() {
        return ruleNumber;
    }

    /**
     * @param ruleNumber ruleNumber?
     */
    public void setRuleNumber(Integer ruleNumber) {
        this.ruleNumber = ruleNumber;
    }

    /**
     * @return paymentDay
     */
    public Integer getPaymentDay() {
        return paymentDay;
    }

    /**
     * @param paymentDay paymentDay?
     */
    public void setPaymentDay(Integer paymentDay) {
        this.paymentDay = paymentDay;
    }

    /**
     * @return recoveryDay
     */
    public Integer getRecoveryDay() {
        return recoveryDay;
    }

    /**
     * @param recoveryDay recoveryDay?
     */
    public void setRecoveryDay(Integer recoveryDay) {
        this.recoveryDay = recoveryDay;
    }

    /**
     * @return systemClass
     */
    public Short getSystemClass() {
        return systemClass;
    }

    /**
     * @return filler1
     */
    public Short getFiller1() {
        return filler1;
    }

    /**
     * @return filler2
     */
    public String getFiller2() {
        return filler2;
    }

    /**
     * @return filler3
     */
    public Short getFiller3() {
        return filler3;
    }

    /**
     * ??.??????????.
     * <ul>
     * <li></li>
     * <li>?</li>
     * <li>?????</li>
     * </ul>
     */
    public void reset() {
        this.ammount = NumberUtils.LONG_ZERO;
        this.checkNumber = StringUtils.EMPTY;
        this.creditCode = NumberUtils.SHORT_ZERO;
        this.creditSubCode = StringUtils.EMPTY;
        this.customer = StringUtils.EMPTY;
        this.customerCode = NumberUtils.INTEGER_ZERO;
        this.debitCode = NumberUtils.SHORT_ZERO;
        this.debitSubCode = StringUtils.EMPTY;
        this.departmentAmmountClass = NumberUtils.BYTE_ZERO;
        this.departmentCode = NumberUtils.SHORT_ZERO;
        this.departmentCount = NumberUtils.BYTE_ZERO;
        this.evidenceNumber = StringUtils.EMPTY;
        this.fundBalanceMajor = NumberUtils.BYTE_ZERO;
        this.fundBalanceMinor = NumberUtils.BYTE_ZERO;
        this.paymentDay = NumberUtils.INTEGER_ZERO;
        this.purchaseDayBegins = NumberUtils.INTEGER_ZERO;
        this.purchaseDayEnds = NumberUtils.INTEGER_ZERO;
        this.purchasePattern = NumberUtils.BYTE_ZERO;
        this.recordNumber = NumberUtils.INTEGER_ZERO;
        this.recoveryDay = NumberUtils.INTEGER_ZERO;
        this.ruleNumber = NumberUtils.INTEGER_ZERO;
        this.segmentCode = NumberUtils.BYTE_ZERO;
        this.slipNumber = NumberUtils.INTEGER_ZERO;
        this.summary = StringUtils.EMPTY;
        this.taxAmmount = NumberUtils.LONG_ZERO;
        this.taxClass = NumberUtils.BYTE_ZERO;
        this.taxInputClass = NumberUtils.BYTE_ZERO;
        this.taxRate = NumberUtils.INTEGER_ZERO;
    }

    /**
     * toString(). ?.
     *
     * @return
     */
    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.SIMPLE_STYLE);
    }
}