Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ public class ActionItem {
@Schema(description = "description of the action item")
private String description;

@NotNull
@Column(name = "priority")
@Schema(description = "Allow for a user defined display order")
private double priority;
private Double priority;

public ActionItem(UUID checkinid, UUID createdbyid, String description) {
this(null, checkinid, createdbyid, description);
Expand All @@ -60,11 +61,9 @@ public ActionItem(UUID id, UUID checkinid, UUID createdbyid, String description)
this(id, checkinid, createdbyid, description, 1.0);
}

public ActionItem(UUID checkinid, UUID createdbyid, String description, double priority) {
this(null, checkinid, createdbyid, description, priority);
}
public ActionItem() {}

public ActionItem(UUID id, UUID checkinid, UUID createdbyid, String description, double priority) {
public ActionItem(UUID id, UUID checkinid, UUID createdbyid, @Nullable String description, Double priority) {
this.id = id;
this.checkinid = checkinid;
this.createdbyid = createdbyid;
Expand Down Expand Up @@ -96,19 +95,21 @@ public void setCreatedbyid(UUID createdbyid) {
this.createdbyid = createdbyid;
}

@Nullable
public String getDescription() {
return description;
}

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

public double getPriority() {
@SuppressWarnings("unused")
public Double getPriority() {
return priority;
}

public void setPriority(double priority) {
public void setPriority(Double priority) {
this.priority = priority;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ public class AgendaItem {
@Schema(description = "description of the agenda item")
private String description;

@NotNull
@Column(name = "priority")
@Schema(description = "Allow for a user defined display order")
private double priority;
private Double priority;

public AgendaItem(UUID checkinid, UUID createdbyid, String description) {
this(null, checkinid, createdbyid, description);
Expand All @@ -60,11 +61,9 @@ public AgendaItem(UUID id, UUID checkinid, UUID createdbyid, String description)
this(id, checkinid, createdbyid, description, 1.0);
}

public AgendaItem(UUID checkinid, UUID createdbyid, String description, double priority) {
this(null, checkinid, createdbyid, description, priority);
}
public AgendaItem() {}

public AgendaItem(UUID id, UUID checkinid, UUID createdbyid, String description, double priority) {
public AgendaItem(UUID id, UUID checkinid, UUID createdbyid, @Nullable String description, Double priority) {
this.id = id;
this.checkinid = checkinid;
this.createdbyid = createdbyid;
Expand Down Expand Up @@ -96,19 +95,21 @@ public void setCreatedbyid(UUID createdbyid) {
this.createdbyid = createdbyid;
}

@Nullable
public String getDescription() {
return this.description;
}

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

public double getPriority() {
@SuppressWarnings("unused")
public Double getPriority() {
return priority;
}

public void setPriority(double priority) {
public void setPriority(Double priority) {
this.priority = priority;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@Entity
@Table(name = "employee_hours")
public class EmployeeHours {

@Id
@Column(name = "id")
@AutoPopulated
Expand All @@ -30,22 +31,23 @@ public class EmployeeHours {
@Schema(description = "employee id", required = true)
private String employeeId;


@NotNull
@Column(name="contributionhours")
@TypeDef(type = DataType.FLOAT)
@Schema(description ="contribution hours of employee", required=true)
private float contributionHours;
@Schema(description ="contribution hours of employee", required = true)
private Float contributionHours;

@NotNull
@Column(name="billablehours")
@TypeDef(type = DataType.FLOAT)
@Schema(description ="billable hours of employee")
private float billableHours;
private Float billableHours;

@NotNull
@Column(name="ptohours")
@TypeDef(type = DataType.FLOAT)
@Schema(description ="PTO hours of employee")
private float ptoHours;
private Float ptoHours;

@Column(name="updateddate")
@NotNull
Expand All @@ -55,29 +57,28 @@ public class EmployeeHours {
@Column(name="targethours")
@NotNull
@Schema(description = "Target hours for an employee", required = true)
private float targetHours;
private Float targetHours;

@Column(name="asofdate")
@Schema(description = "as of Date")
private LocalDate asOfDate;



public EmployeeHours(UUID id, @NotNull String employeeId, @NotNull float contributionHours, float billableHours, float ptoHours,LocalDate updatedDate,float targetHours, LocalDate asOfDate) {
public EmployeeHours(UUID id, @NotNull String employeeId, @NotNull Float contributionHours, Float billableHours, Float ptoHours, LocalDate updatedDate, Float targetHours, LocalDate asOfDate) {
this.id = id;
this.employeeId = employeeId;
this.contributionHours = contributionHours;
this.billableHours = billableHours;
this.ptoHours = ptoHours;
this.updatedDate=updatedDate;
this.targetHours= targetHours;
this.asOfDate= asOfDate;
this.updatedDate = updatedDate;
this.targetHours = targetHours;
this.asOfDate = asOfDate;
}

public EmployeeHours(@NotNull String employeeId, @NotNull float contributionHours, float billableHours, float ptoHours,LocalDate updatedDate, float targetHours, LocalDate asOfDate) {
this(null,employeeId,contributionHours,billableHours,ptoHours,updatedDate,targetHours,asOfDate);
public EmployeeHours(@NotNull String employeeId, @NotNull Float contributionHours, @NotNull Float billableHours, @NotNull Float ptoHours, LocalDate updatedDate, @NotNull Float targetHours, LocalDate asOfDate) {
this(null, employeeId, contributionHours, billableHours, ptoHours, updatedDate, targetHours, asOfDate);
}

public EmployeeHours() {}

public UUID getId() {
return id;
Expand All @@ -95,27 +96,27 @@ public void setEmployeeId(String employeeId) {
this.employeeId = employeeId;
}

public float getContributionHours() {
public Float getContributionHours() {
return contributionHours;
}

public void setContributionHours(float contributionHours) {
public void setContributionHours(Float contributionHours) {
this.contributionHours = contributionHours;
}

public float getBillableHours() {
public Float getBillableHours() {
return billableHours;
}

public void setBillableHours(float billableHours) {
public void setBillableHours(Float billableHours) {
this.billableHours = billableHours;
}

public float getPtoHours() {
public Float getPtoHours() {
return ptoHours;
}

public void setPtoHours(float ptoHours) {
public void setPtoHours(Float ptoHours) {
this.ptoHours = ptoHours;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,41 @@

import io.micronaut.core.annotation.Introspected;

import javax.validation.constraints.NotNull;
import java.util.Set;

@Introspected
public class EmployeeHoursResponseDTO {
private long recordCountDeleted;
private long recordCountInserted;
private Set<EmployeeHours> employeehoursSet ;

public long getRecordCountDeleted() {
return recordCountDeleted;
}
@NotNull
private Long recordCountDeleted;

public Set<EmployeeHours> getEmployeehoursSet() {
return employeehoursSet;
}
@NotNull
private Long recordCountInserted;

public void setEmployeehoursSet(Set<EmployeeHours> employeehoursSet) {
this.employeehoursSet = employeehoursSet;
private Set<EmployeeHours> employeehoursSet;

public Long getRecordCountDeleted() {
return recordCountDeleted;
}

public void setRecordCountDeleted(long recordCountDeleted) {
public void setRecordCountDeleted(Long recordCountDeleted) {
this.recordCountDeleted = recordCountDeleted;
}

public long getRecordCountInserted() {
public Long getRecordCountInserted() {
return recordCountInserted;
}

public void setRecordCountInserted(long recordCountInserted) {
public void setRecordCountInserted(Long recordCountInserted) {
this.recordCountInserted = recordCountInserted;
}

public Set<EmployeeHours> getEmployeehoursSet() {
return employeehoursSet;
}

public void setEmployeehoursSet(Set<EmployeeHours> employeehoursSet) {
this.employeehoursSet = employeehoursSet;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.slf4j.LoggerFactory;

import jakarta.inject.Singleton;
import javax.validation.constraints.NotNull;
import java.io.IOException;
import java.util.*;

Expand Down Expand Up @@ -49,7 +48,7 @@ public EmployeeHoursResponseDTO save(CompletedFileUpload file) {
for(EmployeeHours hours: employeeHoursList) {
employeeHours.add(hours);
}
responseDTO.setRecordCountInserted(employeeHours.size());
responseDTO.setRecordCountInserted((long) employeeHours.size());
responseDTO.setEmployeehoursSet(employeeHours);
} catch (IOException e) {
LOG.error("Error occurred while retrieving files from Google Drive.", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ public class AnniversaryReportResponseDTO {
@Schema(description = "anniversary date this entry is associated with", required = true)
private String anniversary;

@NotNull
@Schema(description = "years of service this entry is associated with")
private double yearsOfService;
private Double yearsOfService;

@NotNull
@Schema(description = "id of the member profile this entry is associated with", required = true)
Expand All @@ -41,11 +42,11 @@ public void setAnniversary(String anniversary) {
this.anniversary = anniversary;
}

public double getYearsOfService() {
public Double getYearsOfService() {
return yearsOfService;
}

public void setYearsOfService(double yearsOfService) {
public void setYearsOfService(Double yearsOfService) {
this.yearsOfService = yearsOfService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

import io.micronaut.core.annotation.Introspected;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@Introspected
public class Interval {

private LocalDate date;

private float value;
@NotNull
private Float value;

public Interval(LocalDate date, float value) {
public Interval(LocalDate date, Float value) {
this.date = date;
this.value = value;
}
Expand All @@ -24,11 +26,11 @@ public void setDate(LocalDate date) {
this.date = date;
}

public float getValue() {
public Float getValue() {
return value;
}

public void setValue(float value) {
public void setValue(Float value) {
this.value = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ public class ReviewPeriod {
@Schema(description = "The name of the review period", required = true)
private String name;

@NotNull
@Column(name = "open")
@Schema(description = "Whether or not the review period is open")
private boolean open = true;
private Boolean open = true;

@Column(name = "review_template_id")
@TypeDef(type = DataType.STRING)
Expand All @@ -56,12 +57,12 @@ public ReviewPeriod(String name) {
this(name, true, null, null);
}

public ReviewPeriod(UUID id, String name, boolean open) {
public ReviewPeriod(UUID id, String name, Boolean open) {
this(name, open, null, null);
this.id = id;
}

public ReviewPeriod(String name, boolean open, UUID reviewTemplateId, UUID selfReviewTemplateId) {
public ReviewPeriod(String name, Boolean open, @Nullable UUID reviewTemplateId, @Nullable UUID selfReviewTemplateId) {
this.name = name;
this.open = open;
this.reviewTemplateId = reviewTemplateId;
Expand All @@ -84,17 +85,19 @@ public void setName(String name) {
this.name = name;
}

public boolean isOpen() { return open; }
public Boolean isOpen() { return open; }

public void setOpen(boolean open) { this.open = open; }
public void setOpen(Boolean open) { this.open = open; }

@Nullable
public UUID getReviewTemplateId() { return reviewTemplateId; }

public void setReviewTemplateId(UUID reviewTemplateId) { this.reviewTemplateId = reviewTemplateId; }
public void setReviewTemplateId(@Nullable UUID reviewTemplateId) { this.reviewTemplateId = reviewTemplateId; }

@Nullable
public UUID getSelfReviewTemplateId() { return selfReviewTemplateId; }

public void setSelfReviewTemplateId(UUID selfReviewTemplateId) { this.selfReviewTemplateId = selfReviewTemplateId; }
public void setSelfReviewTemplateId(@Nullable UUID selfReviewTemplateId) { this.selfReviewTemplateId = selfReviewTemplateId; }

@Override
public boolean equals(Object o) {
Expand Down
Loading