Examples of TyperefDataSchema


Examples of com.linkedin.data.schema.TyperefDataSchema

      if (!(fieldSchema instanceof TyperefDataSchema))
      {
        continue;
      }

      final TyperefDataSchema fieldTyperefSchema = (TyperefDataSchema) field.getType();
      final Object fieldValue = value.get(field.getName());
      final Object rebuildValue = SchemaSampleDataGenerator.buildData(fieldTyperefSchema.getDereferencedDataSchema(),
                                                                      _spec);
      Assert.assertSame(fieldValue.getClass(), rebuildValue.getClass());
    }
  }
View Full Code Here

Examples of com.linkedin.data.schema.TyperefDataSchema

    Class<? extends T> keyBindingClass = key.getType();
    Object result;

    if (TyperefInfo.class.isAssignableFrom(key.getType()))
    {
      TyperefDataSchema schema = (TyperefDataSchema)key.getSchema();
      DataSchema.Type dereferencedType = schema.getDereferencedType();
      if (!schema.getDereferencedDataSchema().isPrimitive())
      {
        throw new IllegalArgumentException("Compound key type must dereference to a primitive type.");
      }
      keyBindingClass = (Class<? extends T>)TyperefUtils.getJavaClassForSchema(schema);
      if(keyBindingClass == null)
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.