argos/dmp-backend/core/src/main/java/eu/eudat/elastic/data/nested/NestedCollaboratorElasticEn...

50 lines
1.2 KiB
Java

package eu.eudat.elastic.data.nested;
import eu.eudat.commons.enums.DmpUserRole;
import gr.cite.tools.elastic.ElasticConstants;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.*;
import java.util.UUID;
public class NestedCollaboratorElasticEntity {
@Id
@Field(value = NestedCollaboratorElasticEntity._id, type = FieldType.Keyword)
private UUID id;
public final static String _id = "id";
@MultiField(mainField = @Field(value = NestedCollaboratorElasticEntity._name, type = FieldType.Text), otherFields = {
@InnerField(suffix = ElasticConstants.SubFields.keyword, type = FieldType.Keyword)
})
private String name;
public final static String _name = "name";
@Field(value = NestedCollaboratorElasticEntity._role, type = FieldType.Short)
private DmpUserRole role;
public final static String _role = "role";
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public DmpUserRole getRole() {
return role;
}
public void setRole(DmpUserRole role) {
this.role = role;
}
}