Commit e3ae03da authored by Valentin Suhnjov's avatar Valentin Suhnjov

RIHAKB-149. Remove owner mapping from Main_resource

Removing owner mapping from Main_resource will make it possible to save
owner as an object rather than as a simple string.
parent 9c2feb4b
......@@ -43,7 +43,6 @@ public class Main_resource implements BaseModel {
private Integer main_resource_id;
private String uri;
private String name;
private String owner;
private String short_name;
private String version;
......@@ -161,24 +160,6 @@ public class Main_resource implements BaseModel {
this.name = aName;
}
/**
* Gets the owner.
*
* @return the owner
*/
public String getOwner() {
return owner;
}
/**
* Sets the owner.
*
* @param aOwner the new owner
*/
public void setOwner(String aOwner) {
this.owner = aOwner;
}
/**
* Gets the short_name.
*
......
......@@ -707,7 +707,6 @@ public class TestApiGenericDAOMain_resource<T, K> {
main_resource.setMain_resource_id(utilitiesDAO.getNextSeqValForPKForTable((Class<T>) Main_resource.class));
main_resource.setUri("uri");
main_resource.setName(EXAMPLE_NAME);
main_resource.setOwner("owner");
main_resource.setVersion("1.1");
main_resource.setKind("infosystem");
// TODO change, currently infosystem kind_id = 389
......
......@@ -119,7 +119,6 @@ public class TestSecureApiGenericDAO<T, K> {
@Test
public void testCreate() throws RihaRestException {
Main_resource mr = createTestMain_resource();
mr.setOwner("ORG");
additionalMrTestEntries.add(mr);
List<K> keys = secureGenericDAO.create((T) mr);
System.out.println(keys);
......@@ -131,7 +130,6 @@ public class TestSecureApiGenericDAO<T, K> {
@Test
public void testCreateList() throws RihaRestException {
Main_resource mr = createTestMain_resource();
mr.setOwner("ORG");
additionalMrTestEntries.add(mr);
List<K> keys = secureGenericDAO.create((List<T>)Arrays.asList(mr));
System.out.println(keys);
......@@ -143,7 +141,6 @@ public class TestSecureApiGenericDAO<T, K> {
@Test(expected=RihaRestException.class)
public void testCreateListFail() throws RihaRestException {
Main_resource mr = createTestMain_resource();
mr.setOwner("ORG");
additionalMrTestEntries.add(mr);
List<K> keys = secureGenericDAO.create((List<T>)Arrays.asList(mr));
System.out.println(keys);
......@@ -228,7 +225,6 @@ public class TestSecureApiGenericDAO<T, K> {
public Main_resource createSimpleTestMain_resource(Main_resource old) {
Main_resource mr = new Main_resource();
mr.setOwner("ORG");
mr.setName(EXAMPLE_NAME);
mr.setKind_id(old.getKind_id());
mr.setVersion(old.getVersion());
......@@ -247,7 +243,6 @@ public class TestSecureApiGenericDAO<T, K> {
main_resource.setMain_resource_id(utilitiesDAO.getNextSeqValForPKForTable((Class<T>) Main_resource.class));
main_resource.setUri("uri");
main_resource.setName(EXAMPLE_NAME);
main_resource.setOwner("owner");
main_resource.setVersion("1.1");
main_resource.setKind("infosystem");
// TODO change, currently infosystem kind_id = 389
......
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