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 theCdsDataStore
. It can be accessed as aMap
or, via theas
method, in a typed way by an accessor interface. Moreover, it can be serialized to JSON.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> T
as(Class<T> type)
Returns thisRow
mapped to the giventype
.StructuredType<?>
ref()
Returns a reference to the entity this row originates from.default StructuredType<?>
to(String path)
Returns a reference from the entity this row originates from along the given path.-
Methods inherited from interface com.sap.cds.CdsData
containsPath, forRemoval, forRemoval, get, getPath, getPathOrDefault, isForRemoval, putPath, putPathIfAbsent, removePath
-
Methods inherited from interface com.sap.cds.JSONizable
toJson
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
as
<T> T as(Class<T> type)
Returns thisRow
mapped to the giventype
.- Type Parameters:
T
- the return type- Parameters:
type
- the type thisRow
is mapped to- Returns:
- this
Row
mapped to typeT
-
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
-
-