<commit_before>package de.fau.cs.mad.kwikshop.common;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import de.fau.cs.mad.kwikshop.common.util.NamedQueryConstants;

import javax.persistence.*;

import java.util.Date;

@Entity
@NamedQueries({
        @NamedQuery(
                name = NamedQueryConstants.SYNCHRONIZATIONLEASE_GET_ALL_FOR_USER,
                query = "SELECT l FROM SynchronizationLease l WHERE l.userId = :" + NamedQueryConstants.USER_ID
        ),
        @NamedQuery(
                name = NamedQueryConstants.SYNCHRONIZATIONLEASE_GET_BY_ID,
                query = "SELECT l FROM SynchronizationLease l WHERE l.id = :" + NamedQueryConstants.SYNCHRONIZATIONLEASE_ID
        ),
        @NamedQuery(
                name = NamedQueryConstants.SYNCHRONIZATIONLEASE_GET_BY_ID_AND_OWNER,
                query = "SELECT l FROM SynchronizationLease l WHERE l.userId = :" + NamedQueryConstants.USER_ID +
                        " AND l.id = :" + NamedQueryConstants.SYNCHRONIZATIONLEASE_ID
        )
})
public class SynchronizationLease {

    @Column
    @Id
    private int id;

    @Column
    private String clientId;

    @Column
    private String userId;

    @Column
    private Date expirationTime;


    @JsonProperty
    public int getId() {
        return this.id;
    }

    public void setId(int value) {
        this.id = value;
    }

    @JsonIgnore
    public String getClientId() {
        return this.clientId;
    }

    public void setClientId(String value){
        this.clientId = value;
    }

    @JsonProperty
    public String getUserId() {
        return this.userId;
    }

    public void setUserId(String value) {
        this.userId = value;
    }

    @JsonProperty
    public Date getExpirationTime() {
        return expirationTime;
    }

    public void setExpirationTime(Date value) {
        this.expirationTime = value;
    }
}<commit_msg>Fixed date serialization in SynchronizationLease<commit_after>package de.fau.cs.mad.kwikshop.common;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import de.fau.cs.mad.kwikshop.common.serialization.DateDeserializer;
import de.fau.cs.mad.kwikshop.common.serialization.DateSerializer;
import de.fau.cs.mad.kwikshop.common.util.NamedQueryConstants;

import javax.persistence.*;

import java.util.Date;

@Entity
@NamedQueries({
        @NamedQuery(
                name = NamedQueryConstants.SYNCHRONIZATIONLEASE_GET_ALL_FOR_USER,
                query = "SELECT l FROM SynchronizationLease l WHERE l.userId = :" + NamedQueryConstants.USER_ID
        ),
        @NamedQuery(
                name = NamedQueryConstants.SYNCHRONIZATIONLEASE_GET_BY_ID,
                query = "SELECT l FROM SynchronizationLease l WHERE l.id = :" + NamedQueryConstants.SYNCHRONIZATIONLEASE_ID
        ),
        @NamedQuery(
                name = NamedQueryConstants.SYNCHRONIZATIONLEASE_GET_BY_ID_AND_OWNER,
                query = "SELECT l FROM SynchronizationLease l WHERE l.userId = :" + NamedQueryConstants.USER_ID +
                        " AND l.id = :" + NamedQueryConstants.SYNCHRONIZATIONLEASE_ID
        )
})
public class SynchronizationLease {

    @Column
    @Id
    private int id;

    @Column
    private String clientId;

    @Column
    private String userId;

    @Column
    private Date expirationTime;


    @JsonProperty
    public int getId() {
        return this.id;
    }

    public void setId(int value) {
        this.id = value;
    }

    @JsonIgnore
    public String getClientId() {
        return this.clientId;
    }

    public void setClientId(String value){
        this.clientId = value;
    }

    @JsonProperty
    public String getUserId() {
        return this.userId;
    }

    public void setUserId(String value) {
        this.userId = value;
    }

    @JsonProperty
    @JsonSerialize(using = DateSerializer.class)
    public Date getExpirationTime() {
        return expirationTime;
    }

    @JsonDeserialize(using = DateDeserializer.class)
    public void setExpirationTime(Date value) {
        this.expirationTime = value;
    }
}
{'fraction_non_alphanumeric': 0.08207744029677719, 'fraction_numerical': 0.0, 'mean_word_length': 2.6040100250626566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '17349', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1284, 'n_words': 258}