public abstract class ContentHolderForOutput extends ContentHolder
Adaptation
,
that corresponds to a table record,
into a JSON response body.
The generated JSON format can be customized by using the
ExtendedOutput
annotation.
Modifier and Type | Method and Description |
---|---|
ContentHolderForInput |
asContentHolderForInput()
Unwraps this
ContentHolder to get a ContentHolderForInput
if it has been instantiated as so. |
static ContentHolderForOutput |
createForRecord(Adaptation aRecord)
Returns a new
ContentHolderForOutput instance. |
boolean |
isForInput()
Returns
true if this content holder is for input, false otherwise. |
get, get, getBoolean, getDate, getInt, getList, getString
public final boolean isForInput()
ContentHolder
true
if this content holder is for input, false
otherwise.isForInput
in class ContentHolder
ContentHolder.isForInput()
public final ContentHolderForInput asContentHolderForInput()
ContentHolder
ContentHolder
to get a ContentHolderForInput
if it has been instantiated as so.asContentHolderForInput
in class ContentHolder
ContentHolderForInput
.ContentHolder.asContentHolderForInput()
public static ContentHolderForOutput createForRecord(Adaptation aRecord)
ContentHolderForOutput
instance.aRecord
- the table record to serialize into the JSON response body.IllegalArgumentException
- if the provided Adaptation
is null
or is not a table record.