Package com.sap.cds

Class Struct

java.lang.Object
com.sap.cds.Struct

public final class Struct extends Object
Struct provides static helper methods to access data given as Map via an accessor interface.
  • Method Details

    • create

      public static <T> T create(Class<T> type)
      Creates a data container for the given accessor interface.
      Type Parameters:
      T - the return type
      Parameters:
      type - the accessor interface
      Returns:
      a typed data container
    • access

      public static Struct.MapViewFactory access(Map<String,Object> data)
      Provides typed access on the given data map.
      Parameters:
      data - the data map to access
      Returns:
      a factory, that provides typed access on the underlying data
    • stream

      public static Struct.IterableViewFactory stream(Iterable<? extends Map<String,Object>> data)
      Provides typed stream access on the given data maps.
      Parameters:
      data - the data maps to be streamed
      Returns:
      a factory, that provides typed access on the underlying data