Search in sources :

Example 6 with Item

use of br.com.caelum.example.model.Item in project restfulie-java by caelum.

the class ItemsController method show.

@Get
@Path("/items/{id}")
public void show(int id) {
    Item item = database.get(id);
    result.use(representation()).from(item).serialize();
}
Also used : Item(br.com.caelum.example.model.Item) Path(br.com.caelum.vraptor.Path) Get(br.com.caelum.vraptor.Get)

Aggregations

Item (br.com.caelum.example.model.Item)6 Response (br.com.caelum.restfulie.Response)5 Test (org.junit.Test)5 Basket (br.com.caelum.example.model.Basket)1 Payment (br.com.caelum.example.model.Payment)1 Get (br.com.caelum.vraptor.Get)1 Path (br.com.caelum.vraptor.Path)1