Search in sources :

Example 16 with Relationship

use of org.apache.cayenne.map.Relationship in project cayenne by apache.

the class RelationshipEventTest method testRelationship.

@Test
public void testRelationship() throws Exception {
    Object src = new Object();
    Relationship r = new DbRelationship();
    r.setName("xyz");
    RelationshipEvent e = new RelationshipEvent(src, null, null);
    e.setRelationship(r);
    assertSame(r, e.getRelationship());
}
Also used : Relationship(org.apache.cayenne.map.Relationship) DbRelationship(org.apache.cayenne.map.DbRelationship) DbRelationship(org.apache.cayenne.map.DbRelationship) RelationshipEvent(org.apache.cayenne.map.event.RelationshipEvent) Test(org.junit.Test)

Aggregations

Relationship (org.apache.cayenne.map.Relationship)16 ObjEntity (org.apache.cayenne.map.ObjEntity)9 DbRelationship (org.apache.cayenne.map.DbRelationship)7 DbEntity (org.apache.cayenne.map.DbEntity)6 Attribute (org.apache.cayenne.map.Attribute)5 Entity (org.apache.cayenne.map.Entity)5 ObjRelationship (org.apache.cayenne.map.ObjRelationship)5 ArrayList (java.util.ArrayList)3 DataChannelDescriptor (org.apache.cayenne.configuration.DataChannelDescriptor)3 DataMap (org.apache.cayenne.map.DataMap)3 Test (org.junit.Test)3 DefaultObjectNameGenerator (org.apache.cayenne.dbsync.naming.DefaultObjectNameGenerator)2 DbAttribute (org.apache.cayenne.map.DbAttribute)2 DetectedDbEntity (org.apache.cayenne.map.DetectedDbEntity)2 EmbeddableAttribute (org.apache.cayenne.map.EmbeddableAttribute)2 ObjAttribute (org.apache.cayenne.map.ObjAttribute)2 RelationshipDisplayEvent (org.apache.cayenne.modeler.event.RelationshipDisplayEvent)2 EntityTreeFilter (org.apache.cayenne.modeler.util.EntityTreeFilter)2 EntityTreeModel (org.apache.cayenne.modeler.util.EntityTreeModel)2 URL (java.net.URL)1