Examples of DataMap


Examples of org.apache.cayenne.map.DataMap

            return new ObjEntity(name);
        }

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

Examples of org.apache.cayenne.map.DataMap

            return new DbEntity(name);
        }

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

Examples of org.apache.cayenne.map.DataMap

            return new Procedure(name);
        }

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

Examples of org.apache.cayenne.map.DataMap

            return query;
        }

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

Examples of org.apache.cayenne.map.DataMap

            }
        }
    }

    protected Entity validateRoot(SelectQuery query, ProjectPath path, Validator validator) {
        DataMap map = path.firstInstanceOf(DataMap.class);
        if (query.getRoot() == null && map != null) {
            validator.registerWarning("Query has no root", path);
            return null;
        }
View Full Code Here

Examples of org.apache.cayenne.map.DataMap

        if (Util.isEmptyString(name)) {
            validator.registerError("Unnamed SelectQuery.", path);
            return;
        }

        DataMap map = (DataMap) path.getObjectParent();
        if (map == null) {
            return;
        }

        // check for duplicate names in the parent context

        for (final Query otherQuery : map.getQueries()) {
            if (otherQuery == query) {
                continue;
            }

            if (name.equals(otherQuery.getName())) {
View Full Code Here

Examples of org.apache.cayenne.map.DataMap

                continue;
            }

            // skip FK to a different DB
            if (domain != null) {
                DataMap srcMap = rel.getSourceEntity().getDataMap();
                DataMap targetMap = rel.getTargetEntity().getDataMap();

                if (srcMap != null && targetMap != null && srcMap != targetMap) {
                    if (domain.lookupDataNode(srcMap) != domain.lookupDataNode(targetMap)) {
                        continue;
                    }
View Full Code Here

Examples of org.apache.cayenne.map.DataMap

    /**
     * Removes named DataMap from this DataDomain and any underlying DataNodes that
     * include it.
     */
    public synchronized void removeMap(String mapName) {
        DataMap map = getMap(mapName);
        if (map == null) {
            return;
        }

        // remove from data nodes
View Full Code Here

Examples of org.apache.cayenne.map.DataMap

    settings.load();

    // Get the Cayenne map
    DataDomain domain = Configuration.getSharedConfiguration().getDomain("BNUBotDomain");
    DataNode dataNode = domain.getNode("BNUBotDataNode");
    DataMap dataMap = domain.getMap("BNUBotMap");

    DataSource dataSource = dataNode.getDataSource();
    DbAdapter adapter = dataNode.getAdapter();

    try {
View Full Code Here

Examples of org.apache.cayenne.map.DataMap

    protected DbAdapter adapter;

    public DBHelper get() throws ConfigurationException {

        DataChannel channel = serverRuntimeProvider.get().getChannel();
        DataMap firstMap = channel.getEntityResolver().getDataMaps().iterator().next();
        return new FlavoredDBHelper(dataSource, adapter.getQuotingStrategy(firstMap
                .isQuotingSQLIdentifiers()));
    }
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.