Commit 7dad4f8d authored by Matija Obreza's avatar Matija Obreza
Browse files

Entity filters inherit from UuidModelFilter

parent d52ed7ea
......@@ -17,15 +17,15 @@ package org.genesys.catalog.service.filters;
import static org.genesys.catalog.model.vocab.QControlledVocabulary.controlledVocabulary;
import org.genesys.blocks.model.filters.AuditedVersionedModelFilter;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.common.model.QPartner;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import com.querydsl.jpa.JPAExpressions;
public class ControlledVocabularyFilter extends AuditedVersionedModelFilter {
public class ControlledVocabularyFilter extends UuidModelFilter {
/** The owner. */
public PartnerFilter owner;
......@@ -46,7 +46,7 @@ public class ControlledVocabularyFilter extends AuditedVersionedModelFilter {
*/
public Predicate buildQuery() {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(controlledVocabulary._super._super, and);
super.buildQuery(controlledVocabulary._super, and);
if (published != null) {
and.and(controlledVocabulary.published.eq(published));
......
......@@ -22,8 +22,8 @@ import java.util.Set;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.filters.AuditedVersionedModelFilter;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
......@@ -34,7 +34,7 @@ import com.querydsl.core.types.Predicate;
* @author Andrey Lugovskoy
* @author Matija Obreza
*/
public class DatasetFilter extends AuditedVersionedModelFilter {
public class DatasetFilter extends UuidModelFilter {
/** Any text. */
public String _text;
......@@ -69,7 +69,7 @@ public class DatasetFilter extends AuditedVersionedModelFilter {
*/
public Predicate buildQuery() {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(dataset._super._super, and);
super.buildQuery(dataset._super, and);
if (published != null) {
and.and(dataset.published.eq(published));
......
......@@ -21,9 +21,9 @@ import java.util.Set;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.filters.AuditedVersionedModelFilter;
import org.genesys.blocks.model.filters.NumberFilter;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.catalog.model.traits.Descriptor.Category;
import org.genesys.catalog.model.traits.QDescriptor;
import org.genesys.catalog.model.traits.QDescriptorList;
......@@ -39,7 +39,7 @@ import com.querydsl.jpa.JPAExpressions;
* @author Andrey Lugovskoy
* @author Matija Obreza
*/
public class DescriptorFilter extends AuditedVersionedModelFilter {
public class DescriptorFilter extends UuidModelFilter {
/** Any text. */
public String _text;
......@@ -100,7 +100,7 @@ public class DescriptorFilter extends AuditedVersionedModelFilter {
public Predicate buildQuery(final QDescriptor descriptorPath) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(descriptorPath._super._super, and);
super.buildQuery(descriptorPath._super, and);
if (crop != null && !crop.isEmpty()) {
and.and(descriptorPath.crop.in(crop));
......
......@@ -21,8 +21,8 @@ import java.util.Set;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.filters.AuditedVersionedModelFilter;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
......@@ -33,7 +33,7 @@ import com.querydsl.core.types.Predicate;
* @author Andrey Lugovskoy
* @author Matija Obreza
*/
public class DescriptorListFilter extends AuditedVersionedModelFilter {
public class DescriptorListFilter extends UuidModelFilter {
/** Any text. */
public String _text;
......@@ -66,7 +66,7 @@ public class DescriptorListFilter extends AuditedVersionedModelFilter {
*/
public Predicate buildQuery() {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(descriptorList._super._super, and);
super.buildQuery(descriptorList._super, and);
if (crop != null && !crop.isEmpty()) {
and.and(descriptorList.crop.in(crop));
......
......@@ -20,8 +20,8 @@ import static org.genesys.common.model.QPartner.partner;
import java.util.Set;
import org.apache.commons.collections4.CollectionUtils;
import org.genesys.blocks.model.filters.AuditedVersionedModelFilter;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.common.model.QPartner;
import com.querydsl.core.BooleanBuilder;
......@@ -32,7 +32,7 @@ import com.querydsl.core.types.Predicate;
*
* @author Andrey Lugovskoy.
*/
public class PartnerFilter extends AuditedVersionedModelFilter {
public class PartnerFilter extends UuidModelFilter {
/** The short name. */
public Set<String> shortName;
......@@ -57,7 +57,7 @@ public class PartnerFilter extends AuditedVersionedModelFilter {
public Predicate buildQuery(final QPartner partnerPath) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(partnerPath._super._super, and);
super.buildQuery(partnerPath._super, and);
if (CollectionUtils.isNotEmpty(shortName)) {
and.and(partnerPath.shortName.in(shortName));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment