use of org.wso2.carbon.bpmn.core.internal.mapper.SubstitutesMapper in project carbon-business-process by wso2.
the class ActivitiDAO method querySubstituteInfo.
/**
* Return the list of substitute info based on query parameters.
* @param model model with only required query parameter values. Leave others as null. By default enabled=false.
* @return List<SubstitutesDataModel> Result set of substitute info
*/
public List<SubstitutesDataModel> querySubstituteInfo(final PaginatedSubstitutesDataModel model) {
final RowBounds rw = new RowBounds(model.getStart(), model.getSize());
CustomSqlExecution<SubstitutesMapper, List<SubstitutesDataModel>> customSqlExecution = new AbstractCustomSqlExecution<SubstitutesMapper, List<SubstitutesDataModel>>(SubstitutesMapper.class) {
public List<SubstitutesDataModel> execute(SubstitutesMapper substitutesMapper) {
return substitutesMapper.querySubstitutes(rw, model);
}
};
return managementService.executeCustomSql(customSqlExecution);
}
use of org.wso2.carbon.bpmn.core.internal.mapper.SubstitutesMapper in project carbon-business-process by wso2.
the class ActivitiDAO method updateSubstituteInfo.
/**
* Update the substitute record for given user
* @param substitutesDataModel
* @return updated row count. Ideally should return 1.
*/
public int updateSubstituteInfo(final SubstitutesDataModel substitutesDataModel) {
substitutesDataModel.setUpdated(new Date());
CustomSqlExecution<SubstitutesMapper, Integer> customSqlExecution = new AbstractCustomSqlExecution<SubstitutesMapper, Integer>(SubstitutesMapper.class) {
public Integer execute(SubstitutesMapper substitutesMapper) {
return substitutesMapper.updateSubstitute(substitutesDataModel);
}
};
return managementService.executeCustomSql(customSqlExecution);
}
use of org.wso2.carbon.bpmn.core.internal.mapper.SubstitutesMapper in project carbon-business-process by wso2.
the class ActivitiDAO method querySubstituteInfoWithoutEnabled.
/**
* Return the list of substitute info based on query parameters except enabled property.
* @param model data model with only required query parameter values. Leave others as null.
* @return List<PaginatedSubstitutesDataModel> Result set of substitute info
*/
public List<SubstitutesDataModel> querySubstituteInfoWithoutEnabled(final PaginatedSubstitutesDataModel model) {
final RowBounds rw = new RowBounds(model.getStart(), model.getSize());
CustomSqlExecution<SubstitutesMapper, List<SubstitutesDataModel>> customSqlExecution = new AbstractCustomSqlExecution<SubstitutesMapper, List<SubstitutesDataModel>>(SubstitutesMapper.class) {
public List<SubstitutesDataModel> execute(SubstitutesMapper substitutesMapper) {
return substitutesMapper.querySubstitutesWithoutEnabled(rw, model);
}
};
return managementService.executeCustomSql(customSqlExecution);
}
Aggregations