use of org.apache.cayenne.map.Entity in project cayenne by apache.
the class EntityEventTest method testEntity.
@Test
public void testEntity() throws Exception {
Object src = new Object();
Entity d = new DbEntity("abc");
EntityEvent e = new EntityEvent(src, null);
e.setEntity(d);
assertSame(d, e.getEntity());
}
use of org.apache.cayenne.map.Entity in project cayenne by apache.
the class EntityEventTest method testNameChange2.
@Test
public void testNameChange2() throws Exception {
Entity d = new DbEntity("abc");
EntityEvent e = new EntityEvent(new Object(), d, "abc");
assertEquals(d.getName(), e.getNewName());
assertFalse(e.isNameChange());
}
use of org.apache.cayenne.map.Entity in project cayenne by apache.
the class EOQuery method initBindings.
private synchronized void initBindings() {
if (bindings != null) {
return;
}
bindings = new HashMap();
if (!(root instanceof Entity)) {
return;
}
Map qualifier = (Map) plistMap.get("qualifier");
initBindings(bindings, (Entity) root, qualifier);
}
Aggregations