-
Notifications
You must be signed in to change notification settings - Fork 2
Rest
tylertreat edited this page Jan 17, 2013
·
1 revision
The Rest
annotation is used to indicate the name of a endpoint name-value field an entity class's field is mapped to for a RESTful web service. To put it more plainly, this is the name of the field in a web service form that is used in HTTP POST requests. It has a single attribute, value, which represents the form field name. If the annotation is not provided, the field is mapped to a endpoint field with the same name as itself.
The example below shows how the field mBar
is mapped to the endpoint field named my_field
.
public class Foo {
@Rest("my_field")
private int mBar;
}