Commit 1c52b80c authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch 'eager-load-taxonomyFamily' into 'main'

Code updates

See merge request grin-global/grin-global-server!376
parents 9a33db09 9c4509b7
......@@ -16,18 +16,13 @@
package org.gringlobal.api.v1.impl;
import java.io.IOException;
import java.util.List;
import com.querydsl.core.types.OrderSpecifier;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.gringlobal.api.v1.ApiBaseController;
import org.gringlobal.api.v1.FilteredCRUDController;
import org.gringlobal.api.v1.FilteredPage;
import org.gringlobal.api.v1.Pagination;
import org.gringlobal.custom.elasticsearch.SearchException;
import org.gringlobal.model.AppResource;
import org.gringlobal.model.QAppResource;
import org.gringlobal.service.AppResourceService;
......
......@@ -15,7 +15,6 @@
*/
package org.gringlobal.api.v1.impl;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.validator.routines.EmailValidator;
import org.genesys.blocks.oauth.model.OAuthClient;
import org.genesys.blocks.oauth.persistence.OAuthClientRepository;
......
......@@ -34,7 +34,6 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.SerializationFeature;
/**
* Configuration of integrated services.
......
......@@ -34,6 +34,7 @@ import org.springframework.web.filter.DelegatingFilterProxy;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
import org.tuckey.web.filters.urlrewrite.UrlRewriteFilter;
import org.tuckey.web.filters.urlrewrite.gzip.GzipFilter;
//import com.hazelcast.web.SessionListener;
......@@ -73,9 +74,13 @@ public class MvcContextInitializer extends AbstractAnnotationConfigDispatcherSer
}
};
// Encoding filter configuration
final CharacterEncodingFilter utf8Filter = new CharacterEncodingFilter("UTF-8", true, true);
// Gzip filter
final GzipFilter gzipFilter = new GzipFilter();
final DelegatingFilterProxy springSecurity = new DelegatingFilterProxy("springSecurityFilterChain");
springSecurity.setContextAttribute("org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcher");
......@@ -84,6 +89,8 @@ public class MvcContextInitializer extends AbstractAnnotationConfigDispatcherSer
urlRewriteFilter,
// Enforce UTF-8
utf8Filter,
// GZIP
gzipFilter,
// Security
springSecurity,
// Sitemesh
......
......@@ -104,7 +104,7 @@ public class TaxonomyGenus extends CooperatorOwnedModel implements Copyable<Taxo
@Column(name = "subseries_name", length = 30)
private String subseriesName;
@ManyToOne(fetch = FetchType.LAZY, cascade = {})
@ManyToOne(fetch = FetchType.EAGER, cascade = {})
@JoinColumn(name = "taxonomy_family_id", nullable = false)
@Field(type = FieldType.Object)
@JsonIgnoreProperties({ "ownedBy", "createdBy", "modifiedBy", "typeTaxonomyGenus", "currentTaxonomyFamily", "note" })
......
......@@ -26,7 +26,6 @@ import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys.blocks.model.Copyable;
import org.genesys.blocks.security.model.AclAwareModel;
......@@ -37,8 +36,6 @@ import org.gringlobal.model.Site;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Arrays;
/**
* GG-CE Security Action is an ACL OID to which ACL entries are assigned.
*
......
......@@ -17,7 +17,6 @@ package org.gringlobal.persistence.community;
import org.gringlobal.model.Site;
import org.gringlobal.model.community.SecuredAction;
import org.gringlobal.model.community.SecurityAction;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;
......
......@@ -18,7 +18,6 @@ package org.gringlobal.persistence.kpi;
import java.util.Set;
import org.gringlobal.model.kpi.DimensionKey;
import org.gringlobal.model.kpi.Execution;
import org.gringlobal.model.kpi.ExecutionRun;
import org.gringlobal.model.kpi.Observation;
import org.springframework.data.domain.Page;
......
......@@ -17,7 +17,6 @@ package org.gringlobal.persistence.kpi;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import java.util.Set;
import java.util.stream.Collectors;
......@@ -27,7 +26,6 @@ import com.querydsl.core.types.dsl.PathBuilder;
import com.querydsl.jpa.impl.JPAQuery;
import com.querydsl.jpa.impl.JPAQueryFactory;
import org.gringlobal.model.kpi.DimensionKey;
import org.gringlobal.model.kpi.Execution;
import org.gringlobal.model.kpi.ExecutionRun;
import org.gringlobal.model.kpi.Observation;
import org.gringlobal.model.kpi.QObservation;
......
......@@ -34,6 +34,7 @@ public interface AccessionActionService extends ActionService<AccessionAction, A
}
class AccessionActionScheduleFilter extends ActionService.ActionScheduleFilter<AccessionAction> {
private static final long serialVersionUID = -5335781949017851207L;
public AccessionFilter accession;
}
}
......
......@@ -69,6 +69,7 @@ public interface ActionService<T extends AbstractAction<T>, F extends ActionFilt
}
abstract class ActionScheduleFilter<T extends AbstractAction<T>> extends SuperModelFilter<ActionScheduleFilter<T>, T> {
private static final long serialVersionUID = 6905980861555793439L;
@NotNull
public Date fromInclusive; // x >= DATE1
@NotNull
......
......@@ -42,6 +42,7 @@ public interface InventoryActionService extends ActionService<InventoryAction, I
}
class InventoryActionScheduleFilter extends ActionService.ActionScheduleFilter<InventoryAction> {
private static final long serialVersionUID = -4364656770058858145L;
public InventoryFilter inventory;
}
}
......
......@@ -33,6 +33,7 @@ public interface InventoryViabilityActionService extends ActionService<Inventory
}
class InventoryViabilityActionScheduleFilter extends ActionService.ActionScheduleFilter<InventoryViabilityAction> {
private static final long serialVersionUID = -8417006860158986875L;
public InventoryViabilityFilter inventoryViability;
}
}
......@@ -39,6 +39,7 @@ public interface OrderRequestActionService extends ActionService<OrderRequestAct
}
class OrderRequestActionScheduleFilter extends ActionService.ActionScheduleFilter<OrderRequestAction> {
private static final long serialVersionUID = -384520835609810328L;
public OrderRequestFilter orderRequest;
}
......
......@@ -40,6 +40,7 @@ public interface OrderRequestItemActionService extends ActionService<OrderReques
}
class OrderRequestItemActionScheduleFilter extends ActionService.ActionScheduleFilter<OrderRequestItemAction> {
private static final long serialVersionUID = 394794380324680608L;
public OrderRequestItemFilter orderRequestItem;
}
......
......@@ -28,6 +28,8 @@ import com.querydsl.core.types.Predicate;
*/
public class AccessionActionFilter extends ActionFilter<AccessionActionFilter, AccessionAction> {
private static final long serialVersionUID = 3290113151060922955L;
public AccessionFilter accession;
/**
......
......@@ -34,6 +34,8 @@ import com.querydsl.core.types.Predicate;
*/
public class AccessionFilter extends CooperatorOwnedModelFilter<AccessionFilter, Accession> implements IFullTextFilter {
private static final long serialVersionUID = -7684502726900427124L;
/** Any text. */
public String _text;
......
......@@ -31,6 +31,7 @@ import com.querydsl.core.types.Predicate;
*/
public class AccessionInvGroupFilter extends CooperatorOwnedModelFilter<AccessionInvGroupFilter, AccessionInvGroup> {
private static final long serialVersionUID = 6538687263701155313L;
/** Any text. */
public StringFilter groupName;
......
......@@ -30,6 +30,8 @@ import com.querydsl.core.types.Predicate;
*/
public class AccessionSourceFilter extends CooperatorOwnedModelFilter<AccessionSourceFilter, AccessionSource> {
private static final long serialVersionUID = 8108778483347390574L;
/** sourceTypeCodes */
public Set<String> sourceTypeCode;
......
......@@ -36,6 +36,7 @@ import com.querydsl.core.types.dsl.EntityPathBase;
*/
public abstract class ActionFilter<T extends ActionFilter<T, R>, R extends AbstractAction<R>> extends CooperatorOwnedModelFilter<T, R> {
private static final long serialVersionUID = 3870340079764137534L;
/** The action name code. */
public Set<String> actionNameCode;
/** Action "state" */
......
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