Package org.apache.cayenne.map.event

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


            DataDomain domain,
            DataMap map,
            ObjEntity objEntity,
            ObjAttribute attr) {

        mediator.fireObjAttributeEvent(new AttributeEvent(
                src,
                attr,
                objEntity,
                MapEvent.ADD));
View Full Code Here


            ProjectController mediator,
            DataDomain domain,
            DataMap map,
            DbEntity dbEntity,
            DbAttribute attr) {
        mediator.fireDbAttributeEvent(new AttributeEvent(
                src,
                attr,
                dbEntity,
                MapEvent.ADD));
View Full Code Here

        ProjectController mediator = getProjectController();

        for (DbAttribute attrib : attribs) {
            entity.removeAttribute(attrib.getName());

            AttributeEvent e = new AttributeEvent(
                    Application.getFrame(),
                    attrib,
                    entity,
                    MapEvent.REMOVE);
View Full Code Here

    public void removeObjAttributes(ObjEntity entity, ObjAttribute[] attribs) {
        ProjectController mediator = getProjectController();

        for (ObjAttribute attrib : attribs) {
            entity.removeAttribute(attrib.getName());
            AttributeEvent e = new AttributeEvent(
                    Application.getFrame(),
                    attrib,
                    entity,
                    MapEvent.REMOVE);
            mediator.fireObjAttributeEvent(e);
View Full Code Here

                .getCurrentObjEntity(), mediator.getCurrentDataMap(), mediator
                .getCurrentDataDomain());

        mediator.fireObjEntityDisplayEvent(event);

        mediator.fireObjAttributeEvent(new AttributeEvent(this, attributeSaved, model
                .getEntity(), MapEvent.CHANGE));

        AttributeDisplayEvent eventAttr = new AttributeDisplayEvent(
                this,
                attributeSaved,
View Full Code Here

  public void testAttribute() throws Exception {
    Object src = new Object();
    Attribute a = new DbAttribute();
    a.setName("xyz");
    AttributeEvent e = new AttributeEvent(src, null, null);

    e.setAttribute(a);
    assertSame(a, e.getAttribute());
  }
View Full Code Here

        EntityDisplayEvent event = new EntityDisplayEvent(this, mediator
                .getCurrentObjEntity(), mediator.getCurrentDataMap(), (DataChannelDescriptor)mediator.getProject().getRootNode());

        mediator.fireObjEntityDisplayEvent(event);

        mediator.fireObjAttributeEvent(new AttributeEvent(this, attributeSaved, model
                .getEntity(), MapEvent.CHANGE));

        AttributeDisplayEvent eventAttr = new AttributeDisplayEvent(
                this,
                attributeSaved,
View Full Code Here

                   
                    while (attrIt.hasNext()) {
                        ObjAttribute atribute = attrIt.next();
                        if (atribute.getType()==null || atribute.getType().equals(oldName)) {
                            atribute.setType(newClassName);
                            AttributeEvent ev = new AttributeEvent(this, atribute, atribute
                                    .getEntity());
                            mediator.fireObjAttributeEvent(ev);
                        }
                    }
                   
View Full Code Here

            ProjectController mediator,
            DataMap map,
            ObjEntity objEntity,
            ObjAttribute attr) {

        mediator.fireObjAttributeEvent(new AttributeEvent(
                src,
                attr,
                objEntity,
                MapEvent.ADD));
       
View Full Code Here

            Object src,
            ProjectController mediator,
            DataMap map,
            DbEntity dbEntity,
            DbAttribute attr) {
        mediator.fireDbAttributeEvent(new AttributeEvent(
                src,
                attr,
                dbEntity,
                MapEvent.ADD));
View Full Code Here

TOP

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

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.