com.redhat.rhtracking.web.domain.InvoiceInfo.java Source code

Java tutorial

Introduction

Here is the source code for com.redhat.rhtracking.web.domain.InvoiceInfo.java

Source

/*
 * Copyright (C) 2015 Nuuptech
 *
 * 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 2
 * 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
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package com.redhat.rhtracking.web.domain;

import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;

/**
 *
 * @author marco-g8
 */
public class InvoiceInfo {

    private String requestNumber;
    private String invoiceNumber;

    private String opportunity;
    private long deliveryMatrix;
    private Date date;

    private int platformHours;
    private BigDecimal platformPrice;

    private int middlewareHours;
    private BigDecimal middlewarePrice;

    private int workshopHours;
    private BigDecimal workshopPrice;

    public InvoiceInfo() {
        this.platformHours = 0;
        this.platformPrice = BigDecimal.ZERO;
        this.middlewareHours = 0;
        this.middlewarePrice = BigDecimal.ZERO;
        this.workshopHours = 0;
        this.workshopPrice = BigDecimal.ZERO;
    }

    public String getRequestNumber() {
        return requestNumber;
    }

    public void setRequestNumber(String requestNumber) {
        this.requestNumber = requestNumber;
    }

    public String getInvoiceNumber() {
        return invoiceNumber;
    }

    public void setInvoiceNumber(String invoiceNumber) {
        this.invoiceNumber = invoiceNumber;
    }

    @NotNull
    @NotEmpty
    public String getOpportunity() {
        return opportunity;
    }

    public void setOpportunity(String opportunity) {
        this.opportunity = opportunity;
    }

    @NotNull
    @Range(min = 0l)
    public long getDeliveryMatrix() {
        return deliveryMatrix;
    }

    public void setDeliveryMatrix(long deliveryMatrix) {
        this.deliveryMatrix = deliveryMatrix;
    }

    @NotNull
    @DateTimeFormat(pattern = "dd/MM/yyyy")
    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @NotNull
    public int getPlatformHours() {
        return platformHours;
    }

    public void setPlatformHours(int platformHours) {
        this.platformHours = platformHours;
    }

    public BigDecimal getPlatformPrice() {
        return platformPrice;
    }

    public void setPlatformPrice(BigDecimal platformPrice) {
        this.platformPrice = platformPrice;
    }

    public int getMiddlewareHours() {
        return middlewareHours;
    }

    public void setMiddlewareHours(int middlewareHours) {
        this.middlewareHours = middlewareHours;
    }

    public BigDecimal getMiddlewarePrice() {
        return middlewarePrice;
    }

    public void setMiddlewarePrice(BigDecimal middlewarePrice) {
        this.middlewarePrice = middlewarePrice;
    }

    public int getWorkshopHours() {
        return workshopHours;
    }

    public void setWorkshopHours(int workshopHours) {
        this.workshopHours = workshopHours;
    }

    public BigDecimal getWorkshopPrice() {
        return workshopPrice;
    }

    public void setWorkshopPrice(BigDecimal workshopAmount) {
        this.workshopPrice = workshopAmount;
    }
}