Skip to content

Commit

Permalink
handle old vacations agreement
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Javier Martínez Páez committed Sep 28, 2022
1 parent 55a29ae commit f47f7a5
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,46 @@

import java.io.Serializable;

public class UserHolidaysState implements Serializable {

private User user;
private int totalAccepted = 0;
private int totalYear = 0;

public int getTotal() {
return (getTotalYear() - totalAccepted);
}

public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}

public int getTotalAccepted() {
return totalAccepted;
}
public void setTotalAccepted(int totalAccepted) {
this.totalAccepted = totalAccepted;
}

public int getTotalYear() {
return totalYear;
}

public void setTotalYear(int totalYear) {
this.totalYear = totalYear;
}




public class UserHolidaysState implements Serializable{

private User user;
private int totalAccepted = 0;
private int totalYear = 0;
private int yearAgreementHolidays = 0;

public int getTotal(){
return (getTotalYear() - totalAccepted);
}

public User getUser(){
return user;
}

public void setUser(User user){
this.user = user;
}

public int getTotalAccepted(){
return totalAccepted;
}

public void setTotalAccepted(int totalAccepted){
this.totalAccepted = totalAccepted;
}

public int getTotalYear(){
return totalYear;
}

public void setTotalYear(int totalYear){
this.totalYear = totalYear;
}

public int getYearAgreementHolidays(){
return yearAgreementHolidays;
}

public void setYearAgreementHolidays(int yearAgreementHolidays){
this.yearAgreementHolidays = yearAgreementHolidays;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,170 +23,136 @@

import com.autentia.tnt.dao.ITransferObject;

public class WorkingAgreement implements Serializable, ITransferObject{


/* generated by stajanov (do not edit/delete) */

// Fields

private Integer id;

private String name;

private String description;

private int holidays;

private Integer ownerId;

private Integer departmentId;

private Date insertDate;

private Date updateDate;

private int yearDuration;

// Setters and getters

public Integer getId(){
return id;
}

private void setId(Integer id){
this.id = id;
}

public String getName(){
return name;
}

public void setName(String name){
this.name = name;
}

public String getDescription(){
return description;
}

public void setDescription(String description){
this.description = description;
}

public int getHolidays(){
return holidays;
}

public void setHolidays(int holidays){
this.holidays = holidays;
}

public Integer getOwnerId(){
return ownerId;
}

public void setOwnerId(Integer ownerId){
this.ownerId = ownerId;
}

public Integer getDepartmentId(){
return departmentId;
}

public void setDepartmentId(Integer departmentId){
this.departmentId = departmentId;
}

public Date getInsertDate(){
return insertDate;
}

public void setInsertDate(Date insertDate){
this.insertDate = insertDate;
}

public Date getUpdateDate(){
return updateDate;
}

public void setUpdateDate(Date updateDate){
this.updateDate = updateDate;
}

/**
* @return the yearDuration
*/
public int getYearDuration(){
return yearDuration;
}

/**
* @param yearDuration the yearDuration to set
*/
public void setYearDuration(int yearDuration){
this.yearDuration = yearDuration;
}

@Override
public boolean equals(Object that){
try{
if(that == null)
return false;
else
return this.getId().equals(((WorkingAgreement) that).getId());
}catch(Exception e){
return false;
}
}

@Override
public int hashCode(){
if(this.getId() == null)
return super.hashCode();
else
return this.getId().intValue();
}

public List<Integer> getOwnersId(){
// TODO Auto-generated method stub
return null;
}

/* generated by stajanov (do not edit/delete) */

public class WorkingAgreement implements Serializable, ITransferObject
{


/* generated by stajanov (do not edit/delete) */







// Fields



private Integer id;



private String name;



private String description;



private int holidays;



private Integer ownerId;



private Integer departmentId;



private Date insertDate;



private Date updateDate;

private int yearDuration;


// Setters and getters



public Integer getId() {
return id;
}
private void setId( Integer id ) {
this.id = id;
}



public String getName() {
return name;
}
public void setName( String name ) {
this.name = name;
}



public String getDescription() {
return description;
}
public void setDescription( String description ) {
this.description = description;
}



public int getHolidays() {
return holidays;
}
public void setHolidays( int holidays ) {
this.holidays = holidays;
}



public Integer getOwnerId() {
return ownerId;
}
public void setOwnerId( Integer ownerId ) {
this.ownerId = ownerId;
}



public Integer getDepartmentId() {
return departmentId;
}
public void setDepartmentId( Integer departmentId ) {
this.departmentId = departmentId;
}



public Date getInsertDate() {
return insertDate;
}
public void setInsertDate( Date insertDate ) {
this.insertDate = insertDate;
}



public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate( Date updateDate ) {
this.updateDate = updateDate;
}

/**
* @return the yearDuration
*/
public int getYearDuration() {
return yearDuration;
}

/**
* @param yearDuration the yearDuration to set
*/
public void setYearDuration(int yearDuration) {
this.yearDuration = yearDuration;
}
@Override
public boolean equals( Object that )
{
try {
if (that == null)
return false;
else
return this.getId().equals( ((WorkingAgreement)that).getId() );
} catch (Exception e) {
return false;
}
}

@Override
public int hashCode() {
if(this.getId()==null)
return super.hashCode();
else
return this.getId().intValue();
}

public List<Integer> getOwnersId() {
// TODO Auto-generated method stub
return null;
}

/* generated by stajanov (do not edit/delete) */


}
Loading

0 comments on commit f47f7a5

Please sign in to comment.