118 lines
2.6 KiB
Java
118 lines
2.6 KiB
Java
package gr.cite.annotation.query.lookup;
|
|
|
|
import gr.cite.annotation.common.enums.IsActive;
|
|
import gr.cite.annotation.query.AnnotationQuery;
|
|
import gr.cite.tools.data.query.Lookup;
|
|
import gr.cite.tools.data.query.QueryFactory;
|
|
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
|
|
public class AnnotationLookup extends Lookup {
|
|
|
|
private String like;
|
|
|
|
private List<UUID> ids;
|
|
|
|
private List<UUID> excludedIds;
|
|
|
|
private List<IsActive> isActive;
|
|
|
|
private List<UUID> entityIds;
|
|
|
|
private List<String> entityTypes;
|
|
|
|
private List<String> anchors;
|
|
|
|
private List<UUID> threadIds;
|
|
|
|
public String getLike() {
|
|
return like;
|
|
}
|
|
|
|
public void setLike(String like) {
|
|
this.like = like;
|
|
}
|
|
|
|
public List<UUID> getIds() {
|
|
return ids;
|
|
}
|
|
|
|
public void setIds(List<UUID> ids) {
|
|
this.ids = ids;
|
|
}
|
|
|
|
public List<UUID> getExcludedIds() {
|
|
return excludedIds;
|
|
}
|
|
|
|
public void setExcludedIds(List<UUID> excludedIds) {
|
|
this.excludedIds = excludedIds;
|
|
}
|
|
|
|
public List<IsActive> getIsActive() {
|
|
return isActive;
|
|
}
|
|
|
|
public void setIsActive(List<IsActive> isActive) {
|
|
this.isActive = isActive;
|
|
}
|
|
|
|
public List<UUID> getEntityIds() {
|
|
return entityIds;
|
|
}
|
|
|
|
public void setEntityIds(List<UUID> entityIds) {
|
|
this.entityIds = entityIds;
|
|
}
|
|
|
|
public List<String> getEntityTypes() {
|
|
return entityTypes;
|
|
}
|
|
|
|
public void setEntityTypes(List<String> entityTypes) {
|
|
this.entityTypes = entityTypes;
|
|
}
|
|
|
|
public List<String> getAnchors() {
|
|
return anchors;
|
|
}
|
|
|
|
public void setAnchors(List<String> anchors) {
|
|
this.anchors = anchors;
|
|
}
|
|
|
|
public List<UUID> getThreadIds() {
|
|
return threadIds;
|
|
}
|
|
|
|
public void setThreadIds(List<UUID> threadIds) {
|
|
this.threadIds = threadIds;
|
|
}
|
|
|
|
public AnnotationQuery enrich(QueryFactory queryFactory) {
|
|
AnnotationQuery query = queryFactory.query(AnnotationQuery.class);
|
|
if (this.like != null)
|
|
query.like(this.like);
|
|
if (this.ids != null)
|
|
query.ids(this.ids);
|
|
if (this.excludedIds != null)
|
|
query.excludedIds(this.excludedIds);
|
|
if (this.isActive != null)
|
|
query.isActive(this.isActive);
|
|
if (this.entityIds != null)
|
|
query.entityIds(this.entityIds);
|
|
if (this.entityTypes != null)
|
|
query.entityTypes(this.entityTypes);
|
|
if (this.anchors != null)
|
|
query.anchors(this.anchors);
|
|
if (this.threadIds != null)
|
|
query.threadIds(this.threadIds);
|
|
|
|
this.enrichCommon(query);
|
|
|
|
return query;
|
|
}
|
|
|
|
}
|