Last change
on this file since 475 was
475,
checked in by vmipsl, 12 years ago
|
BO insertion données _ move files
|
File size:
722 bytes
|
Line | |
---|
1 | package json.serializers; |
---|
2 | |
---|
3 | import com.medias.database.objects.Jeu; |
---|
4 | import net.sf.json.JSONObject; |
---|
5 | import net.sf.json.JsonConfig; |
---|
6 | |
---|
7 | public class JeuJsonSerializer |
---|
8 | extends AbstractJsonSerializer<Jeu> |
---|
9 | { |
---|
10 | public JSONObject process( final Jeu jeu, final JsonConfig jsonConfig ) |
---|
11 | { |
---|
12 | final JSONObject result = new JSONObject(); |
---|
13 | |
---|
14 | serialize( result, "id", jeu.getJeuId(), jsonConfig ); |
---|
15 | serialize( result, "name", jeu.getJeuNom(), jsonConfig ); |
---|
16 | serialize( result, "creationDate", jeu.getJeuDateinser(), jsonConfig ); |
---|
17 | if( null != jeu.getCategorie() ) |
---|
18 | serialize( result, "categoryName", jeu.getCategorie().getCategorieNom(), jsonConfig ); |
---|
19 | |
---|
20 | return result; |
---|
21 | } |
---|
22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.