My orderRequest entity has the following attributes:
Long id (long)
Long orderRequestStatusId
String detail
Calendar purchaseOrderDate
String purchaseOrderNumber
String requestorName
String subject
OrderRequestStatus orderRequestStatus
Note that orderRequest.orderRequestStatus is OrderRequestStatus type
Calling the entity get request response I got:
{"orderRequest":
{"detail":"asdasdasd"
,"id":"1"
,"orderRequestStatusId":"1"
,"purchaseOrderDate":"2013-05-28T00:00:00-05:00"
,"purchaseOrderNumber":"sdasasd"
,"requestorName":"sdasasd"
,"subject":"asdasdasd"}
}
Adding the set and get method in the entity class:
public OrderRequestStatus getOrderRequestStatus() {
return orderRequestStatus;
}
public void setOrderRequestStatus(OrderRequestStatus orderRequestStatus) {
this.orderRequestStatus = orderRequestStatus;
}
The get request response now has the orderRequestStatus attribute :
{"orderRequest":
{"detail":"asdasdasd"
,"id":"1"
,"orderRequestStatus":
{"id":"1"
,"name":"registrada solicitud de pedido"}
,"orderRequestStatusId":"1"
,"purchaseOrderDate":"2013-05-28T00:00:00-05:00"
,"purchaseOrderNumber":"sdasasd"
,"requestorName":"sdasasd"
,"subject":"asdasdasd"}
}
Long id (long)
Long orderRequestStatusId
String detail
Calendar purchaseOrderDate
String purchaseOrderNumber
String requestorName
String subject
OrderRequestStatus orderRequestStatus
Note that orderRequest.orderRequestStatus is OrderRequestStatus type
Calling the entity get request response I got:
{"orderRequest":
{"detail":"asdasdasd"
,"id":"1"
,"orderRequestStatusId":"1"
,"purchaseOrderDate":"2013-05-28T00:00:00-05:00"
,"purchaseOrderNumber":"sdasasd"
,"requestorName":"sdasasd"
,"subject":"asdasdasd"}
}
Adding the set and get method in the entity class:
public OrderRequestStatus getOrderRequestStatus() {
return orderRequestStatus;
}
public void setOrderRequestStatus(OrderRequestStatus orderRequestStatus) {
this.orderRequestStatus = orderRequestStatus;
}
The get request response now has the orderRequestStatus attribute :
{"orderRequest":
{"detail":"asdasdasd"
,"id":"1"
,"orderRequestStatus":
{"id":"1"
,"name":"registrada solicitud de pedido"}
,"orderRequestStatusId":"1"
,"purchaseOrderDate":"2013-05-28T00:00:00-05:00"
,"purchaseOrderNumber":"sdasasd"
,"requestorName":"sdasasd"
,"subject":"asdasdasd"}
}
No comments:
Post a Comment