.add(Restrictions.le(MetadataEntity.EXPIRATION, currentTime)).setProjection(Projections.id());
if (setFetchSizeMinInteger) {
criteria.setFetchSize(Integer.MIN_VALUE);
}
metadataKeys = criteria.scroll(ScrollMode.FORWARD_ONLY);
ArrayList<MetadataEntityKey> batch = new ArrayList<MetadataEntityKey>((int) configuration.batchSize());
while (metadataKeys.next()) {
MetadataEntityKey mKey = (MetadataEntityKey) metadataKeys.get(0);
batch.add(mKey);
if (batch.size() == configuration.batchSize()) {