Package org.apache.cayenne.map.event

Examples of org.apache.cayenne.map.event.DomainEvent


    public void removeDomain(DataDomain domain) {
        ApplicationProject project = (ApplicationProject) getCurrentProject();
        ProjectController mediator = getProjectController();

        project.getConfiguration().removeDomain(domain.getName());
        mediator.fireDomainEvent(new DomainEvent(
                Application.getFrame(),
                domain,
                MapEvent.REMOVE));
    }
View Full Code Here


    public void createDomain(DataDomain domain) {
        ApplicationProject project = (ApplicationProject) getCurrentProject();
        ProjectController mediator = getProjectController();

        project.getConfiguration().addDomain(domain);
        mediator.fireDomainEvent(new DomainEvent(this, domain, MapEvent.ADD));
        mediator.fireDomainDisplayEvent(new DomainDisplayEvent(this, domain));
    }
View Full Code Here

public class DomainEventTest extends TestCase {

    public void testConstructor1() throws Exception {
      Object src = new Object();
      DataDomain d = new DataDomain("abc");
      DomainEvent e = new DomainEvent(src, d);
     
      assertSame(src, e.getSource());
      assertSame(d, e.getDomain());
    }
View Full Code Here

    }
   
    public void testConstructor2() throws Exception  {
      Object src = new Object();
      DataDomain d = new DataDomain("abc");
      DomainEvent e = new DomainEvent(src, d, "oldname");
     
      assertSame(src, e.getSource());
      assertSame(d, e.getDomain());
      assertEquals("oldname", e.getOldName());
    }
View Full Code Here

    }
   
    public void testDomain() throws Exception  {
      Object src = new Object();
         DataDomain d = new DataDomain("abc");
      DomainEvent e = new DomainEvent(src, null);
     
      e.setDomain(d);
      assertSame(d, e.getDomain());
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.map.event.DomainEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.