Package com.linkedin.data

Examples of com.linkedin.data.DataMap.containsKey()


  private static void generateClassAnnotations(JDefinedClass clazz, RecordTemplate schema)
  {
    if(schema.data().containsKey("annotations"))
    {
      DataMap annotations = schema.data().getDataMap("annotations");
      if(annotations.containsKey(ResourceModelEncoder.DEPRECATED_ANNOTATION_NAME))
      {
        clazz.annotate(Deprecated.class);

        DataMap deprecated = annotations.getDataMap(ResourceModelEncoder.DEPRECATED_ANNOTATION_NAME);
        if(deprecated.containsKey(ResourceModelEncoder.DEPRECATED_ANNOTATION_DOC_FIELD))
View Full Code Here


      if(annotations.containsKey(ResourceModelEncoder.DEPRECATED_ANNOTATION_NAME))
      {
        clazz.annotate(Deprecated.class);

        DataMap deprecated = annotations.getDataMap(ResourceModelEncoder.DEPRECATED_ANNOTATION_NAME);
        if(deprecated.containsKey(ResourceModelEncoder.DEPRECATED_ANNOTATION_DOC_FIELD))
        {
          clazz.javadoc().addDeprecated().append(deprecated.getString(ResourceModelEncoder.DEPRECATED_ANNOTATION_DOC_FIELD));
        }
      }
    }
View Full Code Here

  {
    StringBuilder docString = new StringBuilder();
    if(schema.data().containsKey("annotations"))
    {
      DataMap annotations = schema.data().getDataMap("annotations");
      if(annotations.containsKey("testMethod"))
      {
        DataMap testMethod = annotations.getDataMap("testMethod");
        docString.append("<b>Test Method");

        String testMethodDoc = testMethod.getString("doc");
View Full Code Here

    }

    if(schema.data().containsKey("annotations"))
    {
      DataMap annotations = schema.data().getDataMap("annotations");
      if(annotations.containsKey(ResourceModelEncoder.DEPRECATED_ANNOTATION_NAME))
      {
        method.annotate(Deprecated.class);

        DataMap deprecated = annotations.getDataMap(ResourceModelEncoder.DEPRECATED_ANNOTATION_NAME);
        if(deprecated.containsKey(ResourceModelEncoder.DEPRECATED_ANNOTATION_DOC_FIELD))
View Full Code Here

      if(annotations.containsKey(ResourceModelEncoder.DEPRECATED_ANNOTATION_NAME))
      {
        method.annotate(Deprecated.class);

        DataMap deprecated = annotations.getDataMap(ResourceModelEncoder.DEPRECATED_ANNOTATION_NAME);
        if(deprecated.containsKey(ResourceModelEncoder.DEPRECATED_ANNOTATION_DOC_FIELD))
        {
          method.javadoc().addDeprecated().append(deprecated.getString(ResourceModelEncoder.DEPRECATED_ANNOTATION_DOC_FIELD));
        }
      }
    }
View Full Code Here

        RequiredMode requiredMode = _options.getRequiredMode();
        if (requiredMode != RequiredMode.IGNORE)
        {
          for (RecordDataSchema.Field field : schema.getFields())
          {
            if (field.getOptional() == false && map.containsKey(field.getName()) == false)
            {
              switch (requiredMode)
              {
                case MUST_BE_PRESENT:
                  addIsRequiredMessage(
View Full Code Here

    Object[] arguments = new Object[parameters.size()];
    int i = 0;
    for (Parameter<?> param : parameters)
    {
      Object value;
      if (!data.containsKey(param.getName()))
      {
        if (param.isOptional() && param.hasDefaultValue())
        {
          value = param.getDefaultValue();
        }
View Full Code Here

              // for unions and primitives, we never embed the pegasus schema
              if (embedSchemaMode == EmbedSchemaMode.NONE && hasEmbeddedSchema(schema))
              {
                // make sure no embedded schema when
                DataMap resultAvroDataMap = TestUtil.dataMapFromString(avroTextFromSchema);
                assertFalse(resultAvroDataMap.containsKey(SchemaTranslator.DATA_PROPERTY));
              }
              assertEquals(avroTextFromSchema, expectedAvroText);
            }

            String postTranslateSchemaText = schema.toString();
View Full Code Here

    for (RecordDataSchema.Field f : key.schema().getFields())
    {
      DataSchema.Type type = f.getType().getType();
      String fieldName = f.getName();

      if (type == DataSchema.Type.ARRAY && dataMap.containsKey(fieldName))
      {
        Object arrayFieldValue = dataMap.get(fieldName);

        if (!(arrayFieldValue instanceof DataList))
        {
View Full Code Here

    else
    {
      return;
    }

    if (methodsContainer.containsKey(METHODS_KEY))
    {
      return;
    }

    final DataList methods = new DataList();
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.