Projection Class
Item Index
Methods
attr
-
caption -
[options]
Define plain attribute in projection.
Parameters:
Returns:
Projection attribute.
belongsTo
-
modelName -
caption -
attributes -
[options]
Define belongsTo relationship attribute in projection.
Parameters:
Returns:
Projection attribute.
create
-
modelName -
attributes -
projectionName
Creates model projection.
Parameters:
Returns:
Model projection.
getBatchResponses
-
response -
boundary
Returns an array of batch responses from the body of the HTTP response.
Returns:
An array of batch responses.
getResponseHeader
-
header -
response
Parameters:
Returns:
The content of the header.
getResponseMeta
-
contentTypeHeader
Returns the type and boundary from the Content-Type header.
Parameters:
-
contentTypeHeaderStringThe content of
Content-Typeheader.
Returns:
Object with contentType and boundary properties.
hasMany
-
modelName -
caption -
attributes -
[options]
Define hasMany relationship attribute in projection.
Parameters:
Returns:
Projection attribute.
parseBatchResponse
-
response
Parses a batch response depending on its type.
The returned object always contains the contentType property.
Depending on the type of response it may contain the following additional properties:
response- for responses withapplication/httpcontent type.changesets- for responses withmultipart/mixedcontent type.
Parameters:
-
responseStringThe batch response.
Returns:
The object with the response description.
parseResponse
-
response
Parameters:
-
responseStringThe string with the response content.
Returns:
Object with meta and body properties.
Flexberry Documentation