Example #1
0
 @Override
 public List<? extends Nic> findBadNics(int count) {
   return create()
       .select(NIC.fields())
       .from(NIC)
       .join(INSTANCE)
       .on(INSTANCE.ID.eq(NIC.INSTANCE_ID))
       .where(
           NIC.REMOVED
               .isNull()
               .and(INSTANCE.STATE.eq(CommonStatesConstants.PURGED))
               .and(
                   NIC.STATE.notIn(
                       CommonStatesConstants.DEACTIVATING, CommonStatesConstants.REMOVING)))
       .limit(count)
       .fetchInto(NicRecord.class);
 }