org.apache.olingo.commons.api.edm.provider

## Class CsdlMapping

- java.lang.Object
- - org.apache.olingo.commons.api.edm.provider.CsdlMapping

- All Implemented Interfaces:
    EdmMapping

      public class CsdlMapping
      extends Object
      implements EdmMapping

  Content of this class does not appear within the CSDL metadata document. This class is used to perform server internal mapping for edm primitive types to java types.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CsdlMapping()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getInternalName()` Returns the internal name for this mapped object.
    `Class<?>` | `getMappedJavaClass()` The class which is returned here will be used to during deserialization to replace the default java class for a primitive type.
    `CsdlMapping` | `setInternalName(String internalName)` Sets the internal name for this mapped object.
    `CsdlMapping` | `setMappedJavaClass(Class<?> mappedJavaClass)` Sets the class to be used during deserialization to transform an EDM primitive type into this java class.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CsdlMapping

          public CsdlMapping()

  - ### Method Detail

    - #### setInternalName

          public CsdlMapping setInternalName(String internalName)

      Sets the internal name for this mapped object. This name won`t be used by the Olingo library but can be used by applications to access their database easier.
      Parameters:
        `internalName` -
      Returns:
        this for method chaining

    - #### setMappedJavaClass

          public CsdlMapping setMappedJavaClass(Class<?> mappedJavaClass)

      Sets the class to be used during deserialization to transform an EDM primitive type into this java class. To see which classes work for which primitive type refer to `EdmPrimitiveType`.
      Parameters:
        `mappedJavaClass` - class to which is mapped
      Returns:
        this for method chaining

    - #### getMappedJavaClass

          public Class<?> getMappedJavaClass()

      Description copied from interface: `EdmMapping`
      The class which is returned here will be used to during deserialization to replace the default java class for a primitive type.
      Specified by:
        `getMappedJavaClass` in interface `EdmMapping`
      Returns:
        class used during deserialization

    - #### getInternalName

          public String getInternalName()

      Description copied from interface: `EdmMapping`
      Returns the internal name for this mapped object. This name won`t be used by the Olingo library but can be used by applications to access their database easier.
      Specified by:
        `getInternalName` in interface `EdmMapping`
      Returns:
        the internal name of this mapped object

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.