Code example for Session

Methods: get

0
        session = StaticHibernateUtil.getSessionTL();
    } 
 
    @Test
    public void testReadFromMasterData() throws Exception {
        LookUpValueEntity readEntity = (LookUpValueEntity) session.get(LookUpValueEntity.class, 404);
       Assert.assertEquals(" ", readEntity.getLookUpName());
       Assert.assertEquals(87, (int) readEntity.getLookUpEntity().getEntityId());
 
        Set<LookUpValueLocaleEntity> locales = readEntity.getLookUpValueLocales();
       Assert.assertEquals(1, locales.size());
       Assert.assertEquals("Can make payments to Client accounts", locales.iterator().next().getLookUpValue());
    } 
 
    @Test
    public void testWriteAndRead() throws Exception {
 
        LookUpValueEntity entity = new LookUpValueEntity();
        entity.setLookUpName("my entity");
        LookUpEntity lookUpEntity = new LookUpEntity();