25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 12 ■ Exposing a REST API<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

select d.documentId, d.name, d.location, d.description as doc_desc,<br />

d.typeId, d.created, d.modified,<br />

t.name as type_name, t.description as type_desc, t.extension from<br />

documents d<br />

join types t<br />

on d.typeId = t.typeId<br />

<br />

<br />

<br />

<br />

select d.documentId, d.name, d.location, d.description as doc_desc,<br />

d.typeId, d.created, d.modified,<br />

t.name as type_name, t.description as type_desc, t.extension from<br />

documents d<br />

join types t<br />

on d.typeId = t.typeId<br />

where d.documentId = ?<br />

<br />

<br />

<br />

<br />

insert into documents (documentId,name,location,description, typeId, created, modified)<br />

values (?,?,?,?,?,?,?)<br />

<br />

<br />

<br />

<br />

update documents set name = ?, location = ?, description = ?, typeId = ?,modified = ?<br />

where documentId = ?<br />

<br />

<br />

<br />

<br />

delete from documents<br />

where documentId = ?<br />

<br />

<br />

<br />

<br />

<br />

<br />

176

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!