<commit_before>package cz.esc.iot.cloudservice.persistance.model;

import java.util.List;
import java.util.Objects;
import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Reference;

import com.google.gson.annotations.Expose;

@Entity
public class HubEntity {

    @Id
    private ObjectId id;
    @Expose private String uuid;
    @Reference
    @Expose private List<SensorEntity> sensorEntities;
    @Reference
    private UserEntity user;

    public HubEntity() {
    }

    public ObjectId getId() {
        return id;
    }

    public UserEntity getUser() {
		return user;
	}

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

	public void setId(ObjectId id) {
        this.id = id;
    }
<commit_msg>added unique index on uuid<commit_after>package cz.esc.iot.cloudservice.persistance.model;

import java.util.List;
import java.util.Objects;
import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Reference;

import com.google.gson.annotations.Expose;
import org.mongodb.morphia.annotations.Indexed;

@Entity
public class HubEntity {

    @Id
    private ObjectId id;
    @Indexed(unique = true)
    @Expose private String uuid;
    @Reference
    @Expose private List<SensorEntity> sensorEntities;
    @Reference
    private UserEntity user;

    public HubEntity() {
    }

    public ObjectId getId() {
        return id;
    }

    public UserEntity getUser() {
		return user;
	}

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

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

{'fraction_non_alphanumeric': 0.09695926563396443, 'fraction_numerical': 0.0, 'mean_word_length': 3.404040404040404, 'pattern_counts': {'":': 0, '<': 5, '<?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': '830608', 'n_tokens_mistral': 578, 'n_tokens_neox': 563, 'n_words': 130}