Commit b185e85e authored by Viacheslav Pavlov's avatar Viacheslav Pavlov

removed rights from subset model

parent 64a8e983
......@@ -77,9 +77,6 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning {
@Column(length = 100)
protected String dateCreated;
/** The rights. */
@Column(length = 100)
protected String rights;
/** The wiews code. */
@Column(name = "wiews_code", length = 8, nullable = false)
......@@ -252,24 +249,6 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning {
this.dateCreated = dateCreated;
}
/**
* Gets the subset rights.
*
* @return the subset rights
*/
public String getRights() {
return rights;
}
/**
* Sets the subset rights.
*
* @param rights the new subset rights
*/
public void setRights(final String rights) {
this.rights = rights;
}
/**
* Gets the accessionRefs.
*
......@@ -284,8 +263,8 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning {
*
* @param accessionRefs the new accessionRefs
*/
public void setAccessionRefs(Set<AccessionRef> accessions) {
this.accessionRefs = accessions;
public void setAccessionRefs(Set<AccessionRef> accessionRefs) {
this.accessionRefs = accessionRefs;
}
/**
......
......@@ -48,8 +48,6 @@ public class SubsetFilter extends UuidModelFilter<SubsetFilter, Subset> {
/** The date created. */
public StringFilter dateCreated;
/** The rights. */
public Set<String> rights;
/** Institutes. */
public Set<String> institutes;
......@@ -83,9 +81,6 @@ public class SubsetFilter extends UuidModelFilter<SubsetFilter, Subset> {
if (dateCreated != null) {
and.and(dateCreated.buildQuery(subset.dateCreated));
}
if ((rights != null) && !rights.isEmpty()) {
and.and(subset.rights.in(rights));
}
if (state != null && !state.isEmpty()) {
and.and(subset.state.in(state));
}
......
......@@ -178,7 +178,6 @@ public class SubsetServiceImpl implements SubsetService {
target.setDescription(source.getDescription());
target.setPublisher(source.getPublisher());
target.setDateCreated(source.getDateCreated());
target.setRights(source.getRights());
target.setUuid(source.getUuid());
target.setDate(source.getDate());
target.setSource(source.getSource());
......
......@@ -4439,6 +4439,15 @@ databaseChangeLog:
tableName: kpidimension
- changeSet:
id: 1540486364926-1
author: vpavlov
changes:
- dropColumn:
tableName: subset
columnName: rights
# ENABLE AFTER SOME TIME
# - changeSet:
# id: 1537463144763-folder
......
......@@ -81,7 +81,6 @@ public class SubsetRestControllerTest extends AbstractApiTest {
private static final String DESCRIPTION_2 = "Subset test description 2";
private static final String PUBLISHER = "Test publisher";
private static final String DATE_CREATED = "2018-02-01";
private static final String RIGHTS = "Test rights";
@Rule
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("target/generated-snippets");
......@@ -164,7 +163,6 @@ public class SubsetRestControllerTest extends AbstractApiTest {
.andExpect(jsonPath("$.description", is(DESCRIPTION)))
.andExpect(jsonPath("$.publisher", is(PUBLISHER)))
.andExpect(jsonPath("$.dateCreated", is(DATE_CREATED)))
.andExpect(jsonPath("$.rights", is(RIGHTS)))
.andExpect(jsonPath("$.accessionRefs", hasSize(2)));
/*@formatter:on*/
}
......@@ -366,7 +364,6 @@ public class SubsetRestControllerTest extends AbstractApiTest {
subset.setDescription(DESCRIPTION);
subset.setPublisher(PUBLISHER);
subset.setDateCreated(DATE_CREATED);
subset.setRights(RIGHTS);
subset.setAccessionRefs(setUpAccessions());
......
Markdown is supported
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