Interface EdmxFlavourMapper

All Known Implementing Classes:
NoopEdmxFlavourMapper, V4EdmxFlavourMapper

public interface EdmxFlavourMapper
Maps data which is in an EDMX-defined structure to CSN-defined structure and vice versa.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Describes the EDMX flavour used together with Universal CSN.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(EdmxFlavourMapper.EdmxFlavour flavour, boolean toCsn)
     
    remap(String element, com.sap.cds.reflect.CdsStructuredType type)
    Remaps a simple element name of a given structured type
    default <T extends Map<String, Object>>
    T
    remap(T entry, com.sap.cds.reflect.CdsStructuredType entryType)
    Remaps a data map of a given structured type
    <T extends Iterable<? extends Map<String, Object>>>
    T
    remap(T entries, com.sap.cds.reflect.CdsStructuredType entryType, Function<String,Boolean> isExpanded)
    Remaps an Iterable of data maps of a given structured type
  • Method Details

    • create

      static EdmxFlavourMapper create(EdmxFlavourMapper.EdmxFlavour flavour, boolean toCsn)
    • remap

      String remap(String element, com.sap.cds.reflect.CdsStructuredType type)
      Remaps a simple element name of a given structured type
      Parameters:
      element - the element name
      type - the structured type
      Returns:
      the mapped element name
    • remap

      default <T extends Map<String, Object>> T remap(T entry, com.sap.cds.reflect.CdsStructuredType entryType)
      Remaps a data map of a given structured type
      Type Parameters:
      T - the map type
      Parameters:
      entry - the data map
      entryType - the structured type of the entry
      Returns:
      the mapped data map
    • remap

      default <T extends Iterable<? extends Map<String, Object>>> T remap(T entries, com.sap.cds.reflect.CdsStructuredType entryType)
      Remaps an Iterable of data maps of a given structured type
      Type Parameters:
      T - the Iterable type
      Parameters:
      entries - an Iterable of data maps
      entryType - the structured type of the entries
      Returns:
      the mapped Iterable of data maps
    • remap

      <T extends Iterable<? extends Map<String, Object>>> T remap(T entries, com.sap.cds.reflect.CdsStructuredType entryType, Function<String,Boolean> isExpanded)
      Remaps an Iterable of data maps of a given structured type
      Type Parameters:
      T - the Iterable type
      Parameters:
      entries - an Iterable of data maps
      entryType - the structured type of the entries
      isExpanded - a function to determine if the given path is expanded
      Returns:
      the mapped Iterable of data maps