19 package org.turro.server.db.entities;
21 import java.io.Serializable;
22 import javax.persistence.EmbeddedId;
23 import javax.persistence.Entity;
24 import org.hibernate.annotations.Formula;
25 import org.turro.alliance.db.entities.RelationId;
26 import org.turro.string.Strings;
27 import org.turro.util.Converter;
38 @Formula(
"concat(mainEntityId,'##',mainMemberId)")
41 private boolean banned;
49 if(!Strings.isBlank(
id) &&
id.contains(
"##")) {
50 String v[] =
id.split(
"##");
51 relation.setMainEntityId(v[0]);
52 relation.setMainMemberId(Converter.STANDARD.convert(v[1], Long.class));
61 this.relation = relation;
void setRelation(RelationId relation)
void setBanned(boolean banned)