Package web.operator.reception

Source Code of web.operator.reception.ReceptionLine

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package web.operator.reception;

import domain.Collaborator;
import domain.Lpu;
import domain.shedule.SheduleReception;
import java.text.SimpleDateFormat;

/**
*
* @author lacoste
*/
public class ReceptionLine implements Comparable<ReceptionLine>{

    @Deprecated
    private String author;
    @Deprecated
    private Collaborator collaborator;

    private SheduleReception reception;
    @Deprecated
    private String lpu;
    @Deprecated
    private String addressLpu;
   
    private String register;
    @Deprecated
    private long time;

    public ReceptionLine(SheduleReception reception) {
        this.reception = reception;
        Lpu lpuObj = reception.getCollaborator().getLpu();
        this.lpu = lpuObj.getTitleShort();
        this.addressLpu = lpuObj.getAddress() != null ? lpuObj.getAddress().getAsStringShort() : "";
        this.collaborator = reception.getCollaborator();
        this.register =  (reception.getRegister() != null
                ? new SimpleDateFormat("kk:mm").format(reception.getRegister())
                : "");

        Collaborator authorColl = reception.getAuthor();
        if (authorColl != null) {
            author = authorColl.getClient().toString();
        }
        time = reception.getBegin().getTime();
    }



    public String getAddressLpu() {
        return addressLpu;
    }

    public String getLpu() {
        return lpu;
    }

    public SheduleReception getReception() {
        return reception;
    }

    public void setAddressLpu(String addressLpu) {
        this.addressLpu = addressLpu;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public void setCollaborator(Collaborator collaborator) {
        this.collaborator = collaborator;
    }

    public void setLpu(String lpu) {
        this.lpu = lpu;
    }

    public void setReception(SheduleReception reception) {
        this.reception = reception;
    }

    public void setTime(long time) {
        this.time = time;
    }


    public Collaborator getCollaborator() {
        return collaborator;
    }

    public String getAuthor() {
        return author;
    }

    public String getRegister() {
        return register;
    }

    public void setRegister(String register) {
        this.register = register;
    }

    public long getTime() {
        return time;
    }


    @Override
    public int compareTo(ReceptionLine o) {
        return this.reception.getBegin().compareTo(o.reception.getBegin());
    }


}
TOP

Related Classes of web.operator.reception.ReceptionLine

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.