Examples of ReturnType


Examples of org.apache.olingo.odata2.api.edm.provider.ReturnType

      if (FUNCTION_IMPORT_1.equals(name)) {
        final List<FunctionImportParameter> parameters = new ArrayList<FunctionImportParameter>();
        parameters.add(new FunctionImportParameter().setName("q").setType(EdmSimpleTypeKind.String)
            .setFacets(new Facets().setNullable(true)));
        return new FunctionImport().setName(name)
            .setReturnType(new ReturnType().setTypeName(ENTITY_TYPE_1_1).setMultiplicity(EdmMultiplicity.MANY))
            .setEntitySet(ENTITY_SET_1_1)
            .setHttpMethod("GET")
            .setParameters(parameters);

      } else if (FUNCTION_IMPORT_2.equals(name)) {
        return new FunctionImport().setName(name)
            .setReturnType(new ReturnType().setTypeName(COMPLEX_TYPE_1).setMultiplicity(EdmMultiplicity.MANY))
            .setHttpMethod("GET");

      } else if (FUNCTION_IMPORT_3.equals(name)) {
        return new FunctionImport().setName(name)
            .setReturnType(
                new ReturnType().setTypeName(EdmSimpleTypeKind.String.getFullQualifiedName()).setMultiplicity(
                    EdmMultiplicity.MANY))
            .setHttpMethod("GET");

      } else if (FUNCTION_IMPORT_4.equals(name)) {
        return new FunctionImport().setName(name)
            .setReturnType(
                new ReturnType().setTypeName(EdmSimpleTypeKind.Int16.getFullQualifiedName()).setMultiplicity(
                    EdmMultiplicity.ONE))
            .setHttpMethod("GET");

      } else if (FUNCTION_IMPORT_5.equals(name)) {
        return new FunctionImport().setName(name)
            .setReturnType(new ReturnType().setTypeName(COMPLEX_TYPE_1).setMultiplicity(EdmMultiplicity.ONE))
            .setHttpMethod("GET");

      } else if (FUNCTION_IMPORT_6.equals(name)) {
        final List<FunctionImportParameter> parameters = new ArrayList<FunctionImportParameter>();
        parameters.add(new FunctionImportParameter().setName("Id").setType(EdmSimpleTypeKind.String)
            .setFacets(new Facets().setNullable(false)));
        return new FunctionImport().setName(name)
            .setReturnType(
                new ReturnType().setTypeName(EdmSimpleTypeKind.Binary.getFullQualifiedName()).setMultiplicity(
                    EdmMultiplicity.ONE))
            .setHttpMethod("GET")
            .setParameters(parameters);

      } else if (FUNCTION_IMPORT_7.equals(name)) {
        return new FunctionImport().setName(name)
            .setReturnType(
                new ReturnType().setTypeName(new FullQualifiedName(NAMESPACE_1, "Employee")).setMultiplicity(
                    EdmMultiplicity.ZERO_TO_ONE))
            .setEntitySet(ENTITY_SET_1_1)
            .setHttpMethod("GET");

      }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.provider.ReturnType

    edmEntityContainer = new EdmEntityContainerImplProv(edmImplProv, containerInfo);

    EntitySet fooEntitySet = new EntitySet().setName("fooEntitySet");
    when(edmProvider.getEntitySet("Container", "fooEntitySet")).thenReturn(fooEntitySet);

    ReturnType fooReturnType =
        new ReturnType().setTypeName(EdmSimpleTypeKind.String.getFullQualifiedName()).setMultiplicity(
            EdmMultiplicity.ONE);

    List<FunctionImportParameter> parameters = new ArrayList<FunctionImportParameter>();
    FunctionImportParameter parameter =
        new FunctionImportParameter().setName("fooParameter1").setType(EdmSimpleTypeKind.String);
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.provider.ReturnType

    return functionImport.getHttpMethod();
  }

  @Override
  public EdmTyped getReturnType() throws EdmException {
    final ReturnType returnType = functionImport.getReturnType();
    return new EdmTypedImplProv(edm, functionImport.getName(), returnType.getTypeName(), returnType.getMultiplicity());
  }
View Full Code Here

Examples of org.fusesource.ide.commons.util.ReturnType

    return name;
  }

  public static Class<?> getPropertyType(IPropertyDescriptor descriptor) {
    if (descriptor instanceof ReturnType) {
      ReturnType rt = (ReturnType) descriptor;
      return rt.getReturnType();
    } else if (descriptor instanceof TextPropertyDescriptor) {
      return String.class;
    } else {
      Activator.getLogger().debug("Unknown property type for " + descriptor + " of class: "
          + descriptor.getClass().getName() + " " + descriptor.getId());
View Full Code Here

Examples of org.openbel.framework.common.enums.ReturnType

                kamNodeCriteria.setInclude(criteria.isIsInclude());

                final List<FunctionReturnType> functionReturnTypes =
                        criteria.getValueSet();
                for (final FunctionReturnType functionReturnType : functionReturnTypes) {
                    final ReturnType kamNodeReturnType =
                            convert(functionReturnType);
                    kamNodeCriteria.add(kamNodeReturnType);
                }

                kamNodeFilter.add(kamNodeCriteria);
View Full Code Here

Examples of org.openbel.framework.common.enums.ReturnType

     *
     * @param s String
     * @return boolean
     */
    private boolean validReturnType(final String s) {
        ReturnType rt = ReturnType.getReturnType(s);
        if (rt != null) return true;
        return false;
    }
View Full Code Here

Examples of org.openbel.framework.common.enums.ReturnType

            final String[] tokens2 = PARAMS_REGEX.split(arg2);
            if (tokens2.length != 2)
                return INVALID_RETURN_TYPE_ARGUMENT;

            final ReturnType re1 = ReturnType.getReturnType(tokens1[1]);
            final ReturnType re2 = ReturnType.getReturnType(tokens2[1]);

            if (re1 != re2 && !re1.isAssignableFrom(re2))
                return INVALID_RETURN_TYPE_ARGUMENT;
            return VALID;
        }
View Full Code Here

Examples of org.rococoa.ReturnType

            }
        }
    }

    private Class<?> returnTypeFor(final Method method) {
        ReturnType annotation = method.getAnnotation(ReturnType.class);
        if (annotation == null) {
            return method.getReturnType();
        }
        else {
            return annotation.value();
        }
    }
View Full Code Here

Examples of org.rococoa.ReturnType

            }
        }
    }

    private Class<?> returnTypeFor(final Method method) {
        ReturnType annotation = method.getAnnotation(ReturnType.class);
        if (annotation == null)
            return method.getReturnType();
        else
            return annotation.value();
    }
View Full Code Here

Examples of org.springframework.data.redis.connection.ReturnType

  public <T> T execute(final RedisScript<T> script, final RedisSerializer<?> argsSerializer,
      final RedisSerializer<T> resultSerializer, final List<K> keys, final Object... args) {
    return template.execute(new RedisCallback<T>() {
      public T doInRedis(RedisConnection connection) throws DataAccessException {
        final ReturnType returnType = ReturnType.fromJavaType(script.getResultType());
        final byte[][] keysAndArgs = keysAndArgs(argsSerializer, keys, args);
        final int keySize = keys != null ? keys.size() : 0;
        if (connection.isPipelined() || connection.isQueueing()) {
          // We could script load first and then do evalsha to ensure sha is present,
          // but this adds a sha1 to exec/closePipeline results. Instead, just eval
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.