Skip to content

Commit

Permalink
switched from short to boolean parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Dec 5, 2023
1 parent 5097507 commit f508d9d
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -695,13 +695,7 @@ public List<ArchiveFileReviewsBean> findByArchiveFileKey(ArchiveFileBean archive

@Override
public List<ArchiveFileReviewsBean> findByArchiveFileKeyAndDone(ArchiveFileBean archiveFileKey, boolean done) {

short isDone = 0;
if (done) {
isDone = 1;
}

return getEntityManager().createQuery("from ArchiveFileReviewsBean where archiveFileKey = ?1 and done = ?2 order by beginDate asc").setParameter(1, archiveFileKey).setParameter(2, isDone).getResultList();
return getEntityManager().createQuery("from ArchiveFileReviewsBean where archiveFileKey = ?1 and done = ?2 order by beginDate asc").setParameter(1, archiveFileKey).setParameter(2, done).getResultList();
}

@Override
Expand All @@ -712,11 +706,7 @@ public List<ArchiveFileReviewsBean> findByCalendarSetup(CalendarSetup setup) {

@Override
public List<ArchiveFileReviewsBean> findByDone(boolean done) {
short isDone = 0;
if (done) {
isDone = 1;
}
return (List<ArchiveFileReviewsBean>) em.createNamedQuery("ArchiveFileReviewsBean.findByDone").setParameter("done", isDone).getResultList();
return (List<ArchiveFileReviewsBean>) em.createNamedQuery("ArchiveFileReviewsBean.findByDone").setParameter("done", done).getResultList();
}

}

0 comments on commit f508d9d

Please sign in to comment.