use of com.haulmont.cuba.gui.data.impl.testmodel1.TestEmbeddableEntity in project cuba by cuba-platform.
the class DsContextApplyChangesTest method createEntities.
private void createEntities() {
master = new TestMasterEntity();
master.setMasterName("master");
detail1 = new TestDetailEntity();
detail1.setDetailName("detail1");
detail1.setMaster(master);
detail1.setParts(new HashSet<TestPartEntity>());
embeddable1 = new TestEmbeddableEntity();
embeddable1.setName("embeddable1");
detail1.setEmbeddable(embeddable1);
master.setDetail(detail1);
}
use of com.haulmont.cuba.gui.data.impl.testmodel1.TestEmbeddableEntity in project cuba by cuba-platform.
the class DsContextTest method createEntities.
private void createEntities() {
master = new TestMasterEntity();
master.setMasterName("master");
master.setDetails(new HashSet<TestDetailEntity>());
detail1 = new TestDetailEntity();
detail1.setDetailName("detail1");
detail1.setMaster(master);
detail1.setParts(new HashSet<TestPartEntity>());
embeddable1 = new TestEmbeddableEntity();
embeddable1.setName("embeddable1");
detail1.setEmbeddable(embeddable1);
detail1.setMaster(master);
part1 = new TestPartEntity();
part1.setPartName("part1");
part1.setDetail(detail1);
detail1.getParts().add(part1);
master.getDetails().add(detail1);
detail2 = new TestDetailEntity();
detail2.setDetailName("detail2");
detail2.setMaster(master);
master.getDetails().add(detail2);
}
use of com.haulmont.cuba.gui.data.impl.testmodel1.TestEmbeddableEntity in project cuba by cuba-platform.
the class AttributeAccessSupportTest method getEmbeddableEntitySecurityStateTest.
@Test
public void getEmbeddableEntitySecurityStateTest() {
EmbeddableEntity entity = new TestEmbeddableEntity();
SecurityState securityState = BaseEntityInternalAccess.getOrCreateSecurityState(entity);
BaseEntityInternalAccess.setSecurityState(entity, securityState);
AttributeAccessSupport attributeAccessSupport = new AttributeAccessSupport();
Assertions.assertNotNull(attributeAccessSupport.getSecurityState(entity), "com.haulmont.cuba.gui.AttributeAccessSupport#getSecurityState returns null");
}
Aggregations