Examples of DataMap


Examples of org.apache.cayenne.map.DataMap

            return new Embeddable(name);
        }

        @Override
        protected boolean isNameInUse(String name, Object namingContext) {
            DataMap map = (DataMap) namingContext;
            if (map.getDefaultPackage() != null) {
                return map.getEmbeddable((map.getDefaultPackage() + "." + name)) != null;
            }
            return map.getEmbeddable(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

        context = createDataContext();
    }

    public void testBindCHARInWHERE() {
        // add 2 Artists
        DataMap testDataMap = context.getEntityResolver().getDataMap("testmap");
        SQLTemplate q1 = new SQLTemplate(
                testDataMap,
                "INSERT INTO ARTIST VALUES (1, 'Surikov', null)",
                true);
        SQLTemplate q2 = new SQLTemplate(
View Full Code Here

Examples of org.apache.cayenne.map.DataMap

        List<DataRow> result = context.performQuery(s1);
        assertEquals(1, result.size());
    }

    public void testSQLTemplateForDataMap() {
        DataMap testDataMap = context.getEntityResolver().getDataMap("testmap");
        SQLTemplate q1 = new SQLTemplate(testDataMap, "SELECT * FROM ARTIST", true);
        List<DataRow> result = context.performQuery(q1);
        assertEquals(0, result.size());
    }
View Full Code Here

Examples of org.apache.cayenne.map.DataMap

        List<DataRow> result = context.performQuery(q1);
        assertEquals(0, result.size());
    }

    public void testSQLTemplateForDataMapWithInsert() {
        DataMap testDataMap = context.getEntityResolver().getDataMap("testmap");
        String sql = "INSERT INTO ARTIST VALUES (15, 'Surikov', null)";
        SQLTemplate q1 = new SQLTemplate(testDataMap, sql, true);
        context.performNonSelectingQuery(q1);

        SQLTemplate q2 = new SQLTemplate(testDataMap, "SELECT * FROM ARTIST", true);
View Full Code Here

Examples of org.apache.pig.data.DataMap

        assertTrue(actual == expected);
    }

    @Test
    public void testCOUNTMap() throws Exception {
        DataMap map = new DataMap();
       
        Tuple tup = new Tuple();
        tup.appendField(map);
        DataAtom output = new DataAtom();
       
       
        EvalFunc<DataAtom> count = new COUNT();
        FilterFunc isEmpty = new IsEmpty();
       
        assertTrue(isEmpty.exec(tup));
        count.exec(tup,output);
        assertTrue(output.numval() == 0);
       
        map.put("a", new DataAtom("a"));

        assertFalse(isEmpty.exec(tup));
        count.exec(tup,output);
        assertTrue(output.numval() == 1);

       
        map.put("b", new Tuple());

        assertFalse(isEmpty.exec(tup));
        count.exec(tup,output);
        assertTrue(output.numval() == 2);
       
View Full Code Here

Examples of org.jtester.core.IJTester.DataMap

  public void data(DataMap data) {
    this.datas.add(data);
  }

  public void data(String json) {
    DataMap data = JSON.toObject(json, DataMap.class);
    this.datas.add(data);
  }
View Full Code Here

Examples of org.uengine.ui.list.datamodel.DataMap

      out.write("\r\n");
  request.setCharacterEncoding("UTF-8");
    response.setHeader("Cache-Control", "no-cache");

  DataMap reqMap = HttpUtils.getDataMap(request, false);

      out.write('\r');
      out.write('\n');
      out.write('\r');
      out.write('\n');
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.