Examples of EmbeddableAttribute


Examples of org.apache.cayenne.map.EmbeddableAttribute

            return "untitledAttr";
        }

        @Override
        protected Object create(String name, Object namingContext) {
            return new EmbeddableAttribute(name);
        }
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

        Object createObject(ProjectPath path) {
            JpaBasic jpaBasic = (JpaBasic) path.getObject();

            Embeddable embeddable = (Embeddable) targetPath.getObject();

            EmbeddableAttribute attribute = new EmbeddableAttribute(jpaBasic.getName());
            attribute.setType(getAttributeType(path, jpaBasic.getName()).getName());
            attribute.setDbAttributeName(jpaBasic.getColumn().getName());

            embeddable.addAttribute(attribute);
            return attribute;
        }
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

        Object createObject(ProjectPath path) {
            JpaBasic jpaBasic = (JpaBasic) path.getObject();

            Embeddable embeddable = (Embeddable) targetPath.getObject();

            EmbeddableAttribute attribute = new EmbeddableAttribute(jpaBasic.getName());
            attribute.setType(getAttributeType(path, jpaBasic.getName()).getName());
            attribute.setDbAttributeName(jpaBasic.getColumn().getName());

            embeddable.addAttribute(attribute);
            return attribute;
        }
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

            return "untitledAttr";
        }

        @Override
        protected Object create(String name, Object namingContext) {
            return new EmbeddableAttribute(name);
        }
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

            return "untitledAttr";
        }

        @Override
        protected Object create(String name, Object namingContext) {
            return new EmbeddableAttribute(name);
        }
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

            if (emb != null) {
                Collection<EmbeddableAttribute> embAttributes = emb.getAttributes();

                Iterator<EmbeddableAttribute> it = embAttributes.iterator();
                while (it.hasNext()) {
                    EmbeddableAttribute embAttr = (EmbeddableAttribute) it.next();
                    String dbAttributeName;
                    if (attrOverrides.size() > 0
                            && attrOverrides.containsKey(embAttr.getName())) {
                        dbAttributeName = attrOverrides.get(embAttr.getName());
                    }
                    else {
                        dbAttributeName = embAttr.getDbAttributeName();
                    }

                    if (dbAttributeName == "" || dbAttributeName == null) {
                        validator.registerWarning(
                                "EmbeddedAttribute has no DbAttribute mapping.",
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

        super();
    }

    @Override
    public void validateObject(ProjectPath path, Validator validator) {
        EmbeddableAttribute emAttribute = (EmbeddableAttribute) path.getObject();
       
        // Must have name
        if (Util.isEmptyString(emAttribute.getName())) {
            validator.registerError("Unnamed ObjAttribute.", path);
        }
       
        // skip validation of inherited attributes
        if (path.getObjectParent() != null
                && path.getObjectParent() != emAttribute.getEmbeddable()) {
            return;
        }
       
        // all attributes must have type
        if (Util.isEmptyString(emAttribute.getType())) {
            validator.registerWarning("EmbeddableAttribute has no type.", path);
        }
    }
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

        Object createObject(ProjectPath path) {
            JpaBasic jpaBasic = (JpaBasic) path.getObject();

            Embeddable embeddable = (Embeddable) targetPath.getObject();

            EmbeddableAttribute attribute = new EmbeddableAttribute(jpaBasic.getName());
            attribute.setType(getAttributeType(path, jpaBasic.getName()).getName());
            attribute.setDbAttributeName(jpaBasic.getColumn().getName());

            embeddable.addAttribute(attribute);
            return attribute;
        }
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

            return "untitledAttr";
        }

        @Override
        protected Object create(String name, Object namingContext) {
            return new EmbeddableAttribute(name);
        }
View Full Code Here

Examples of org.apache.cayenne.map.EmbeddableAttribute

                    return embeddable.getAttribute(name) == null;
                }
            };

            if (content instanceof EmbeddableAttribute) {
                EmbeddableAttribute attr = (EmbeddableAttribute) content;
                attr.setName(getFreeName(checker, attr.getName()));

                embeddable.addAttribute(attr);
                CreateAttributeAction.fireEmbeddableAttributeEvent(
                        this,
                        mediator,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.