19 package org.turro.member.db.entities;
21 import java.io.Serializable;
22 import javax.persistence.Entity;
23 import javax.persistence.Id;
24 import javax.persistence.IdClass;
25 import org.turro.alliance.service.AxConstants;
26 import org.turro.alliance.service.AxServer;
27 import org.turro.string.Strings;
28 import org.turro.dossier.db.DossierPU;
29 import org.turro.dossier.entity.Dossier;
30 import org.turro.jpa.entity.IDaoEntity;
31 import org.turro.json.Jsons;
32 import org.turro.json.Structure;
33 import org.turro.math.Zero;
34 import org.turro.ws.WsServer;
35 import org.turro.ws.service.member.Servers;
42 @IdClass(AxProjectCategoryPK.class)
45 @Id
private String serverDomain;
46 @Id
private String projectId;
48 private Long categoryId;
55 this.serverDomain = serverDomain;
63 this.projectId = projectId;
71 this.categoryId = categoryId;
76 private transient Dossier dossier;
79 return Strings.isBlank(projectId) ? null :
80 (dossier ==
null ?
new DossierPU().find(
Dossier.class, Long.valueOf(projectId)) : dossier);
84 this.dossier = dossier;
85 this.projectId = dossier ==
null ? null : Long.toString(dossier.
getId());
88 private transient Structure category;
93 Jsons.object().add(
"id", categoryId)).getStructure() : category);
97 this.category = category;
98 this.categoryId = category ==
null ? null : category.getLong(
"categoryId");
110 return Strings.isBlank(serverDomain) ||
111 Strings.isBlank(projectId) ||
static final String SERVER_SERVICE
static boolean orNull(Number value)
static AxProjectCategoryPK from(AxProjectCategory pc)
void setServerDomain(String serverDomain)
void setCategoryId(Long categoryId)
void setProjectId(String projectId)
void setCategory(Structure category)
void setDossier(Dossier dossier)
static WsServer from(String serverDomain, String service)