moving queries to DAOs

This commit is contained in:
Ondřej Košarko
2016-01-25 13:08:39 +01:00
parent b87cf2f723
commit ec804f81e2
47 changed files with 467 additions and 209 deletions

View File

@@ -401,6 +401,11 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
return bitstreamDAO.countByStoreNumber(context, storeNumber);
}
@Override
public int countTotal(Context context) throws SQLException {
return bitstreamDAO.countRows(context);
}
@Override
public Bitstream findByIdOrLegacyId(Context context, String id) throws SQLException {
if(StringUtils.isNumeric(id))
@@ -418,4 +423,19 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
return bitstreamDAO.findByLegacyId(context, id, Bitstream.class);
}
@Override
public int countDeletedBitstreams(Context context) throws SQLException {
return bitstreamDAO.countDeleted(context);
}
@Override
public int countBitstreamsWithoutPolicy(Context context) throws SQLException {
return bitstreamDAO.countWithNoPolicy(context);
}
@Override
public List<Bitstream> getNotReferencedBitstreams(Context context) throws SQLException {
return bitstreamDAO.getNotReferencedBitstreams(context);
}
}