<commit_before>package com.devicehive.model;

import com.devicehive.json.strategies.JsonPolicyDef;
import com.google.gson.annotations.SerializedName;

import javax.persistence.*;
import javax.persistence.Version;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

import static com.devicehive.json.strategies.JsonPolicyDef.Policy.*;

/**
 * TODO JavaDoc
 */
@Entity
@Table(name = "device_command")
@NamedQueries({
        @NamedQuery(name = "DeviceCommand.getNewerThan",
                query = "select dc from DeviceCommand dc where dc.timestamp > :timestamp and dc.device = :device"),
        @NamedQuery(name = "DeviceCommand.deleteById", query = "delete from DeviceCommand dc where dc.id = :id"),
        @NamedQuery(name = "DeviceCommand.updateById",
                query = "update DeviceCommand dc set " +
                        "dc.timestamp = :timestamp, " +
                        "dc.parameters = :parameters, " +
                        "dc.lifetime = :lifetime, " +
                        "dc.flags = :flags, " +<commit_msg>Small fix for get command by deviceId and timestamp<commit_after>package com.devicehive.model;

import com.devicehive.json.strategies.JsonPolicyDef;
import com.google.gson.annotations.SerializedName;

import javax.persistence.*;
import javax.persistence.Version;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

import static com.devicehive.json.strategies.JsonPolicyDef.Policy.*;

/**
 * TODO JavaDoc
 */
@Entity
@Table(name = "device_command")
@NamedQueries({
        @NamedQuery(name = "DeviceCommand.getNewerThan",
                query = "select dc from DeviceCommand dc where dc.timestamp >= :timestamp and dc.device = :device"),
        @NamedQuery(name = "DeviceCommand.deleteById", query = "delete from DeviceCommand dc where dc.id = :id"),
        @NamedQuery(name = "DeviceCommand.updateById",
                query = "update DeviceCommand dc set " +
                        "dc.timestamp = :timestamp, " +
                        "dc.parameters = :parameters, " +
                        "dc.lifetime = :lifetime, " +
                        "dc.flags = :flags, " +
{'fraction_non_alphanumeric': 0.1138633639632441, 'fraction_numerical': 0.0, 'mean_word_length': 3.0583468395461915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1082252', 'n_tokens_mistral': 690, 'n_tokens_neox': 683, 'n_words': 152}