Package org.apache.cayenne.configuration.event

Examples of org.apache.cayenne.configuration.event.DataMapEvent


        if (Util.nullSafeEquals(newSuperclass, oldSuperclass)) {
            return;
        }

        dataMap.setDefaultSuperclass(newSuperclass);
        eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
    }
View Full Code Here


        if (Util.nullSafeEquals(newName, oldName)) {
            return;
        }
        // completely new name, set new name for domain
        DataMapDefaults pref = eventController.getDataMapPreferences("");
        DataMapEvent e = new DataMapEvent(this, map, map.getName());
        ProjectUtil.setDataMapName((DataChannelDescriptor) eventController
                .getProject()
                .getRootNode(), map, newName);
        pref.copyPreferences(newName);
        eventController.fireDataMapEvent(e);
View Full Code Here

public class DataMapEventTest extends TestCase {

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

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

    }
   
    public void testDataMap() throws Exception  {
      Object src = new Object();
         DataMap d = new DataMap("abc");
      DataMapEvent e = new DataMapEvent(src, null);
     
      e.setDataMap(d);
      assertSame(d, e.getDataMap());
    }
View Full Code Here

                && !currentState.node.getDataMapNames().contains(map.getName())) {
            currentState.node.getDataMapNames().add(map.getName());
            fireDataNodeEvent(new DataNodeEvent(this, currentState.node));
        }

        fireDataMapEvent(new DataMapEvent(src, map, MapEvent.ADD));
        if (makeCurrent) {
            fireDataMapDisplayEvent(new DataMapDisplayEvent(
                    src,
                    map,
                    currentState.domain,
View Full Code Here

    public void removeDataMap(DataMap map) {
        ProjectController mediator = getProjectController();
        DataChannelDescriptor domain = (DataChannelDescriptor) mediator
                .getProject()
                .getRootNode();
        DataMapEvent e = new DataMapEvent(Application.getFrame(), map, MapEvent.REMOVE);
        e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());

        domain.getDataMaps().remove(map);
       
        Iterator<DataNodeDescriptor> iterator = domain.getNodeDescriptors().iterator();
        while(iterator.hasNext()){
View Full Code Here

            cleanup();

            // fire up events
            loadStatusNote = "Updating view...";
            if (mediator.getCurrentDataMap() != null) {
                mediator.fireDataMapEvent(new DataMapEvent(
                        Application.getFrame(),
                        dataMap,
                        MapEvent.CHANGE));
                mediator.fireDataMapDisplayEvent(new DataMapDisplayEvent(Application
                        .getFrame(), dataMap, (DataChannelDescriptor) mediator
View Full Code Here

        if (oldType == lockType) {
            return;
        }

        dataMap.setDefaultLockType(lockType);
        eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
    }
View Full Code Here

        if (dataMap.isClientSupported() != flag) {
            dataMap.setClientSupported(flag);

            toggleClientProperties(flag);
            eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.configuration.event.DataMapEvent

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.