IndirectCostAllocation.java

package com.tradecloud.domain.settlement;

import com.tradecloud.common.base.PersistenceBase;
import com.tradecloud.domain.common.Currency;
import com.tradecloud.domain.costing.CostAllocation;
import com.tradecloud.domain.document.invoice.ServiceProviderInvoice;

import javax.persistence.*;
import javax.xml.bind.annotation.*;
import java.math.BigDecimal;

@Entity
@Table(name = "indirectcostallocation")
@Access(AccessType.FIELD)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "IndirectCostAllocation")
public class IndirectCostAllocation extends PersistenceBase implements CostAllocation {

    private static final long serialVersionUID = 1L;

    @ManyToOne(cascade = CascadeType.ALL)
    @XmlElement(name = "ServiceProviderInvoice")
    private ServiceProviderInvoice indirectCostsInvoice;

    @XmlAttribute
    private BigDecimal amount;
    @ManyToOne(cascade = CascadeType.ALL)
    @XmlElement(name = "ServiceProviderInvoice")
    private Currency currency;
    @XmlAttribute
    private String otherCurrency;
    @XmlAttribute
    private BigDecimal otherAmount;
    @XmlAttribute
    private BigDecimal ROE;

    /**
     * @return Returns the amount.
     */
    public BigDecimal getAmount() {
        return amount;
    }

    /**
     * @param amount The amount to set.
     */
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Currency getCurrency() {
        return currency;
    }

    public void setCurrency(Currency currency) {
        this.currency = currency;
    }

    /**
     * @return Returns the indirectCostsInvoice.
     */
    public ServiceProviderInvoice getIndirectCostsInvoice() {
        return indirectCostsInvoice;
    }

    /**
     * @param indirectCostsInvoice The indirectCostsInvoice to set.
     */
    public void setIndirectCostsInvoice(ServiceProviderInvoice indirectCostsInvoice) {
        this.indirectCostsInvoice = indirectCostsInvoice;
    }

    /**
     * @return Returns the otherCurrency.
     */
    public String getOtherCurrency() {
        return otherCurrency;
    }

    /**
     * @param otherCurrency The otherCurrency to set.
     */
    public void setOtherCurrency(String otherCurrency) {
        this.otherCurrency = otherCurrency;
    }

    /**
     * @return Returns the rOE.
     */
    public BigDecimal getROE() {
        return ROE;
    }

    /**
     * @param roe The rOE to set.
     */
    public void setROE(BigDecimal roe) {
        ROE = roe;
    }

    /**
     * @return Returns the otherAmount.
     */
    public BigDecimal getOtherAmount() {
        return otherAmount;
    }

    /**
     * @param otherAmount The otherAmount to set.
     */
    public void setOtherAmount(BigDecimal otherAmount) {
        this.otherAmount = otherAmount;
    }
}