Search in sources :

Example 71 with ObjAttribute

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

the class PackageUpdateController method updatePackage.

protected void updatePackage() {
    boolean doAll = isAllEntities();
    Map<String, String> oldNameEmbeddableToNewName = new HashMap<>();
    // Create local copy to escape ConcurrentModificationException
    Collection<Embeddable> embeddables = new ArrayList<>(dataMap.getEmbeddables());
    for (Embeddable embeddable : embeddables) {
        String oldName = embeddable.getClassName();
        Pattern p = Pattern.compile("[.]");
        String[] tokens = p.split(oldName);
        String className = tokens[tokens.length - 1];
        if (doAll || Util.isEmptyString(oldName) || oldName.indexOf('.') < 0) {
            EmbeddableEvent e = new EmbeddableEvent(this, embeddable, embeddable.getClassName());
            String newClassName = getNameWithDefaultPackage(className);
            oldNameEmbeddableToNewName.put(oldName, newClassName);
            embeddable.setClassName(newClassName);
            mediator.fireEmbeddableEvent(e, mediator.getCurrentDataMap());
        }
    }
    for (ObjEntity entity : dataMap.getObjEntities()) {
        String oldName = getClassName(entity);
        if (doAll || Util.isEmptyString(oldName) || oldName.indexOf('.') < 0) {
            String className = extractClassName(Util.isEmptyString(oldName) ? entity.getName() : oldName);
            setClassName(entity, getNameWithDefaultPackage(className));
        }
        for (ObjAttribute attribute : entity.getAttributes()) {
            if (attribute instanceof EmbeddedAttribute) {
                if (oldNameEmbeddableToNewName.size() > 0 && oldNameEmbeddableToNewName.containsKey(attribute.getType())) {
                    attribute.setType(oldNameEmbeddableToNewName.get(attribute.getType()));
                    AttributeEvent ev = new AttributeEvent(this, attribute, entity);
                    mediator.fireObjAttributeEvent(ev);
                }
            }
        }
    }
    view.dispose();
}
Also used : Pattern(java.util.regex.Pattern) EmbeddableEvent(org.apache.cayenne.map.event.EmbeddableEvent) ObjAttribute(org.apache.cayenne.map.ObjAttribute) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) EmbeddedAttribute(org.apache.cayenne.map.EmbeddedAttribute) AttributeEvent(org.apache.cayenne.map.event.AttributeEvent) Embeddable(org.apache.cayenne.map.Embeddable) ObjEntity(org.apache.cayenne.map.ObjEntity)

Example 72 with ObjAttribute

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

the class ObjAttributeInfoDialog method initController.

private void initController(ObjAttribute attr) {
    for (String embeddableName : embeddableNames) {
        ((DefaultComboBoxModel) view.getTypeComboBox().getModel()).addElement(embeddableName);
    }
    this.attribute = attr;
    if (attribute instanceof EmbeddedAttribute || embeddableNames.contains(attribute.getType())) {
        this.attributeSaved = new EmbeddedAttribute();
    } else {
        this.attributeSaved = new ObjAttribute();
    }
    copyObjAttribute(attributeSaved, attribute);
    relTargets = new ArrayList<DbEntity>(attribute.getEntity().getDataMap().getDbEntities());
    /*
		 * Register auto-selection of the target
		 */
    view.getPathBrowser().addTreeSelectionListener(this);
    view.getAttributeName().setText(attribute.getName());
    if (attribute.getDbAttributePath() != null) {
        if (attribute.getDbAttributePath().contains(".")) {
            String path = attribute.getDbAttributePath();
            view.getCurrentPathLabel().setText(path.replace(".", " -> "));
        } else {
            view.getCurrentPathLabel().setText(attribute.getDbAttributePath());
        }
    } else {
        view.getCurrentPathLabel().setText("");
    }
    view.getSourceEntityLabel().setText(attribute.getEntity().getName());
    view.getTypeComboBox().setSelectedItem(attribute.getType());
    BindingBuilder builder = new BindingBuilder(getApplication().getBindingFactory(), this);
    builder.bindToAction(view.getCancelButton(), "closeAction()");
    builder.bindToAction(view.getSelectPathButton(), "setPath(true)");
    builder.bindToAction(view.getSaveButton(), "saveMapping()");
    /*
		 * set filter for ObjAttributePathBrowser
		 */
    if (view.getPathBrowser().getModel() == null) {
        Entity firstEntity = null;
        if (attribute.getDbAttribute() == null) {
            if (attribute.getParent() instanceof ObjEntity) {
                DbEntity dbEnt = ((ObjEntity) attribute.getParent()).getDbEntity();
                if (dbEnt != null) {
                    Collection<DbAttribute> attrib = dbEnt.getAttributes();
                    Collection<DbRelationship> rel = dbEnt.getRelationships();
                    if (attrib.size() > 0) {
                        Iterator<DbAttribute> iter = attrib.iterator();
                        firstEntity = iter.next().getEntity();
                    } else if (rel.size() > 0) {
                        Iterator<DbRelationship> iter = rel.iterator();
                        firstEntity = iter.next().getSourceEntity();
                    }
                }
            }
        } else {
            firstEntity = getFirstEntity();
        }
        if (firstEntity != null) {
            EntityTreeModel treeModel = new EntityTreeModel(firstEntity);
            treeModel.setFilter(new EntityTreeAttributeRelationshipFilter());
            view.getPathBrowser().setModel(treeModel);
        }
    }
    if (attribute.getDbAttribute() != null) {
        setSelectionPath();
    }
    view.getTypeComboBox().addItemListener(e -> {
        if (lastObjectType != null) {
            if (!lastObjectType.equals(e.getItemSelectable())) {
                if (embeddableNames.contains(e.getItemSelectable().getSelectedObjects()[0].toString())) {
                    if (attributeSaved instanceof ObjAttribute) {
                        EmbeddedAttribute copyAttrSaved = new EmbeddedAttribute();
                        copyObjAttribute(copyAttrSaved, attributeSaved);
                        attributeSaved = copyAttrSaved;
                    }
                } else {
                    if (attributeSaved instanceof EmbeddedAttribute) {
                        ObjAttribute copyAttrSaved = new ObjAttribute();
                        copyObjAttribute(copyAttrSaved, attributeSaved);
                        attributeSaved = copyAttrSaved;
                    }
                }
                attributeSaved.setType(e.getItemSelectable().getSelectedObjects()[0].toString());
                rebuildTable();
                setEnabledSaveButton();
            }
        }
    });
    view.getAttributeName().addKeyListener(new KeyListener() {

        public void keyPressed(KeyEvent e) {
            if (!view.getAttributeName().getText().equals(attribute.getName())) {
                setEnabledSaveButton();
            }
        }

        public void keyReleased(KeyEvent e) {
            if (!view.getAttributeName().getText().equals(attribute.getName())) {
                setEnabledSaveButton();
            }
        }

        public void keyTyped(KeyEvent e) {
        }
    });
    rebuildTable();
}
Also used : ObjEntity(org.apache.cayenne.map.ObjEntity) Entity(org.apache.cayenne.map.Entity) DbEntity(org.apache.cayenne.map.DbEntity) ObjAttribute(org.apache.cayenne.map.ObjAttribute) BindingBuilder(org.apache.cayenne.swing.BindingBuilder) DbAttribute(org.apache.cayenne.map.DbAttribute) EmbeddedAttribute(org.apache.cayenne.map.EmbeddedAttribute) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel) KeyEvent(java.awt.event.KeyEvent) ObjEntity(org.apache.cayenne.map.ObjEntity) DbEntity(org.apache.cayenne.map.DbEntity) EntityTreeModel(org.apache.cayenne.modeler.util.EntityTreeModel) DbRelationship(org.apache.cayenne.map.DbRelationship) EntityTreeAttributeRelationshipFilter(org.apache.cayenne.modeler.util.EntityTreeAttributeRelationshipFilter) Iterator(java.util.Iterator) KeyListener(java.awt.event.KeyListener)

Example 73 with ObjAttribute

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

the class PasteUndoableEdit method undo.

@Override
public void undo() throws CannotUndoException {
    RemoveAttributeAction rAttributeAction = actionManager.getAction(RemoveAttributeAction.class);
    RemoveAction rAction = actionManager.getAction(RemoveAction.class);
    RemoveRelationshipAction rRelationShipAction = actionManager.getAction(RemoveRelationshipAction.class);
    RemoveCallbackMethodAction rCallbackMethodAction = actionManager.getAction(RemoveCallbackMethodAction.class);
    RemoveProcedureParameterAction rProcedureParamAction = actionManager.getAction(RemoveProcedureParameterAction.class);
    if (content instanceof DataMap) {
        if (where instanceof DataChannelDescriptor) {
            rAction.removeDataMap((DataMap) content);
        } else if (where instanceof DataNodeDescriptor) {
            rAction.removeDataMapFromDataNode((DataNodeDescriptor) where, (DataMap) content);
        }
    } else if (where instanceof DataMap) {
        if (content instanceof DbEntity) {
            rAction.removeDbEntity(map, (DbEntity) content);
        } else if (content instanceof ObjEntity) {
            rAction.removeObjEntity(map, (ObjEntity) content);
        } else if (content instanceof Embeddable) {
            rAction.removeEmbeddable(map, (Embeddable) content);
        } else if (content instanceof QueryDescriptor) {
            rAction.removeQuery(map, (QueryDescriptor) content);
        } else if (content instanceof Procedure) {
            rAction.removeProcedure(map, (Procedure) content);
        }
    } else if (where instanceof DbEntity) {
        if (content instanceof DbEntity) {
            rAction.removeDbEntity(map, (DbEntity) content);
        } else if (content instanceof DbAttribute) {
            rAttributeAction.removeDbAttributes(map, (DbEntity) where, new DbAttribute[] { (DbAttribute) content });
        } else if (content instanceof DbRelationship) {
            rRelationShipAction.removeDbRelationships((DbEntity) where, new DbRelationship[] { (DbRelationship) content });
        }
    } else if (where instanceof ObjEntity) {
        if (content instanceof ObjEntity) {
            rAction.removeObjEntity(map, (ObjEntity) content);
        } else if (content instanceof ObjAttribute) {
            rAttributeAction.removeObjAttributes((ObjEntity) where, new ObjAttribute[] { (ObjAttribute) content });
        } else if (content instanceof ObjRelationship) {
            rRelationShipAction.removeObjRelationships((ObjEntity) where, new ObjRelationship[] { (ObjRelationship) content });
        } else if (content instanceof ObjCallbackMethod) {
            ObjCallbackMethod[] methods = new ObjCallbackMethod[] { (ObjCallbackMethod) content };
            for (ObjCallbackMethod callbackMethod : methods) {
                rCallbackMethodAction.removeCallbackMethod(methods[0].getCallbackType(), callbackMethod.getName());
            }
        }
    } else if (where instanceof Procedure) {
        final Procedure procedure = (Procedure) where;
        if (content instanceof ProcedureParameter) {
            rProcedureParamAction.removeProcedureParameters(procedure, new ProcedureParameter[] { (ProcedureParameter) content });
        }
    } else if (where instanceof Embeddable) {
        if (content instanceof Embeddable) {
            rAction.removeEmbeddable(map, (Embeddable) content);
        } else if (content instanceof EmbeddableAttribute) {
            rAttributeAction.removeEmbeddableAttributes((Embeddable) where, new EmbeddableAttribute[] { (EmbeddableAttribute) content });
        }
    }
}
Also used : ProcedureParameter(org.apache.cayenne.map.ProcedureParameter) DataChannelDescriptor(org.apache.cayenne.configuration.DataChannelDescriptor) ObjRelationship(org.apache.cayenne.map.ObjRelationship) ObjAttribute(org.apache.cayenne.map.ObjAttribute) DbAttribute(org.apache.cayenne.map.DbAttribute) DataNodeDescriptor(org.apache.cayenne.configuration.DataNodeDescriptor) DataMap(org.apache.cayenne.map.DataMap) Embeddable(org.apache.cayenne.map.Embeddable) RemoveProcedureParameterAction(org.apache.cayenne.modeler.action.RemoveProcedureParameterAction) QueryDescriptor(org.apache.cayenne.map.QueryDescriptor) ObjEntity(org.apache.cayenne.map.ObjEntity) DbEntity(org.apache.cayenne.map.DbEntity) DbRelationship(org.apache.cayenne.map.DbRelationship) RemoveCallbackMethodAction(org.apache.cayenne.modeler.action.RemoveCallbackMethodAction) Procedure(org.apache.cayenne.map.Procedure) RemoveRelationshipAction(org.apache.cayenne.modeler.action.RemoveRelationshipAction) EmbeddableAttribute(org.apache.cayenne.map.EmbeddableAttribute) RemoveAction(org.apache.cayenne.modeler.action.RemoveAction) ObjCallbackMethod(org.apache.cayenne.modeler.editor.ObjCallbackMethod) RemoveAttributeAction(org.apache.cayenne.modeler.action.RemoveAttributeAction)

Example 74 with ObjAttribute

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

the class DuplicatedAttributesDialog method setDuplicatedAttributes.

public void setDuplicatedAttributes(List<ObjAttribute> attributes) {
    if (duplicatedAttributes == null) {
        duplicatedAttributes = new LinkedList<DuplicatedAttributeInfo>();
    }
    duplicatedAttributes.clear();
    for (ObjAttribute attribute : attributes) {
        DuplicatedAttributeInfo attributeInfo = new DuplicatedAttributeInfo(attribute.getName(), attribute.getType(), superEntity.getAttribute(attribute.getName()).getType(), DELETE_ACTION);
        duplicatedAttributes.add(attributeInfo);
    }
    attributesTable.setModel(new DuplicatedAttributeTableModel(getMediator(), this, duplicatedAttributes));
}
Also used : ObjAttribute(org.apache.cayenne.map.ObjAttribute)

Example 75 with ObjAttribute

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

the class PasteAction method paste.

/**
 * Pastes single object
 */
public void paste(Object where, Object content, DataChannelDescriptor dataChannelDescriptor, DataMap map) {
    final ProjectController mediator = getProjectController();
    /**
     * Add a little intelligence - if a tree leaf is selected, we can paste to a
     * parent datamap
     */
    if (isTreeLeaf(where) && isTreeLeaf(content)) {
        where = mediator.getCurrentDataMap();
    }
    if ((where instanceof DataChannelDescriptor || where instanceof DataNodeDescriptor) && content instanceof DataMap) {
        // paste DataMap to DataDomain or DataNode
        DataMap dataMap = ((DataMap) content);
        dataMap.setName(NameBuilder.builder(dataMap, dataChannelDescriptor).baseName(dataMap.getName()).dupesPattern(COPY_PATTERN).name());
        /**
         * Update all names in the new DataMap, so that they would not conflict with
         * names from other datamaps of this domain
         */
        // add some intelligence - if we rename an entity, we should rename all links
        // to it as well
        Map<String, String> renamedDbEntities = new HashMap<>();
        Map<String, String> renamedObjEntities = new HashMap<>();
        Map<String, String> renamedEmbeddables = new HashMap<>();
        for (DbEntity dbEntity : dataMap.getDbEntities()) {
            String oldName = dbEntity.getName();
            dbEntity.setName(NameBuilder.builder(dbEntity, dataMap).baseName(dbEntity.getName()).dupesPattern(COPY_PATTERN).name());
            if (!oldName.equals(dbEntity.getName())) {
                renamedDbEntities.put(oldName, dbEntity.getName());
            }
        }
        for (ObjEntity objEntity : dataMap.getObjEntities()) {
            String oldName = objEntity.getName();
            objEntity.setName(NameBuilder.builder(objEntity, dataMap).baseName(objEntity.getName()).dupesPattern(COPY_PATTERN).name());
            if (!oldName.equals(objEntity.getName())) {
                renamedObjEntities.put(oldName, objEntity.getName());
            }
        }
        for (Embeddable embeddable : dataMap.getEmbeddables()) {
            String oldName = embeddable.getClassName();
            embeddable.setClassName(NameBuilder.builder(embeddable, dataMap).baseName(embeddable.getClassName()).dupesPattern(COPY_PATTERN).name());
            if (!oldName.equals(embeddable.getClassName())) {
                renamedEmbeddables.put(oldName, embeddable.getClassName());
            }
        }
        for (Procedure procedure : dataMap.getProcedures()) {
            procedure.setName(NameBuilder.builder(procedure, dataMap).baseName(procedure.getName()).dupesPattern(COPY_PATTERN).name());
        }
        for (QueryDescriptor query : dataMap.getQueryDescriptors()) {
            query.setName(NameBuilder.builder(query, dataMap).baseName(query.getName()).dupesPattern(COPY_PATTERN).name());
        }
        // if an entity was renamed, we rename all links to it too
        for (DbEntity dbEntity : dataMap.getDbEntities()) {
            for (DbRelationship rel : dbEntity.getRelationships()) {
                if (renamedDbEntities.containsKey(rel.getTargetEntityName())) {
                    rel.setTargetEntityName(renamedDbEntities.get(rel.getTargetEntityName()));
                }
            }
        }
        for (ObjEntity objEntity : dataMap.getObjEntities()) {
            if (renamedDbEntities.containsKey(objEntity.getDbEntityName())) {
                objEntity.setDbEntityName(renamedDbEntities.get(objEntity.getDbEntityName()));
            }
            if (renamedObjEntities.containsKey(objEntity.getSuperEntityName())) {
                objEntity.setSuperEntityName(renamedDbEntities.get(objEntity.getSuperEntityName()));
            }
            for (ObjRelationship rel : objEntity.getRelationships()) {
                if (renamedObjEntities.containsKey(rel.getTargetEntityName())) {
                    rel.setTargetEntityName(renamedObjEntities.get(rel.getTargetEntityName()));
                }
            }
        }
        mediator.addDataMap(this, dataMap);
    } else if (where instanceof DataMap) {
        // paste DbEntity to DataMap
        final DataMap dataMap = ((DataMap) where);
        // clear data map parent cache
        clearDataMapCache(dataMap);
        if (content instanceof DbEntity) {
            DbEntity dbEntity = (DbEntity) content;
            dbEntity.setName(NameBuilder.builder(dbEntity, dataMap).baseName(dbEntity.getName()).dupesPattern(COPY_PATTERN).name());
            dataMap.addDbEntity(dbEntity);
            CreateDbEntityAction.fireDbEntityEvent(this, mediator, dbEntity);
        } else if (content instanceof ObjEntity) {
            // paste ObjEntity to DataMap
            ObjEntity objEntity = (ObjEntity) content;
            objEntity.setName(NameBuilder.builder(objEntity, dataMap).baseName(objEntity.getName()).dupesPattern(COPY_PATTERN).name());
            dataMap.addObjEntity(objEntity);
            CreateObjEntityAction.fireObjEntityEvent(this, mediator, dataMap, objEntity);
        } else if (content instanceof Embeddable) {
            // paste Embeddable to DataMap
            Embeddable embeddable = (Embeddable) content;
            embeddable.setClassName(NameBuilder.builder(embeddable, dataMap).baseName(embeddable.getClassName()).dupesPattern(COPY_PATTERN).name());
            dataMap.addEmbeddable(embeddable);
            CreateEmbeddableAction.fireEmbeddableEvent(this, mediator, dataMap, embeddable);
        } else if (content instanceof QueryDescriptor) {
            QueryDescriptor query = (QueryDescriptor) content;
            query.setName(NameBuilder.builder(query, dataMap).dupesPattern(COPY_PATTERN).baseName(query.getName()).name());
            query.setDataMap(dataMap);
            dataMap.addQueryDescriptor(query);
            QueryType.fireQueryEvent(this, mediator, dataMap, query);
        } else if (content instanceof Procedure) {
            // paste Procedure to DataMap
            Procedure procedure = (Procedure) content;
            procedure.setName(NameBuilder.builder(procedure, dataMap).dupesPattern(COPY_PATTERN).baseName(procedure.getName()).name());
            dataMap.addProcedure(procedure);
            CreateProcedureAction.fireProcedureEvent(this, mediator, dataMap, procedure);
        }
    } else if (where instanceof DbEntity) {
        final DbEntity dbEntity = (DbEntity) where;
        if (content instanceof DbAttribute) {
            DbAttribute attr = (DbAttribute) content;
            attr.setName(NameBuilder.builder(attr, dbEntity).dupesPattern(COPY_PATTERN).baseName(attr.getName()).name());
            dbEntity.addAttribute(attr);
            CreateAttributeAction.fireDbAttributeEvent(this, mediator, mediator.getCurrentDataMap(), dbEntity, attr);
        } else if (content instanceof DbRelationship) {
            DbRelationship rel = (DbRelationship) content;
            rel.setName(NameBuilder.builder(rel, dbEntity).baseName(rel.getName()).dupesPattern(COPY_PATTERN).name());
            dbEntity.addRelationship(rel);
            CreateRelationshipAction.fireDbRelationshipEvent(this, mediator, dbEntity, rel);
        }
    } else if (where instanceof ObjEntity) {
        ObjEntity objEntity = (ObjEntity) where;
        if (content instanceof ObjAttribute) {
            ObjAttribute attr = (ObjAttribute) content;
            attr.setName(NameBuilder.builder(attr, objEntity).baseName(attr.getName()).dupesPattern(COPY_PATTERN).name());
            objEntity.addAttribute(attr);
            CreateAttributeAction.fireObjAttributeEvent(this, mediator, mediator.getCurrentDataMap(), objEntity, attr);
        } else if (content instanceof ObjRelationship) {
            ObjRelationship rel = (ObjRelationship) content;
            rel.setName(NameBuilder.builder(rel, objEntity).baseName(rel.getName()).dupesPattern(COPY_PATTERN).name());
            objEntity.addRelationship(rel);
            CreateRelationshipAction.fireObjRelationshipEvent(this, mediator, objEntity, rel);
        } else if (content instanceof ObjCallbackMethod) {
            ObjCallbackMethod method = (ObjCallbackMethod) content;
            method.setName(NameBuilder.builderForCallbackMethod(objEntity).baseName(method.getName()).dupesPattern(COPY_PATTERN).name());
            objEntity.getCallbackMap().getCallbackDescriptor(mediator.getCurrentCallbackType().getType()).addCallbackMethod(method.getName());
            CallbackMethodEvent ce = new CallbackMethodEvent(this, null, method.getName(), MapEvent.ADD);
            getProjectController().fireCallbackMethodEvent(ce);
        }
    } else if (where instanceof Embeddable) {
        final Embeddable embeddable = (Embeddable) where;
        if (content instanceof EmbeddableAttribute) {
            EmbeddableAttribute attr = (EmbeddableAttribute) content;
            attr.setName(NameBuilder.builder(attr, embeddable).baseName(attr.getName()).dupesPattern(COPY_PATTERN).name());
            embeddable.addAttribute(attr);
            CreateAttributeAction.fireEmbeddableAttributeEvent(this, mediator, embeddable, attr);
        }
    } else if (where instanceof Procedure) {
        // paste param to procedure
        final Procedure procedure = (Procedure) where;
        if (content instanceof ProcedureParameter) {
            ProcedureParameter param = (ProcedureParameter) content;
            param.setName(NameBuilder.builder(param, procedure).baseName(param.getName()).dupesPattern(COPY_PATTERN).name());
            procedure.addCallParameter(param);
            CreateProcedureParameterAction.fireProcedureParameterEvent(this, mediator, procedure, param);
        }
    }
}
Also used : ProcedureParameter(org.apache.cayenne.map.ProcedureParameter) DataChannelDescriptor(org.apache.cayenne.configuration.DataChannelDescriptor) ObjRelationship(org.apache.cayenne.map.ObjRelationship) ObjAttribute(org.apache.cayenne.map.ObjAttribute) HashMap(java.util.HashMap) DbAttribute(org.apache.cayenne.map.DbAttribute) DataNodeDescriptor(org.apache.cayenne.configuration.DataNodeDescriptor) ProjectController(org.apache.cayenne.modeler.ProjectController) DataMap(org.apache.cayenne.map.DataMap) Embeddable(org.apache.cayenne.map.Embeddable) QueryDescriptor(org.apache.cayenne.map.QueryDescriptor) ObjEntity(org.apache.cayenne.map.ObjEntity) DbEntity(org.apache.cayenne.map.DbEntity) CallbackMethodEvent(org.apache.cayenne.modeler.event.CallbackMethodEvent) DbRelationship(org.apache.cayenne.map.DbRelationship) Procedure(org.apache.cayenne.map.Procedure) EmbeddableAttribute(org.apache.cayenne.map.EmbeddableAttribute) ObjCallbackMethod(org.apache.cayenne.modeler.editor.ObjCallbackMethod)

Aggregations

ObjAttribute (org.apache.cayenne.map.ObjAttribute)81 ObjEntity (org.apache.cayenne.map.ObjEntity)57 DbAttribute (org.apache.cayenne.map.DbAttribute)31 ObjRelationship (org.apache.cayenne.map.ObjRelationship)27 DbEntity (org.apache.cayenne.map.DbEntity)26 Test (org.junit.Test)26 DbRelationship (org.apache.cayenne.map.DbRelationship)19 DbJoin (org.apache.cayenne.map.DbJoin)12 DataMap (org.apache.cayenne.map.DataMap)9 ClassDescriptor (org.apache.cayenne.reflect.ClassDescriptor)9 HashMap (java.util.HashMap)8 CayenneRuntimeException (org.apache.cayenne.CayenneRuntimeException)8 AttributeProperty (org.apache.cayenne.reflect.AttributeProperty)8 PropertyVisitor (org.apache.cayenne.reflect.PropertyVisitor)8 ToManyProperty (org.apache.cayenne.reflect.ToManyProperty)8 ToOneProperty (org.apache.cayenne.reflect.ToOneProperty)8 ArrayList (java.util.ArrayList)7 DataChannelDescriptor (org.apache.cayenne.configuration.DataChannelDescriptor)7 HashSet (java.util.HashSet)6 Expression (org.apache.cayenne.exp.Expression)6