Changeset fdfc6fa


Ignore:
Timestamp:
02/02/23 18:27:30 (17 months ago)
Author:
SazdovaEkaterina <sazdovaekaterina@…>
Branches:
main
Children:
4885da3, 579bf6d, a3aea2a
Parents:
6f9c38f
Message:

change to LocalDate

Date (Java) was incompatible with date (postgresql) because it expected a timestamp type, not date

Location:
Prototype Application/Paw5/src/main/java/finki/paw5/model
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/Adoption.java

    r6f9c38f rfdfc6fa  
    77import lombok.Data;
    88
     9import java.time.LocalDate;
    910import java.util.Date;
    1011
     
    1920
    2021    @Column(name = "start_date", nullable = false)
    21     private Date startDate;
     22    private LocalDate startDate;
    2223
    2324    @Column(name = "end_date_foster")
    24     private Date endDateFoster;
     25    private LocalDate endDateFoster;
    2526
    2627    @Column(name = "approved", nullable = false)
     
    3031    private int adopterId;
    3132
    32     public Adoption(Date startDate, Date endDateFoster, boolean approved, int adopterId) {
     33    public Adoption(LocalDate startDate, LocalDate endDateFoster, boolean approved, int adopterId) {
    3334        this.startDate = startDate;
    3435        this.endDateFoster = endDateFoster;
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/Donor.java

    r6f9c38f rfdfc6fa  
    1919    private boolean fromOrganisation;
    2020
    21     @Column(name = "name_organisation", nullable = true, length = 100)
     21    @Column(name = "name_organisation_donor", nullable = true, length = 100)
    2222    private String organisationName;
    2323
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/Post.java

    r6f9c38f rfdfc6fa  
    77import lombok.Data;
    88
     9import java.time.LocalDate;
    910import java.util.Date;
    1011
     
    1920
    2021    @Column(name="date_post", nullable = false)
    21     private Date dateCreated;
     22    private LocalDate dateCreated;
    2223
    2324    @Column(name="url_thumbanail", length = 200)
     
    3334    private int employeeId;
    3435
    35     public Post(Date dateCreated, String thumbnailUrl, int petId, int surendeeId, int employeeId) {
     36    public Post(LocalDate dateCreated, String thumbnailUrl, int petId, int surendeeId, int employeeId) {
    3637        this.dateCreated = dateCreated;
    3738        this.thumbnailUrl = thumbnailUrl;
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/Therapy.java

    r6f9c38f rfdfc6fa  
    77import lombok.Data;
    88
     9import java.time.LocalDate;
    910import java.util.Date;
    1011
     
    2223
    2324    @Column(name = "start_date")
    24     private Date startDate;
     25    private LocalDate startDate;
    2526
    2627    @Column(name = "end_date")
    27     private Date endDate;
     28    private LocalDate endDate;
    2829
    29     public Therapy(String healthProblem, Date startDate, Date endDate) {
     30    public Therapy(String healthProblem, LocalDate startDate, LocalDate endDate) {
    3031        this.healthProblem = healthProblem;
    3132        this.startDate = startDate;
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/User.java

    r6f9c38f rfdfc6fa  
    77import lombok.Data;
    88
     9import java.time.LocalDate;
    910import java.util.Date;
    1011
     
    1920
    2021    @Column(name = "date_created_user", nullable = false)
    21     private Date dateCreated;
     22    private LocalDate dateCreated;
    2223
    2324    @Column(name = "name_user", nullable = false, length = 100)
     
    3031    private String password;
    3132
    32     @Column(name = "telephone", length = 20)
     33    @Column(name = "telephone_user", length = 20)
    3334    private String telephone;
    3435
    35     public User(Date dateCreated, String name, String email, String password, String telephone) {
     36    public User(LocalDate dateCreated, String name, String email, String password, String telephone) {
    3637        this.dateCreated = dateCreated;
    3738        this.name = name;
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsInterventionInVetClinic.java

    r6f9c38f rfdfc6fa  
    77import lombok.Data;
    88
     9import java.time.LocalDate;
    910import java.util.Date;
    1011
     
    2324
    2425    @Column(name = "date_of_interventing", nullable = false)
    25     private Date interventionDate;
     26    private LocalDate interventionDate;
    2627
    2728    @Column(name = "description", length = 100)
    2829    private String description;
    2930
    30     public PetNeedsInterventionInVetClinic(int petId, int vetClinicId, Date interventionDate, String description) {
     31    public PetNeedsInterventionInVetClinic(int petId, int vetClinicId, LocalDate interventionDate, String description) {
    3132        this.petId = petId;
    3233        this.vetClinicId = vetClinicId;
Note: See TracChangeset for help on using the changeset viewer.