85 lines
2.0 KiB
Java
85 lines
2.0 KiB
Java
package eu.eudat.query.lookup;
|
|
|
|
import eu.eudat.commons.enums.IsActive;
|
|
import eu.eudat.query.UserQuery;
|
|
import gr.cite.tools.data.query.Lookup;
|
|
import gr.cite.tools.data.query.QueryFactory;
|
|
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
|
|
public class UserLookup extends Lookup {
|
|
|
|
private String like;
|
|
|
|
private List<UUID> ids;
|
|
private List<String> emails;
|
|
|
|
private List<UUID> excludedIds;
|
|
private List<IsActive> isActive;
|
|
private UserRoleLookup userRoleSubQuery;
|
|
|
|
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<String> getEmails() {
|
|
return emails;
|
|
}
|
|
|
|
public void setEmails(List<String> emails) {
|
|
this.emails = emails;
|
|
}
|
|
|
|
public UserRoleLookup getUserRoleSubQuery() {
|
|
return userRoleSubQuery;
|
|
}
|
|
|
|
public void setUserRoleSubQuery(UserRoleLookup userRoleSubQuery) {
|
|
this.userRoleSubQuery = userRoleSubQuery;
|
|
}
|
|
|
|
public UserQuery enrich(QueryFactory queryFactory) {
|
|
UserQuery query = queryFactory.query(UserQuery.class);
|
|
if (this.like != null) query.like(this.like);
|
|
if (this.ids != null) query.ids(this.ids);
|
|
if (this.emails != null) query.emails(this.emails);
|
|
if (this.userRoleSubQuery != null) query.userRoleSubQuery(this.userRoleSubQuery.enrich(queryFactory));
|
|
if (this.excludedIds != null) query.excludedIds(this.excludedIds);
|
|
if (this.isActive != null) query.isActive(this.isActive);
|
|
|
|
this.enrichCommon(query);
|
|
|
|
return query;
|
|
}
|
|
|
|
}
|