2018-02-07 10:56:30 +01:00
|
|
|
package eu.eudat.managers;
|
|
|
|
|
|
|
|
import eu.eudat.entities.Researcher;
|
|
|
|
import eu.eudat.services.ApiContext;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by ikalyvas on 2/5/2018.
|
|
|
|
*/
|
|
|
|
public class ResearcherManager {
|
|
|
|
|
|
|
|
public static Researcher create(ApiContext apiContext, eu.eudat.models.researcher.Researcher researcher) throws Exception {
|
2018-02-16 08:45:18 +01:00
|
|
|
Researcher researcherEntity = researcher.toDataModel();
|
2018-03-05 17:18:45 +01:00
|
|
|
return apiContext.getOperationsContext().getDatabaseRepository().getResearcherDao().createOrUpdate(researcherEntity);
|
2018-02-07 10:56:30 +01:00
|
|
|
}
|
|
|
|
}
|