You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
814 B
Java
43 lines
814 B
Java
package eu.eudat.elastic.entities;
|
|
|
|
import org.elasticsearch.common.xcontent.XContentBuilder;
|
|
|
|
import java.io.IOException;
|
|
import java.util.Map;
|
|
import java.util.UUID;
|
|
|
|
public class Collaborator implements ElasticEntity<Collaborator> {
|
|
private String id;
|
|
private String name;
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
@Override
|
|
public XContentBuilder toElasticEntity(XContentBuilder builder) throws IOException {
|
|
builder.startObject();
|
|
builder.field("id", this.id);
|
|
builder.field("name", this.name);
|
|
builder.endObject();
|
|
return builder;
|
|
}
|
|
|
|
@Override
|
|
public Collaborator fromElasticEntity(Map<String, Object> fields) {
|
|
return null;
|
|
}
|
|
}
|