Package com.linkedin.data.template

Examples of com.linkedin.data.template.FieldDef


    RecordDataSchema actionReturnRecordDataSchema;
    FieldDef<?> returnFieldDef;
    if (actionReturnType != Void.TYPE)
    {
      @SuppressWarnings({"unchecked","rawtypes"})
      FieldDef<?> nonVoidFieldDef = new FieldDef(ActionResponse.VALUE_NAME,
                                 actionReturnType,
                                 DataTemplateUtil.getSchema(actionReturnType));
      returnFieldDef = nonVoidFieldDef;
      actionReturnRecordDataSchema = DynamicRecordMetadata.buildSchema(actionName,
                                                                       Collections.singleton(returnFieldDef));
View Full Code Here


    RecordDataSchema actionReturnRecordDataSchema;
    FieldDef<?> returnFieldDef;
    if(returnClass != Void.TYPE)
    {
      @SuppressWarnings({"unchecked", "rawtypes"})
      FieldDef<?> nonVoidFieldDef = new FieldDef(ActionResponse.VALUE_NAME, returnClass, getDataSchema(returnClass, returnTyperefSchema));
      returnFieldDef = nonVoidFieldDef;
      actionReturnRecordDataSchema = DynamicRecordMetadata.buildSchema(ActionResponse.class.getName(), Collections.singleton((returnFieldDef)));
    }
    else
    {
View Full Code Here

    {
      for(ParameterSchema parameterSchema : action.getParameters())
      {
        DataSchema dataSchema = RestSpecCodec.textToSchema(parameterSchema.getType(), _schemaResolver);
        Class<?> paramClass = toType(dataSchema);
        FieldDef<?> fieldDef = new FieldDef(parameterSchema.getName(),
                                                           paramClass,
                                                           dataSchema);
        fieldDefs.add(fieldDef);
      }
    }

    Collection<FieldDef<?>> response;
    if(action.hasReturns())
    {
      DataSchema returnType = RestSpecCodec.textToSchema(action.getReturns(), _schemaResolver);
      Class<?> returnClass = toType(returnType);
      response = Collections.<FieldDef<?>>singletonList(new FieldDef("value", returnClass, returnType));
    }
    else
    {
      response = Collections.emptyList();
    }
View Full Code Here

TOP

Related Classes of com.linkedin.data.template.FieldDef

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.