1
0
Fork 0

added method newInstance

This commit is contained in:
Miriam Baglioni 2020-07-07 18:26:10 +02:00
parent 817cddfc52
commit 81434f8e5e
2 changed files with 22 additions and 0 deletions

View File

@ -29,4 +29,19 @@ public class Creator {
public void setOrcid(String orcid) {
this.orcid = orcid;
}
public static Creator newInstance(String name, String affiliation, String orcid) {
Creator c = new Creator();
if (!(name == null)) {
c.name = name;
}
if (!(affiliation == null)) {
c.affiliation = affiliation;
}
if (!(orcid == null)) {
c.orcid = orcid;
}
return c;
}
}

View File

@ -13,4 +13,11 @@ public class Grant implements Serializable {
public void setId(String id) {
this.id = id;
}
public static Grant newInstance(String id) {
Grant g = new Grant();
g.id = id;
return g;
}
}