Package com.sap.cds

Interface Row

  • All Superinterfaces:
    CdsData, JSONizable, Map<String,​Object>

    public interface Row
    extends CdsData
    Represents a single result data set of the CdsDataStore. It can be accessed as a Map or, via the as method, in a typed way by an accessor interface. Moreover, it can be serialized to JSON.
    • Method Detail

      • as

        <T> T as​(Class<T> type)
        Returns this Row mapped to the given type.
        Type Parameters:
        T - the return type
        Parameters:
        type - the type this Row is mapped to
        Returns:
        this Row mapped to type T
      • ref

        StructuredType<?> ref()
        Returns a reference to the entity this row originates from.
        Returns:
        the entity reference
        Throws:
        CdsException - if this row does not reference an entity
      • to

        default StructuredType<?> to​(String path)
        Returns a reference from the entity this row originates from along the given path.
        Parameters:
        path - a path of association names separated by '.'
        Returns:
        the entity reference
        Throws:
        CdsException - if this row does not reference an entity