Search in sources :

Example 36 with EntityEvent

use of org.apache.cayenne.map.event.EntityEvent 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());
}
Also used : DbEntity(org.apache.cayenne.map.DbEntity) Entity(org.apache.cayenne.map.Entity) DbEntity(org.apache.cayenne.map.DbEntity) EntityEvent(org.apache.cayenne.map.event.EntityEvent) Test(org.junit.Test)

Aggregations

EntityEvent (org.apache.cayenne.map.event.EntityEvent)36 DbEntity (org.apache.cayenne.map.DbEntity)14 ObjEntity (org.apache.cayenne.map.ObjEntity)13 EntityDisplayEvent (org.apache.cayenne.modeler.event.EntityDisplayEvent)7 ProjectController (org.apache.cayenne.modeler.ProjectController)6 Entity (org.apache.cayenne.map.Entity)5 Test (org.junit.Test)5 DataChannelDescriptor (org.apache.cayenne.configuration.DataChannelDescriptor)4 ArrayList (java.util.ArrayList)3 ProcedureEvent (org.apache.cayenne.configuration.event.ProcedureEvent)3 DbAttribute (org.apache.cayenne.map.DbAttribute)3 ObjAttribute (org.apache.cayenne.map.ObjAttribute)3 AttributeEvent (org.apache.cayenne.map.event.AttributeEvent)3 ValidationException (org.apache.cayenne.validation.ValidationException)3 ItemEvent (java.awt.event.ItemEvent)2 ItemListener (java.awt.event.ItemListener)2 QueryEvent (org.apache.cayenne.configuration.event.QueryEvent)2 EntityMergeSupport (org.apache.cayenne.dbsync.merge.context.EntityMergeSupport)2 Expression (org.apache.cayenne.exp.Expression)2 DbKeyGenerator (org.apache.cayenne.map.DbKeyGenerator)2