use of fi.otavanopisto.pyramus.dao.grading.CreditDAO in project pyramus by otavanopisto.
the class GradingService method getCreditVariable.
public String getCreditVariable(@WebParam(name = "creditId") Long creditId, @WebParam(name = "key") String key) {
CreditDAO creditDAO = DAOFactory.getInstance().getCreditDAO();
CreditVariableDAO creditVariableDAO = DAOFactory.getInstance().getCreditVariableDAO();
Credit credit = creditDAO.findById(creditId);
return creditVariableDAO.findByCreditAndKey(credit, key);
}
use of fi.otavanopisto.pyramus.dao.grading.CreditDAO in project pyramus by otavanopisto.
the class EditVerbalAssessmentViewController method process.
/**
* Processes the page request by including the corresponding JSP page to the response.
*
* @param pageRequestContext Page request context
*/
public void process(PageRequestContext pageRequestContext) {
CreditDAO creditDAO = DAOFactory.getInstance().getCreditDAO();
Long creditId = pageRequestContext.getLong("creditId");
Credit credit = creditId != null ? creditDAO.findById(creditId) : null;
if (credit != null)
pageRequestContext.getRequest().setAttribute("verbalAssessment", credit.getVerbalAssessment());
pageRequestContext.setIncludeJSP("/templates/courses/editverbalassessment.jsp");
}
use of fi.otavanopisto.pyramus.dao.grading.CreditDAO in project pyramus by otavanopisto.
the class GradingService method setCreditVariable.
public void setCreditVariable(@WebParam(name = "creditId") Long creditId, @WebParam(name = "key") String key, @WebParam(name = "value") String value) {
CreditDAO creditDAO = DAOFactory.getInstance().getCreditDAO();
CreditVariableDAO creditVariableDAO = DAOFactory.getInstance().getCreditVariableDAO();
Credit credit = creditDAO.findById(creditId);
creditVariableDAO.setCreditVariable(credit, key, value);
}
Aggregations