Package info.archinnov.achilles.internal.persistence.operations

Examples of info.archinnov.achilles.internal.persistence.operations.CollectionAndMapChangeType


        if (timestampO.isPresent()) {
            conditions.using(timestamp(timestampO.get()));
            boundValues = addAll(boundValues, new Object[] { timestampO.get() });
        }

        final CollectionAndMapChangeType operationType = changeSet.getChangeType();

        Pair<Assignments, Object[]> updateClauseAndBoundValues;
        switch (operationType) {
            case SET_TO_LIST_AT_INDEX:
                updateClauseAndBoundValues = changeSet.generateUpdateForSetAtIndexElement(conditions);
View Full Code Here


        log.trace("Bind prepared statement {} for collection/map update of entity {}", ps.getQueryString(), entity);

        ConsistencyLevel consistencyLevel = overrider.getWriteLevel(context);

        List<Object> values = new ArrayList<>();
        final CollectionAndMapChangeType changeType = changeSet.getChangeType();

        values.addAll(fetchTTLAndTimestampValues(context));

        switch (changeType) {
            case ASSIGN_VALUE_TO_LIST:
View Full Code Here

    }

    public PreparedStatement getCacheForCollectionAndMapOperation(Session session, Cache<StatementCacheKey,
            PreparedStatement> dynamicPSCache, PersistentStateHolder context, PropertyMeta pm, DirtyCheckChangeSet changeSet) {
        final Class<Object> entityClass = context.getEntityClass();
        CollectionAndMapChangeType changeType = changeSet.getChangeType();
        log.trace("Get cache for operation {} on entity class {} and property {}", changeType.name(),
                entityClass, pm.getPropertyName());

        StatementCacheKey cacheKey = new StatementCacheKey(changeType.cacheType(), Sets.newHashSet(pm.getPropertyName()), entityClass, context.getOptions());

        PreparedStatement ps = dynamicPSCache.getIfPresent(cacheKey);
        if (ps == null) {
            ps = generator.prepareCollectionAndMapUpdate(session, context.getEntityMeta(), changeSet, context.getOptions());
            dynamicPSCache.put(cacheKey, ps);
View Full Code Here

            for (CASCondition CASCondition : options.getCASConditions()) {
                conditions.and(CASCondition.toClauseForPreparedStatement());
            }
        }

        CollectionAndMapChangeType changeType = changeSet.getChangeType();
        Assignments assignments = null;
        switch (changeType) {
            case ASSIGN_VALUE_TO_LIST:
            case ASSIGN_VALUE_TO_SET:
            case ASSIGN_VALUE_TO_MAP:
View Full Code Here

        context.pushStatement(bsWrapper);
    }

    public void pushCollectionAndMapUpdateStatement(DaoOperations context, DirtyCheckChangeSet changeSet) {

        final CollectionAndMapChangeType changeType = changeSet.getChangeType();
        final PropertyMeta propertyMeta = changeSet.getPropertyMeta();

        if (log.isDebugEnabled()) {
            log.debug("Push update statement for PersistenceContext '{}' and collection/map property '{}' for change type '{}'", context, propertyMeta, changeType);
        }
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.internal.persistence.operations.CollectionAndMapChangeType

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.