Search in sources :

Example 1 with CuSqlQuery

use of edu.cornell.kfs.sys.util.CuSqlQuery in project cu-kfs by CU-CommunityApps.

the class DocumentMaintenanceDaoJdbc method getActionNotesToBeRequeued.

@Override
public List<ActionItemNoteDetailDto> getActionNotesToBeRequeued() {
    CuSqlQuery sqlQuery = buildActionNoteQuery();
    RowMapper<ActionItemNoteDetailDto> actionItemNoteMapper = (resultSet, rowNum) -> {
        ActionItemNoteDetailDto actionItemNote = new ActionItemNoteDetailDto();
        actionItemNote.setPrincipalId(resultSet.getString(1));
        actionItemNote.setDocHeaderId(resultSet.getString(2));
        actionItemNote.setActionNote(resultSet.getString(3));
        actionItemNote.setNoteTimeStamp(resultSet.getTimestamp(4, Calendar.getInstance()));
        actionItemNote.setOriginalActionItemId(resultSet.getString(5));
        return actionItemNote;
    };
    return queryForValues(sqlQuery, actionItemNoteMapper);
}
Also used : KewApiConstants(org.kuali.kfs.kew.api.KewApiConstants) CuSqlChunk(edu.cornell.kfs.sys.util.CuSqlChunk) Collection(java.util.Collection) ActionItemNoteDetailDto(edu.cornell.kfs.sys.dataaccess.ActionItemNoteDetailDto) PlatformAwareDaoBaseJdbc(org.kuali.kfs.core.framework.persistence.jdbc.dao.PlatformAwareDaoBaseJdbc) Collectors(java.util.stream.Collectors) CUKFSParameterKeyConstants(edu.cornell.kfs.sys.CUKFSParameterKeyConstants) DocumentMaintenanceDao(edu.cornell.kfs.sys.dataaccess.DocumentMaintenanceDao) SqlParameterValue(org.springframework.jdbc.core.SqlParameterValue) MessageFormat(java.text.MessageFormat) CUKFSConstants(edu.cornell.kfs.sys.CUKFSConstants) List(java.util.List) Calendar(java.util.Calendar) Logger(org.apache.logging.log4j.Logger) RowMapper(org.springframework.jdbc.core.RowMapper) ParameterService(org.kuali.kfs.coreservice.framework.parameter.ParameterService) CuSqlQuery(edu.cornell.kfs.sys.util.CuSqlQuery) LogManager(org.apache.logging.log4j.LogManager) DocumentRequeueStep(edu.cornell.kfs.sys.batch.DocumentRequeueStep) CuSqlQuery(edu.cornell.kfs.sys.util.CuSqlQuery) ActionItemNoteDetailDto(edu.cornell.kfs.sys.dataaccess.ActionItemNoteDetailDto)

Example 2 with CuSqlQuery

use of edu.cornell.kfs.sys.util.CuSqlQuery in project cu-kfs by CU-CommunityApps.

the class DocumentMaintenanceDaoJdbc method getDocumentRequeueValues.

@Override
public Collection<String> getDocumentRequeueValues() {
    CuSqlQuery sqlQuery = buildRequeueSqlQuery();
    RowMapper<String> documentIdMapper = (resultSet, rowNum) -> resultSet.getString(1);
    return queryForValues(sqlQuery, documentIdMapper);
}
Also used : KewApiConstants(org.kuali.kfs.kew.api.KewApiConstants) CuSqlChunk(edu.cornell.kfs.sys.util.CuSqlChunk) Collection(java.util.Collection) ActionItemNoteDetailDto(edu.cornell.kfs.sys.dataaccess.ActionItemNoteDetailDto) PlatformAwareDaoBaseJdbc(org.kuali.kfs.core.framework.persistence.jdbc.dao.PlatformAwareDaoBaseJdbc) Collectors(java.util.stream.Collectors) CUKFSParameterKeyConstants(edu.cornell.kfs.sys.CUKFSParameterKeyConstants) DocumentMaintenanceDao(edu.cornell.kfs.sys.dataaccess.DocumentMaintenanceDao) SqlParameterValue(org.springframework.jdbc.core.SqlParameterValue) MessageFormat(java.text.MessageFormat) CUKFSConstants(edu.cornell.kfs.sys.CUKFSConstants) List(java.util.List) Calendar(java.util.Calendar) Logger(org.apache.logging.log4j.Logger) RowMapper(org.springframework.jdbc.core.RowMapper) ParameterService(org.kuali.kfs.coreservice.framework.parameter.ParameterService) CuSqlQuery(edu.cornell.kfs.sys.util.CuSqlQuery) LogManager(org.apache.logging.log4j.LogManager) DocumentRequeueStep(edu.cornell.kfs.sys.batch.DocumentRequeueStep) CuSqlQuery(edu.cornell.kfs.sys.util.CuSqlQuery)

Aggregations

CUKFSConstants (edu.cornell.kfs.sys.CUKFSConstants)2 CUKFSParameterKeyConstants (edu.cornell.kfs.sys.CUKFSParameterKeyConstants)2 DocumentRequeueStep (edu.cornell.kfs.sys.batch.DocumentRequeueStep)2 ActionItemNoteDetailDto (edu.cornell.kfs.sys.dataaccess.ActionItemNoteDetailDto)2 DocumentMaintenanceDao (edu.cornell.kfs.sys.dataaccess.DocumentMaintenanceDao)2 CuSqlChunk (edu.cornell.kfs.sys.util.CuSqlChunk)2 CuSqlQuery (edu.cornell.kfs.sys.util.CuSqlQuery)2 MessageFormat (java.text.MessageFormat)2 Calendar (java.util.Calendar)2 Collection (java.util.Collection)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 LogManager (org.apache.logging.log4j.LogManager)2 Logger (org.apache.logging.log4j.Logger)2 PlatformAwareDaoBaseJdbc (org.kuali.kfs.core.framework.persistence.jdbc.dao.PlatformAwareDaoBaseJdbc)2 ParameterService (org.kuali.kfs.coreservice.framework.parameter.ParameterService)2 KewApiConstants (org.kuali.kfs.kew.api.KewApiConstants)2 RowMapper (org.springframework.jdbc.core.RowMapper)2 SqlParameterValue (org.springframework.jdbc.core.SqlParameterValue)2