Class V4EdmxFlavourMapper
java.lang.Object
com.sap.cds.adapter.odata.v4.utils.mapper.V4EdmxFlavourMapper
- All Implemented Interfaces:
EdmxFlavourMapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sap.cds.adapter.odata.v4.utils.mapper.EdmxFlavourMapper
EdmxFlavourMapper.EdmxFlavour, EdmxFlavourMapper.Mapping
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionStream<com.sap.cds.adapter.odata.v4.utils.mapper.V4EdmxFlavourMapper.MappingV4>
createMappings
(com.sap.cds.reflect.CdsStructuredType type) A stream ofEdmxFlavourMapper.Mapping
instances for each element of aCdsStructuredType
.Remaps a simple element name of a given structured typeremap
(T entries, com.sap.cds.reflect.CdsStructuredType entryType, Function<String, Boolean> isExpanded) Remaps an Iterable of data maps of a given structured typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sap.cds.adapter.odata.v4.utils.mapper.EdmxFlavourMapper
remap
-
Constructor Details
-
V4EdmxFlavourMapper
public V4EdmxFlavourMapper(boolean toCsn) - Parameters:
toCsn
- true, if data should be mapped from EDMX to CSN structure, false if vice versa.
-
-
Method Details
-
remap
Description copied from interface:EdmxFlavourMapper
Remaps a simple element name of a given structured type- Specified by:
remap
in interfaceEdmxFlavourMapper
- Parameters:
element
- the element nametype
- the structured type- Returns:
- the mapped element name
-
remap
public <T extends Iterable<? extends Map<String,Object>>> T remap(T entries, com.sap.cds.reflect.CdsStructuredType entryType, Function<String, Boolean> isExpanded) Description copied from interface:EdmxFlavourMapper
Remaps an Iterable of data maps of a given structured type- Specified by:
remap
in interfaceEdmxFlavourMapper
- Type Parameters:
T
- the Iterable type- Parameters:
entries
- an Iterable of data mapsentryType
- the structured type of the entriesisExpanded
- a function to determine if the given path is expanded- Returns:
- the mapped Iterable of data maps
-
createMappings
public Stream<com.sap.cds.adapter.odata.v4.utils.mapper.V4EdmxFlavourMapper.MappingV4> createMappings(com.sap.cds.reflect.CdsStructuredType type) Description copied from interface:EdmxFlavourMapper
A stream ofEdmxFlavourMapper.Mapping
instances for each element of aCdsStructuredType
.- Specified by:
createMappings
in interfaceEdmxFlavourMapper
- Parameters:
type
- theCdsStructuredType
- Returns:
- the stream of all
EdmxFlavourMapper.Mapping
instances
-