Allocation.java

package com.tradecloud.domain.settlement;

import com.tradecloud.common.base.PersistenceBase;
import com.tradecloud.domain.common.Currency;

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

@Entity
@Table(name = "allocation")
@Access(AccessType.FIELD)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "Allocation")
public class Allocation extends PersistenceBase {

    private static final long serialVersionUID = 1L;

    // TODO - need to figure out what they planend here. Got this from
    // PlannedSettlementAllocation.hbm.xml in Blackbox
    @ManyToOne(cascade = CascadeType.ALL)
    private PlannedSettlement sourcee;
    @ManyToOne(cascade = CascadeType.ALL)
    private PlannedSettlement target;

    private boolean displayable;
    private BigDecimal amountInCostingCurrency;
    private BigDecimal amount;
    private Currency currency;
    @Enumerated
    private SettlementTreasuryState treasuryState;
    private String rejectionReason;
    private boolean formerlyExposed;
    private boolean modifiedPostExposure;
    private boolean waitingTreasuryCcamt;

    public PlannedSettlement getSourcee() {
        return sourcee;
    }

    public void setSourcee(PlannedSettlement sourcee) {
        this.sourcee = sourcee;
    }

    public boolean isDisplayable() {
        return displayable;
    }

    public void setDisplayable(boolean displayable) {
        this.displayable = displayable;
    }

    public BigDecimal getAmountInCostingCurrency() {
        return amountInCostingCurrency;
    }

    public void setAmountInCostingCurrency(BigDecimal amountInCostingCurrency) {
        this.amountInCostingCurrency = amountInCostingCurrency;
    }

    public PlannedSettlement getTarget() {
        return target;
    }

    public void setTarget(PlannedSettlement target) {
        this.target = target;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Currency getCurrency() {
        return currency;
    }

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

    public SettlementTreasuryState getTreasuryState() {
        return treasuryState;
    }

    public void setTreasuryState(SettlementTreasuryState treasuryState) {
        this.treasuryState = treasuryState;
    }

    public String getRejectionReason() {
        return rejectionReason;
    }

    public void setRejectionReason(String rejectionReason) {
        this.rejectionReason = rejectionReason;
    }

    public boolean isFormerlyExposed() {
        return formerlyExposed;
    }

    public void setFormerlyExposed(boolean formerlyExposed) {
        this.formerlyExposed = formerlyExposed;
    }

    public boolean isModifiedPostExposure() {
        return modifiedPostExposure;
    }

    public void setModifiedPostExposure(boolean modifiedPostExposure) {
        this.modifiedPostExposure = modifiedPostExposure;
    }

    public boolean isWaitingTreasuryCcamt() {
        return waitingTreasuryCcamt;
    }

    public void setWaitingTreasuryCcamt(boolean waitingTreasuryCcamt) {
        this.waitingTreasuryCcamt = waitingTreasuryCcamt;
    }

}