@Test public void checkBuilder() { SampleDAO sampleDAO = DAOBuilder.buildDAO(Sample.class, SampleDAO.class, PartialSampleDAOImplementation.class, null); List<Sample> t = sampleDAO.getMany(0); Assert.assertTrue(t.size() > 1); sampleDAO.findByFieldOne(0); sampleDAO.findByFieldOneGreaterThan(1); }
public static <T, ID, I extends GenericDAO<T, ID>> I buildDAO(Class<T> modelClass, Class<I> daoInterface, Class<? extends QueryModelDAO<T, ID>> partialDAOClass, Map<String, Object> daoProperties) { return buildDAO(modelClass, daoInterface, partialDAOClass, daoProperties, null); }
DAOBuilder { public static <T, ID, I extends GenericDAO<T, ID>> I buildDAO(Class<T> modelClass, Class<I> daoInterface, Class<? extends QueryModelDAO<T, ID>> partialDAOClass, Map<String, Object> daoProperties) { return buildDAO(modelClass, daoInterface, partialDAOClass, daoProperties, null); } }
DAOBuilder { public static <T, ID, I extends GenericDAO<T, ID>> I buildDAO(Class<T> modelClass, Class<I> daoInterface, Class<? extends QueryModelDAO<T, ID>> partialDAOClass, Map<String, Object> daoProperties) { return buildDAO(modelClass, daoInterface, partialDAOClass, daoProperties, null); }  }
DAOBuilder { public static <T, ID, I extends GenericDAO<T, ID>> I buildDAO(Class<T> modelClass, Class<I> daoInterface, Class<? extends QueryModelDAO<T, ID>> partialDAOClass, Map<String, Object> daoProperties) { return buildDAO(modelClass, daoInterface, partialDAOClass, daoProperties, null); }  static I buildDAO(Class<T> modelClass,
                                                                  Class<I> daoInterface,
                                                                  Class<? extends QueryModelDAO<T, ID>> partialDAOClass,
                                                                  Map<String, Object> daoProperties); static I buildDAO(Class<T> modelClass,
                                                                  Class<I> daoInterface,
                                                                  Class<? extends QueryModelDAO<T, ID>> partialDAOClass,
                                                                  Map<String, Object> daoProperties,
                                                                  AccessControlContextProvider accessControlContextProvider); }
DAOBuilder { public static <T, ID, I extends GenericDAO<T, ID>> I buildDAO(Class<T> modelClass, Class<I> daoInterface, Class<? extends QueryModelDAO<T, ID>> partialDAOClass, Map<String, Object> daoProperties) { return buildDAO(modelClass, daoInterface, partialDAOClass, daoProperties, null); }  static I buildDAO(Class<T> modelClass,
                                                                  Class<I> daoInterface,
                                                                  Class<? extends QueryModelDAO<T, ID>> partialDAOClass,
                                                                  Map<String, Object> daoProperties); static I buildDAO(Class<T> modelClass,
                                                                  Class<I> daoInterface,
                                                                  Class<? extends QueryModelDAO<T, ID>> partialDAOClass,
                                                                  Map<String, Object> daoProperties,
                                                                  AccessControlContextProvider accessControlContextProvider);  }