Package org.apache.cassandra.db.marshal

Examples of org.apache.cassandra.db.marshal.ListType


        }

        if (!(column.type instanceof ListType))
            throw new InvalidRequestException(String.format("Invalid operation, %s is not of list type", column.name));

        ListType lt = (ListType)column.type;
        if (kind == Kind.SET_IDX)
        {
            assert values.size() == 2;
            Term idx = values.get(0);
            Term value = values.get(1);
View Full Code Here


                        true);
                Object valueClassInstance = valueValidationClass.getDeclaredField("instance").get(null);

                if (((Field) attribute.getJavaMember()).getType().isAssignableFrom(List.class))
                {
                    ListType listType = ListType.getInstance((AbstractType) valueClassInstance);
                    outputCollection = new ArrayList();
                    outputCollection.addAll((Collection) listType.compose(valueByteBuffer));
                }

                else if (((Field) attribute.getJavaMember()).getType().isAssignableFrom(Set.class))
                {
                    SetType setType = SetType.getInstance((AbstractType) valueClassInstance);
View Full Code Here

            Object valueClassInstance;
            try
            {
                valueClassInstance = valueValidationClass.getDeclaredField("instance").get(null);
                ListType listType = ListType.getInstance((AbstractType) valueClassInstance);
                return listType.decompose((List) value).array();
            }
            catch (NoSuchFieldException e)
            {
                log.error("Error while retrieving field{} value via CQL, Caused by: .", clazz.getSimpleName(), e);
                throw new PersistenceException(e);
View Full Code Here

                    mapGenericClassses, true);
            Object valueClassInstance;
            try
            {
                valueClassInstance = valueValidationClass.getDeclaredField("instance").get(null);
                ListType listType = ListType.getInstance((AbstractType) valueClassInstance);
                Collection outputCollection = new ArrayList();
                outputCollection.addAll((Collection) listType.compose(buf));
                return marshalCollection(valueValidationClass, outputCollection, mapGenericClassses,
                        outputCollection.getClass());
            }
            catch (NoSuchFieldException e)
            {
View Full Code Here

TOP

Related Classes of org.apache.cassandra.db.marshal.ListType

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.