Examples of prepareColumnOrColumnValues()


Examples of com.impetus.client.cassandra.thrift.CQLTranslator.prepareColumnOrColumnValues()

        UserTimeLine key = new UserTimeLine("mevivs", 1, timeLineId);
        PrimeUser user = new PrimeUser(key);
        user.setTweetBody("my first tweet");
        user.setTweetDate(currentDate);
        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(((EntityManagerFactoryImpl)emf).getKunderaMetadataInstance(), PrimeUser.class);
        Map<String, StringBuilder> translatedSql = translator
                .prepareColumnOrColumnValues(user, entityMetadata, TranslationType.VALUE, null, ((EntityManagerFactoryImpl)emf).getKunderaMetadataInstance()).get(
                        TranslationType.VALUE);
        String columnAsCsv = "'mevivs',1," + timeLineId /*+ ",'my first tweet','" + currentDate.getTime() + */ /*+ "'"*/;
       
        Assert.assertTrue(StringUtils.contains(translatedSql.get(entityMetadata.getTableName()).toString(), columnAsCsv));
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.prepareColumnOrColumnValues()

        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);
        CassandraPrimeUser user = new CassandraPrimeUser(key);
        user.setTweetBody("my first tweet");
        user.setTweetDate(currentDate);
        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(((EntityManagerFactoryImpl)emf).getKunderaMetadataInstance(), CassandraPrimeUser.class);
        Map<String, StringBuilder> translatedSql = translator
                .prepareColumnOrColumnValues(user, entityMetadata, TranslationType.VALUE, null, ((EntityManagerFactoryImpl)emf).getKunderaMetadataInstance()).get(
                        TranslationType.VALUE);
        String columnAsCsv = "'mevivs',1," + timeLineId /*+ ",'my first tweet','" + currentDate.getTime() + */ /*+ "'"*/;
       
        Assert.assertTrue(StringUtils.contains(translatedSql.get(entityMetadata.getTableName()).toString(), columnAsCsv));
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.prepareColumnOrColumnValues()

    protected List<String> createInsertQuery(EntityMetadata entityMetadata, Object entity,
        Cassandra.Client cassandra_client, List<RelationHolder> rlHolders, Object ttlColumns) {
        List<String> insert_Queries = new ArrayList<String>();
        CQLTranslator translator = new CQLTranslator();
        HashMap<TranslationType, Map<String, StringBuilder>> translation =
            translator.prepareColumnOrColumnValues(entity, entityMetadata, TranslationType.ALL, externalProperties,
                kunderaMetadata);

        Map<String, StringBuilder> columnNamesMap = translation.get(TranslationType.COLUMN);
        Map<String, StringBuilder> columnValuesMap = translation.get(TranslationType.VALUE);
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.