Package org.apache.cayenne.map.event

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


    /**
     * Overrides super to fire an AttributeEvent.
     */
    public void addAttribute(Attribute attr) {
        super.addAttribute(attr);
        this.dbAttributeAdded(new AttributeEvent(this, attr, this, MapEvent.ADD));
    }
View Full Code Here


                }
            }
        }

        super.removeAttribute(attrName);
        this.dbAttributeRemoved(new AttributeEvent(this, attr, this, MapEvent.REMOVE));
    }
View Full Code Here

    }

    public void clearAttributes() {
        super.clearAttributes();
        // post dummy event for no specific attribute
        this.dbAttributeRemoved(new AttributeEvent(this, null, this, MapEvent.REMOVE));
    }
View Full Code Here

     *             if a relationship has the same name as this attribute
     * @since 3.0
     */
    public void addAttribute(DbAttribute attr) {
        super.addAttribute(attr);
        this.dbAttributeAdded(new AttributeEvent(this, attr, this, MapEvent.ADD));
    }
View Full Code Here

                }
            }
        }

        super.removeAttribute(attrName);
        this.dbAttributeRemoved(new AttributeEvent(this, attr, this, MapEvent.REMOVE));
    }
View Full Code Here

    @Override
    public void clearAttributes() {
        super.clearAttributes();
        // post dummy event for no specific attribute
        this.dbAttributeRemoved(new AttributeEvent(this, null, this, MapEvent.REMOVE));
    }
View Full Code Here

        ObjAttribute attr = (ObjAttribute) NamedObjectFactory.createObject(
                ObjAttribute.class,
                objEntity);
        objEntity.addAttribute(attr);

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

            (DbAttribute) NamedObjectFactory.createObject(attrClass, dbEntity);
        dbEntity.addAttribute(attr);

        ProjectController mediator = getProjectController();
        mediator.fireDbAttributeEvent(
            new AttributeEvent(this, attr, dbEntity, MapEvent.ADD));

        AttributeDisplayEvent ade = new AttributeDisplayEvent(
                this,
                attr,
                dbEntity,
View Full Code Here

        DbEntity entity = mediator.getCurrentDbEntity();
        DbAttribute attrib = mediator.getCurrentDbAttribute();
        entity.removeAttribute(attrib.getName());
        ProjectUtil.cleanObjMappings(mediator.getCurrentDataMap());

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

        ProjectController mediator = getProjectController();
        ObjEntity entity = mediator.getCurrentObjEntity();
        ObjAttribute attrib = mediator.getCurrentObjAttribute();

        entity.removeAttribute(attrib.getName());
        AttributeEvent e = new AttributeEvent(
                Application.getFrame(),
                attrib,
                entity,
                MapEvent.REMOVE);
        mediator.fireObjAttributeEvent(e);
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.