Examples of AssocKeySchemaArray


Examples of com.linkedin.restli.restspec.AssocKeySchemaArray

  }

  private void appendKeys(final AssociationSchema associationSchema,
                          final ResourceModel collectionModel)
  {
    AssocKeySchemaArray assocKeySchemaArray = new AssocKeySchemaArray();
    List<Key> sortedKeys = new ArrayList<Key>(collectionModel.getKeys());
    Collections.sort(sortedKeys, new Comparator<Key>()
    {
      @Override
      public int compare(final Key o1, final Key o2)
      {
        return o1.getName().compareTo(o2.getName());
      }
    });

    for (Key key : sortedKeys)
    {
      AssocKeySchema assocKeySchema = new AssocKeySchema();
      assocKeySchema.setName(key.getName());
      assocKeySchema.setType(buildDataSchemaType(key.getType(), key.getDataSchema()));
      assocKeySchemaArray.add(assocKeySchema);
    }

    associationSchema.setAssocKeys(assocKeySchemaArray);

    associationSchema.setIdentifier(collectionModel.getKeyName());
View Full Code Here

Examples of com.linkedin.restli.restspec.AssocKeySchemaArray

    if(association.getEntity().hasActions())
    {
      entityActions = association.getEntity().getActions();
    }
    String schema = resourceSchema.getSchema();
    AssocKeySchemaArray assocKeys = association.getAssocKeys();

    Map<String, CompoundKey.TypeInfo> keyParts = new HashMap<String, CompoundKey.TypeInfo>();
    for (AssocKeySchema assocKey : assocKeys)
    {
      TypeSpec<?> type = toTypeSpec(RestSpecCodec.textToSchema(assocKey.getType(), _schemaResolver));
View Full Code Here

Examples of com.linkedin.restli.restspec.AssocKeySchemaArray

    prevAssocKey.setType("string");

    final Collection<CompatibilityInfo> testErrors = new HashSet<CompatibilityInfo>();
    testErrors.add(new CompatibilityInfo(Arrays.<Object>asList("", "association", "assocKeys"),
                                         CompatibilityInfo.Type.ARRAY_NOT_EQUAL,
                                         new AssocKeySchemaArray(Arrays.asList(prevAssocKey))));
    testErrors.add(new CompatibilityInfo(Arrays.<Object>asList("", "association", "supports"),
                                         CompatibilityInfo.Type.ARRAY_NOT_CONTAIN,
                                         new StringArray(Arrays.asList("create", "get"))));
    testErrors.add(new CompatibilityInfo(Arrays.<Object>asList("", "association", "methods", "create", "parameters"),
                                         CompatibilityInfo.Type.PARAMETER_NEW_REQUIRED, "data"));
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.