Examples of forTranscoding()


Examples of info.archinnov.achilles.internal.metadata.holder.EntityMeta.forTranscoding()

        EntityMeta entityMeta = entityMetaMap.get(entityClass);

        Validator.validateFalse(entityMeta.structure().isClusteredEntity(), "Index query is not supported for clustered entity. Please use typed query/native query");
        Validator.validateNotNull(indexCondition, "Index condition should not be null");

        entityMeta.forTranscoding().encodeIndexConditionValue(indexCondition);

        String indexColumnName = indexCondition.getColumnName();
        final EntityMetaConfig metaConfig = entityMeta.config();
        final Select.Where statement = select().from(metaConfig.getKeyspaceName(), metaConfig.getTableName()).where(eq(indexColumnName, bindMarker(indexColumnName)));
        return this.typedQueryInternal(entityClass, statement, indexCondition.getColumnValue());
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forTranscoding()

    }

    private Object[] extractValuesForSimpleCounterBinding(EntityMeta entityMeta, PropertyMeta pm, Object primaryKey) {
        PropertyMeta idMeta = entityMeta.getIdMeta();
        String fqcn = entityMeta.getClassName();
        String primaryKeyAsString = idMeta.forTranscoding().forceEncodeToJSONForCounter(primaryKey);
        String cql3ColumnName = pm.getCQL3ColumnName();

        return new Object[] { fqcn, primaryKeyAsString, cql3ColumnName };
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forTranscoding()

        when(overrider.getWriteLevel(context)).thenReturn(ALL);
        when(entityMeta.forOperations().getPrimaryKey(entity)).thenReturn(primaryKey);
        when(idMeta.structure().isEmbeddedId()).thenReturn(false);
        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);
        when(nameMeta.forTranscoding().getAndEncodeValueForCassandra(entity)).thenReturn(name);
        when(ageMeta.forTranscoding().getAndEncodeValueForCassandra(entity)).thenReturn(age);

        when(context.getSerialConsistencyLevel()).thenReturn(fromNullable(ConsistencyLevel.LOCAL_SERIAL));

        when(ps.bind(Matchers.anyVararg())).thenReturn(bs);
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forTranscoding()

        when(overrider.getWriteLevel(context)).thenReturn(ALL);
        when(entityMeta.forOperations().getPrimaryKey(entity)).thenReturn(primaryKey);
        when(idMeta.structure().isEmbeddedId()).thenReturn(false);
        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);
        when(nameMeta.forTranscoding().getAndEncodeValueForCassandra(entity)).thenReturn(name);
        when(ageMeta.forTranscoding().getAndEncodeValueForCassandra(entity)).thenReturn(null);

        when(ps.bind(Matchers.anyVararg())).thenReturn(bs);

        BoundStatementWrapper actual = binder.bindForInsert(context, ps, asList(nameMeta, ageMeta));
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forTranscoding()

        when(overrider.getWriteLevel(context)).thenReturn(ALL);
        when(entityMeta.forOperations().getPrimaryKey(entity)).thenReturn(primaryKey);
        when(idMeta.structure().isEmbeddedId()).thenReturn(true);
        when(idMeta.forTranscoding().encodeToComponents(primaryKey, false)).thenReturn(Arrays.<Object>asList(userId, name));
        when(addressMeta.forTranscoding().getAndEncodeValueForCassandra(entity)).thenReturn(address);
        when(ageMeta.forTranscoding().getAndEncodeValueForCassandra(entity)).thenReturn(age);

        when(ps.bind(Matchers.anyVararg())).thenReturn(bs);

        BoundStatementWrapper actual = binder.bindForInsert(context, ps, asList(addressMeta, ageMeta));
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forTranscoding()

        when(idMeta.structure().isEmbeddedId()).thenReturn(false);
        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);
        when(nameMeta.structure().isStaticColumn()).thenReturn(false);
        when(ageMeta.structure().isStaticColumn()).thenReturn(false);
        when(nameMeta.forTranscoding().getAndEncodeValueForCassandra(entity)).thenReturn(name);
        when(ageMeta.forTranscoding().getAndEncodeValueForCassandra(entity)).thenReturn(age);

        when(ps.bind(Matchers.anyVararg())).thenReturn(bs);

        BoundStatementWrapper actual = binder.bindForUpdate(context, ps, asList(nameMeta, ageMeta));
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.