Search in sources :

Example 1 with CreditVariableDAO

use of fi.otavanopisto.pyramus.dao.grading.CreditVariableDAO 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);
}
Also used : CreditVariableDAO(fi.otavanopisto.pyramus.dao.grading.CreditVariableDAO) Credit(fi.otavanopisto.pyramus.domainmodel.grading.Credit) TransferCredit(fi.otavanopisto.pyramus.domainmodel.grading.TransferCredit) TransferCreditDAO(fi.otavanopisto.pyramus.dao.grading.TransferCreditDAO) CreditDAO(fi.otavanopisto.pyramus.dao.grading.CreditDAO)

Example 2 with CreditVariableDAO

use of fi.otavanopisto.pyramus.dao.grading.CreditVariableDAO 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);
}
Also used : CreditVariableDAO(fi.otavanopisto.pyramus.dao.grading.CreditVariableDAO) Credit(fi.otavanopisto.pyramus.domainmodel.grading.Credit) TransferCredit(fi.otavanopisto.pyramus.domainmodel.grading.TransferCredit) TransferCreditDAO(fi.otavanopisto.pyramus.dao.grading.TransferCreditDAO) CreditDAO(fi.otavanopisto.pyramus.dao.grading.CreditDAO)

Aggregations

CreditDAO (fi.otavanopisto.pyramus.dao.grading.CreditDAO)2 CreditVariableDAO (fi.otavanopisto.pyramus.dao.grading.CreditVariableDAO)2 TransferCreditDAO (fi.otavanopisto.pyramus.dao.grading.TransferCreditDAO)2 Credit (fi.otavanopisto.pyramus.domainmodel.grading.Credit)2 TransferCredit (fi.otavanopisto.pyramus.domainmodel.grading.TransferCredit)2