19 package org.turro.elephant.entities.db;
21 import java.io.Serializable;
23 import javax.json.JsonValue;
24 import javax.persistence.Entity;
25 import javax.persistence.Id;
26 import javax.persistence.IdClass;
27 import javax.persistence.Index;
28 import javax.persistence.Table;
29 import org.turro.json.IJSONizable;
30 import org.turro.string.Strings;
31 import org.turro.tags.TagMeta;
40 @Index(name =
"TagIndex", columnList =
"tagName")
42 public class Tag implements Serializable, IJSONizable {
44 @Id
private String tagName;
45 @Id
private String entityPath;
52 this.tagName = tagName;
60 this.entityPath = entityPath;
66 return Strings.isBlank(tagName) || Strings.isBlank(entityPath);
81 public String
toJson(Map<String, Object> properties) {
82 return toJson(
this, properties);
86 return IJSONizable.
fromJson(value.toString(),
Tag.class);
void setTagName(String tagName)
static Tag fromJson(JsonValue value)
String toJson(Map< String, Object > properties)
void setEntityPath(String entityPath)