Examples of ListType


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

                        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

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

            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

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

                    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

Examples of org.chromattic.core.ListType

  public JCRPropertyListPropertyMapper(MultiValuedPropertyInfo<SimpleValueInfo> info, String jcrPropertyName) {
    super(info);

    //
    ListType listType;
    if (info instanceof ArrayPropertyInfo) {
      listType = ListType.ARRAY;
    } else if (info instanceof ListPropertyInfo) {
      listType = ListType.LIST;
    } else {
View Full Code Here

Examples of org.destecs.tools.jprotocolgenerator.ast.ListType

      if (structs.containsKey(key))
      {
        ITypeNode t = ((MapType) p1.type).valueType;
        if (t.getName().contains(Object.class.getSimpleName()))
        {
          t = new ListType(new Type(Object.class));
        }

        MapType mapt = ((MapType) p1.type);
        if (mapt.valueType instanceof ListType)
        {
View Full Code Here

Examples of org.destecs.tools.jprotocolgenerator.ast.ListType

          newRet.implemented.add(stryctInterface);
          returnClass.imports.add(new Type(Vector.class));

          defs.addAll(generateStructs(newRet, packageName2, (MapType) ((ListType) type).type, isParameter));
          defs.add(newRet);
          f.type = new ListType(newRet);
          m.body += f.type.getName() + " tmp" + count
              + " = new Vector<" + newRet.getName()
              + ">();\n\t\t";

          m.body += "if( value.keySet().contains(\"" + f.getName()
View Full Code Here

Examples of org.destecs.tools.jprotocolgenerator.ast.ListType

    }

    sb.append(rangeType);
    sb.append(">");

    return new ListType(rangeType);// sb.toString();
  }
View Full Code Here

Examples of org.exolab.castor.xml.schema.simpletypes.ListType

                                           baseType.getName()) );
                return null;
            }
            */
            try {
                result= new ListType(schema);
            }
            catch(SchemaException sx) {
                sendToLog( Messages.format("schema.deriveByListError",
                                           internalName,
                                           baseType.getName()) );
View Full Code Here

Examples of org.exolab.castor.xml.schema.simpletypes.ListType

    {
        Type type= getType(builtInTypeName);

       //If the type is derived by list, return a new ListType.
        String derivation= type.getDerivedBy();
        ListType resultList = null;
        if ( (derivation != null) && (derivation.equals(SchemaNames.LIST)) ) {
            try {
                resultList = new ListType(schema);
            }
            catch(SchemaException sx) {
                //-- This should not happen...but who knows!
                throw new SimpleTypesFactoryException(sx);
            }
        }

        //Finds the primitive ancestor (defines the class that represents it)
        Class implClass= null;
        while (type != null) {
            if (type.getImplClass() != null) {
                implClass= type.getImplClass();
                break;
            }
            type= getType(type.getBase());
        }

        if (implClass == null) return null;

        SimpleType result;
        if (implClass.isAssignableFrom(UrType.class)) {
                try {
                     result = (UrType)implClass.newInstance();
                     result.setSchema(schema);
                }
                catch (Exception e) {
                    throw new SimpleTypesFactoryException(e);
                }
        }
        else {
             try {
                 result = (AtomicType)implClass.newInstance();
                 result.setSchema(schema);
             }
             catch (Exception except) {
                 except.printStackTrace();
                 result= null;
             }
             if (resultList != null) {
                  resultList.setItemType(result);
                  return resultList;
             }
        }
        return result;
    } //-- createInstance
View Full Code Here

Examples of org.exolab.castor.xml.schema.simpletypes.ListType

            final AttributeSet atts)
    throws XMLException {
        super(schemaContext);
       
        _schema = schema;
        _list = new ListType(schema);

        //-- itemType
        String itemTypeName = atts.getValue(SchemaNames.ITEM_TYPE_ATTR);
        if ((itemTypeName != null) && (itemTypeName.length() > 0)) {
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.