Package com.impetus.kundera.persistence.context.jointable

Examples of com.impetus.kundera.persistence.context.jointable.JoinTableData


        final String joinColumn = "joinColumnName";
        final String inverseJoinColumn = "inverseJoinColumnName";

        CouchDBTestUtils.createViews(new String[] { joinColumn, inverseJoinColumn }, tableName, httpHost, schemaName,
                httpClient);
        JoinTableData joinTableData = new JoinTableData(OPERATION.INSERT, schemaName, tableName, joinColumn,
                inverseJoinColumn, null);

        String joinKey = "4";

        Integer inverseJoinKey1 = new Integer(10);
        Double inverseJoinKey2 = new Double(12.23);
        Set inverseJoinKeys = new HashSet();
        inverseJoinKeys.add(inverseJoinKey1);
        inverseJoinKeys.add(inverseJoinKey2);

        joinTableData.addJoinTableRecord(joinKey, inverseJoinKeys);

        EntityManager em = emf.createEntityManager();
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        CouchDBClient client = (CouchDBClient) clients.get(_PU);
        client.persistJoinTable(joinTableData);
View Full Code Here


        findIdsByColumn();
    }

    private void persistJoinTable()
    {
        JoinTableData joinTableData = new JoinTableData(OPERATION.INSERT, "KunderaExamples", "PERSON_ADDRESS",
                "PERSON_ID", "ADDRESS_ID", PersonMToM.class);

        Set<Object> values1 = new HashSet<Object>();
        values1.add("A");
        values1.add("B");
        Set<Object> values2 = new HashSet<Object>();
        values2.add("C");
        values2.add("D");

        joinTableData.addJoinTableRecord("1", values1);
        joinTableData.addJoinTableRecord("2", values2);

        client.persistJoinTable(joinTableData);

    }
View Full Code Here

     *            the inv join column values
     */
    private void addJoinTableData(OPERATION operation, String schemaName, String joinTableName, String joinColumnName,
            String invJoinColumnName, Class<?> entityClass, Object joinColumnValue, Set<Object> invJoinColumnValues)
    {
        JoinTableData joinTableData = new JoinTableData(operation, schemaName, joinTableName, joinColumnName,
                invJoinColumnName, entityClass);
        joinTableData.addJoinTableRecord(joinColumnValue, invJoinColumnValues);
        joinTableDataCollection.add(joinTableData);
    }
View Full Code Here

        final String schemaName = "redis";
        final String tableName = "redisjointable";
        final String joinColumn = "joincolumn";
        final String inverseJoinColumn = "inverseJoinColumnName";

        JoinTableData joinTableData = new JoinTableData(OPERATION.INSERT, "redis", "redisjointable", "joincolumn",
                "inverseJoinColumnName", null);

        UUID joinKey = UUID.randomUUID();

        Integer inverseJoinKey1 = new Integer(10);
        Double inverseJoinKey2 = new Double(12.23);
        Set inverseJoinKeys = new HashSet();
        inverseJoinKeys.add(inverseJoinKey1);
        inverseJoinKeys.add(inverseJoinKey2);

        joinTableData.addJoinTableRecord(joinKey, inverseJoinKeys);

        EntityManager em = emf.createEntityManager();
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        RedisClient client = (RedisClient) clients.get(REDIS_PU);
        client.persistJoinTable(joinTableData);
View Full Code Here

        final String schemaName = "KunderaTests";
        final String tableName = "PERSON_ADDRESS";
        final String joinColumn = "PERSON_ID";
        final String inverseJoinColumn = "ADDRESS_ID";

        JoinTableData joinTableData = new JoinTableData(OPERATION.INSERT, schemaName, tableName, joinColumn,
                inverseJoinColumn, PersonOTOOracleNoSQL.class);

        String joinKey1 = "JK1";
        Integer joinKey2 = new Integer(2);

        Integer inverseJoinKey1 = new Integer(1);
        Double inverseJoinKey2 = new Double(2.2);
        String inverseJoinKey3 = "IJK3";

        Set inverseJoinKeysFor1 = new HashSet();
        inverseJoinKeysFor1.add(inverseJoinKey1);
        inverseJoinKeysFor1.add(inverseJoinKey2);

        Set inverseJoinKeysFor2 = new HashSet();
        inverseJoinKeysFor2.add(inverseJoinKey2);
        inverseJoinKeysFor2.add(inverseJoinKey3);

        joinTableData.addJoinTableRecord(joinKey1, inverseJoinKeysFor1);
        joinTableData.addJoinTableRecord(joinKey2, inverseJoinKeysFor2);

        EntityManager em = emf.createEntityManager();
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        OracleNoSQLClient client = (OracleNoSQLClient) clients.get(PU);
        client.persistJoinTable(joinTableData);
View Full Code Here

TOP

Related Classes of com.impetus.kundera.persistence.context.jointable.JoinTableData

Copyright © 2018 www.massapicom. 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.