Examples of Embeddable


Examples of org.apache.cayenne.map.Embeddable

        @Override
        protected Object create(String name, Object namingContext) {
            DataMap map = (DataMap) namingContext;
            if (map.getDefaultPackage() != null) {
                return new Embeddable(map.getDefaultPackage() + "." + name);
            }
            return new Embeddable(name);
        }
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

            return new EmbeddableAttribute(name);
        }

        @Override
        protected boolean isNameInUse(String name, Object namingContext) {
            Embeddable emb = (Embeddable) namingContext;
            return emb.getAttribute(name) != null;
        }
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

        @Override
        protected Object create(String name, Object namingContext) {
            DataMap map = (DataMap) namingContext;
            if(map.getDefaultPackage() != null){
                return new Embeddable(map.getDefaultPackage() + "." + name);
            }
            return new Embeddable(name);
        }
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

            return new EmbeddableAttribute(name);
        }

        @Override
        protected boolean isNameInUse(String name, Object namingContext) {
            Embeddable emb = (Embeddable) namingContext;
            return emb.getAttribute(name) != null;
        }
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

            // nothing, abstract entity does not have to define a dbAttribute
        }
        else if (attribute instanceof EmbeddedAttribute) {
            Map<String, String> attrOverrides = ((EmbeddedAttribute) attribute)
                    .getAttributeOverrides();
            Embeddable emb = ((EmbeddedAttribute) attribute).getEmbeddable();
            if (emb == null && ((EmbeddedAttribute) attribute).getType() != null) {
                validator.registerWarning(
                        "EmbeddedAttribute has incorrect Embeddable.",
                        path);
            }
            else if (emb == null && ((EmbeddedAttribute) attribute).getType() == null) {
                validator.registerWarning("EmbeddedAttribute has no Embeddable.", path);
            }

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

                Iterator<EmbeddableAttribute> it = embAttributes.iterator();
                while (it.hasNext()) {
                    EmbeddableAttribute embAttr = (EmbeddableAttribute) it.next();
                    String dbAttributeName;
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

        super();
    }

    @Override
    public void validateObject(ProjectPath path, Validator validator) {
        Embeddable emb = (Embeddable) path.getObject();
        validateName(emb, path,validator);
    }
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

            for (DataMap nextMap : domain.getDataMaps()) {
                if (nextMap == map) {
                    continue;
                }

                Embeddable conflictingEmbeddable = nextMap.getEmbeddable(name);
                if (conflictingEmbeddable != null) {

                        validator.registerWarning(
                                "Duplicate Embeddable name in another DataMap: "
                                        + name
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

            // format even if no serialVersionUID is defined by the user
            SerialVersionUIDAdder e3 = new SerialVersionUIDAdder(e2);
            return e3;
        }

        Embeddable embeddable = embeddablesByClass.get(key);
        if (embeddable != null) {
            // create enhancer chain
            EmbeddableVisitor e1 = new EmbeddableVisitor(out);

            // this ensures that both enhanced and original classes have compatible
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

                    embeddadles,
                    ProjectTraversal.embaddableComparator);
        }

        while (embeddadles.hasNext()) {
            Embeddable emd = (Embeddable) embeddadles.next();
            ProjectPath entPath = path.appendToPath(emd);
            handler.projectNode(entPath);

            if (handler.shouldReadChildren(emd, path)) {
                this.traverseEmbeddableAttributes(emd.getAttributes().iterator(), entPath);
            }
        }
    }
View Full Code Here

Examples of org.apache.cayenne.map.Embeddable

        // filter out excluded entities...
        Iterator<Embeddable> it = embeddables.iterator();

        while (it.hasNext()) {
            Embeddable e = it.next();

            // note that unlike entity, embeddable is matched by class name as it doesn't
            // have a symbolic name...
            if (!nameFilter.isIncluded(e.getClassName())) {
                it.remove();
            }
        }

        return embeddables;
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.