Package ch.bfh.swos.gandalf.model

Examples of ch.bfh.swos.gandalf.model.Config


  @Inject
  private ConfigDao configdao;
 
  @Test
  public void test() {
    Config config = configdao.create();
    config.setName("PersistenceConfigServiceTest");
    config.setVal("True");
    Config managedConfig = configdao.update(config);
    Config foundConfig = configdao.read(managedConfig.getId());
    Assert.assertTrue(config.getName().equalsIgnoreCase(foundConfig.getName()));
    Assert.assertTrue(config.getVal().equalsIgnoreCase(foundConfig.getVal()));
    configdao.delete(foundConfig);
  }
View Full Code Here


  @Inject
  private ConfigDao configDao;
 
  @PostConstruct
  public void fetchConfigs() {
    Config result = configDao.read("states");
    states = result.getVal().split(";");
    result = configDao.read("grades");
    grades = result.getVal().split(";");
  }
View Full Code Here

  @PersistenceContext
  protected EntityManager em;

  public Config create() {
    return new Config();
  }
View Full Code Here

TOP

Related Classes of ch.bfh.swos.gandalf.model.Config

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.