Skip to content

Commit

Permalink
Merge pull request #1 from ncats/starter-plural
Browse files Browse the repository at this point in the history
made context plural
  • Loading branch information
narchana authored Sep 29, 2021
2 parents 467126b + afc161a commit 53c781d
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,25 @@ public class ApplicationCommanData extends AbstractGsrsEntity {
// @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "appSeq")
// public Long id;

@Indexable(facet = true, name = "Record Created By")
@Column(name = "CREATED_BY")
private String createdBy;

@Indexable(name = "Record Last Edited By")
@Column(name = "MODIFIED_BY")
private String modifiedBy;

@JsonSerialize(using = GsrsDateSerializer.class)
@JsonDeserialize(using = GsrsDateDeserializer.class)
@CreatedDate
@Indexable( name = "Create Date", sortable=true)
@Indexable( name = "Record Create Date", sortable=true)
@Column(name = "CREATE_DATE")
private Date creationDate;

@JsonSerialize(using = GsrsDateSerializer.class)
@JsonDeserialize(using = GsrsDateDeserializer.class)
@LastModifiedDate
@Indexable( name = "Last Modified Date", sortable=true)
@Indexable( name = "Record Last Edited", sortable=true)
@Column(name = "MODIFY_DATE")
private Date lastModifiedDate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class ApplicationIngredient extends AbstractGsrsEntity {
@Column(name = "CREATED_BY")
public String createdBy;

@Indexable(facet = true, name = "Ingredient Last Modified By")
@Indexable(facet = true, name = "Ingredient Last Edited By")
@Column(name = "MODIFIED_BY")
public String modifiedBy;

Expand All @@ -113,7 +113,7 @@ public class ApplicationIngredient extends AbstractGsrsEntity {
@JsonSerialize(using = GsrsDateSerializer.class)
@JsonDeserialize(using = GsrsDateDeserializer.class)
@LastModifiedDate
@Indexable( name = "Ingredient Last Modified Date", sortable=true)
@Indexable( name = "Ingredient Last Edited", sortable=true)
@Column(name = "MODIFY_DATE")
private Date lastModifiedDate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@Service
public class ApplicationEntityService extends AbstractGsrsEntityService<Application, Long> {
public static final String CONTEXT = "application";
public static final String CONTEXT = "applications";

public ApplicationEntityService() {
super(CONTEXT, IdHelpers.NUMBER, null, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,22 @@ public class ApplicationAllController extends EtagLegacySearchEntityController<A

@PersistenceContext(unitName = ApplicationDataSourceConfig.NAME_ENTITY_MANAGER)
private EntityManager entityManager;

@Autowired
private GsrsControllerConfiguration gsrsControllerConfiguration;

@Autowired
private PlatformTransactionManager transactionManager;

@Autowired
private ExportService exportService;

@Autowired
private TaskExecutor taskExecutor;

@Autowired
private GsrsExportConfiguration gsrsExportConfiguration;


@Autowired
private ApplicationAllEntityService applicationEntityService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import ix.core.models.Indexable;
import ix.core.models.IndexableRoot;
import lombok.Data;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

import javax.persistence.*;
import java.util.ArrayList;
Expand Down Expand Up @@ -60,9 +62,10 @@ public String getId() {
}

@JoinColumn(name = "APPLICATION_ID", referencedColumnName = "APPLICATION_ID")
@OneToMany(cascade = CascadeType.ALL)
@OneToMany(fetch=FetchType.EAGER, cascade = CascadeType.ALL)
public List<ProductSrsAll> applicationProductList = new ArrayList<>();

@LazyCollection(LazyCollectionOption.FALSE)
@Indexable(indexed=false)
@OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL)
@JoinColumn(name="APPLICATION_ID", referencedColumnName="APPLICATION_ID")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import gsrs.model.AbstractGsrsEntity;
import lombok.Data;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

import javax.persistence.*;
import java.util.ArrayList;
Expand All @@ -23,12 +25,14 @@ public class ProductSrsAll extends AbstractGsrsEntity {
public String dosageForm;

@JoinColumn(name = "PRODUCT_ID", referencedColumnName = "PRODUCT_ID")
@OneToMany(cascade = CascadeType.ALL)
public List<AppIngredientAll> applicationIngredientList = new ArrayList<>();
@OneToMany(fetch=FetchType.EAGER, cascade = CascadeType.ALL)
public List<ProductNameSrsAll> applicationProductNameList = new ArrayList<>();

@LazyCollection(LazyCollectionOption.FALSE)
@JoinColumn(name = "PRODUCT_ID", referencedColumnName = "PRODUCT_ID")
@OneToMany(cascade = CascadeType.ALL)
public List<ProductNameSrsAll> applicationProductNameList = new ArrayList<>();
@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL)
public List<AppIngredientAll> applicationIngredientList = new ArrayList<>();


public ProductSrsAll () {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

@Service
public class ApplicationAllEntityService extends AbstractGsrsEntityService<ApplicationAll, String> {
public static final String CONTEXT = "applicationall";
public static final String CONTEXT = "applicationsall";

public ApplicationAllEntityService() {
super(CONTEXT, IdHelpers.STRING_NO_WHITESPACE, null, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import ix.core.models.Backup;
import ix.core.models.IndexableRoot;
import lombok.Data;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

import javax.persistence.*;
import java.util.ArrayList;
Expand Down Expand Up @@ -55,14 +57,15 @@ public class ApplicationDarrts extends AbstractGsrsEntity {
@Column(name="ROUTE_OF_ADMIN")
public String routeOfAdmin;

@OneToMany(cascade = CascadeType.ALL)
@OneToMany(fetch=FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumns({
@JoinColumn(name="APP_TYPE", referencedColumnName = "APP_TYPE", insertable = false, updatable = false ),
@JoinColumn(name="APP_NUMBER", referencedColumnName = "APP_NUMBER", insertable = false, updatable = false)
})
public List<ApplicationDarrtsIngredient> ingredientList = new ArrayList<ApplicationDarrtsIngredient>();

@OneToMany(cascade = CascadeType.ALL)
@LazyCollection(LazyCollectionOption.FALSE)
@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL)
@JoinColumns({
@JoinColumn(name="APP_TYPE", referencedColumnName = "APP_TYPE", insertable = false, updatable = false ),
@JoinColumn(name="APP_NUMBER", referencedColumnName = "APP_NUMBER", insertable = false, updatable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@Service
public class ApplicationDarrtsEntityService extends AbstractGsrsEntityService<ApplicationDarrts, String> {
public static final String CONTEXT = "applicationdarrts";
public static final String CONTEXT = "applicationsdarrts";

public ApplicationDarrtsEntityService() {
super(CONTEXT, IdHelpers.STRING_NO_WHITESPACE, null, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

@Service
public class SearchCountEntityService extends AbstractGsrsEntityService<SubstanceSearchCount, String> {
public static final String CONTEXT = "searchcount";
public static final String CONTEXT = "searchcounts";

public SearchCountEntityService() {
super(CONTEXT, IdHelpers.STRING_NO_WHITESPACE, null, null, null);
Expand Down

0 comments on commit 53c781d

Please sign in to comment.