예제 #1
0
 @Test
 public void testGetByAcronym() {
   MgmtEntity entity = dao.getByAcronym("ICCAT");
   assertNotNull(entity);
   assertEquals("ICCAT", entity.getAcronym());
   assertEquals(new Long(1), entity.getCode());
 }
예제 #2
0
  @Override
  public void warmup() {
    log.info("warming cache");

    log.trace("species...");
    for (Species species : speciesDao.list()) refPubService.getSpecies(species.getAlphaCode());
    log.trace("done");

    log.trace("countries...");
    for (MgmtEntity country : entityDao.list(ManagementEntityDao.COUNTRY_TYPE))
      refPubService.getCountry(country.getAcronym());
    log.trace("done");

    log.trace("cache warmup complete");
  }