Package info.archinnov.achilles.exception

Examples of info.archinnov.achilles.exception.AchillesException


                Class<?> componentClass = componentClasses.get(index);
                rawValue = getRowMethod(componentClass).invoke(row, cql3ComponentNames.get(index));
                rawValues.set(index, rawValue);
            }
        } catch (Exception e) {
            throw new AchillesException(format("Cannot retrieve compound primary key for entity class '%s' from CQL Row", meta.getEntityClassName()), e);
        }
        return rawValues;
    }
View Full Code Here


        log.trace("Extract property {} from CQL3 row for entity class {}", cql3ColumnName, entityClassName);
        try {
            Object rawValue = getRowMethod(meta.getCql3ValueClass()).invoke(row, cql3ColumnName);
            return meta.forTranscoding().decodeFromCassandra(rawValue);
        } catch (Exception e) {
            throw new AchillesException(String.format("Cannot retrieve property '%s' for entity class '%S' from CQL Row", cql3ColumnName, entityClassName), e);
        }
    }
View Full Code Here

        try {
            List<?> rawValues = row.getList(cql3ColumnName, toCompatibleJavaType(meta.getCql3ValueClass()));
            return meta.forTranscoding().decodeFromCassandra(rawValues);

        } catch (Exception e) {
            throw new AchillesException(String.format("Cannot retrieve list property '%s' for entity class '%S' from CQL Row", cql3ColumnName, entityClassName), e);

        }
    }
View Full Code Here

        try {
            Set<?> rawValues = row.getSet(cql3ColumnName, toCompatibleJavaType(meta.getCql3ValueClass()));
            return meta.forTranscoding().decodeFromCassandra(rawValues);

        } catch (Exception e) {
            throw new AchillesException(String.format("Cannot retrieve set property '%s' for entity class '%S' from CQL Row", cql3ColumnName, entityClassName), e);
        }
    }
View Full Code Here

        try {
            Map<?, ?> rawValues = row.getMap(cql3ColumnName, toCompatibleJavaType(meta.getCql3KeyClass()),toCompatibleJavaType(meta.getCql3ValueClass()));
            return meta.forTranscoding().decodeFromCassandra(rawValues);

        } catch (Exception e) {
            throw new AchillesException(String.format("Cannot retrieve map property '%s' for entity class '%S' from CQL Row", cql3ColumnName, entityClassName), e);
        }
    }
View Full Code Here

        if (enableBeanValidation) {
            try {
                javax.validation.Validator defaultValidator = buildDefaultValidatorFactory().getValidator();
                return configurationMap.getTypedOr(BEAN_VALIDATION_VALIDATOR, defaultValidator);
            } catch (ValidationException vex) {
                throw new AchillesException("Cannot bootstrap ValidatorFactory for Bean Validation (JSR 303)", vex);
            }
        }
        return null;
    }
View Full Code Here

                break;
            case REMOVE_FROM_LIST_AT_INDEX:
                updateClauseAndBoundValues = changeSet.generateUpdateForRemovedAtIndexElement(conditions);
                break;
            default:
                throw new AchillesException(String.format("Should not generate non-prepared statement for collection/map change of type '%s'", operationType));
        }

        final Pair<Update.Where, Object[]> whereClauseAndBoundValues = meta.getIdMeta().forStatementGeneration().generateWhereClauseForUpdate(entity, changeSet.getPropertyMeta(), updateClauseAndBoundValues.left);
        boundValues = addAll(addAll(boundValues, addAll(updateClauseAndBoundValues.right, whereClauseAndBoundValues.right)), casEncodedValues.toArray());
        return Pair.create(whereClauseAndBoundValues.left, boundValues);
View Full Code Here

public class Validator {
    private static ObjectInstantiator instantiator = new ObjectInstantiator();

    public static void validateNotBlank(String arg, String message, Object... args) {
        if (StringUtils.isBlank(arg)) {
            throw new AchillesException(format(message, args));
        }
    }
View Full Code Here

        }
    }

    public static void validateNotNull(Object arg, String message, Object... args) {
        if (arg == null) {
            throw new AchillesException(format(message, args));
        }
    }
View Full Code Here

        }
    }

    public static void validateNotEmpty(Object[] arg, String message, Object... args) {
        if (arg == null || arg.length== 0) {
            throw new AchillesException(format(message, args));
        }
    }
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.exception.AchillesException

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.