source: ether_statistics/web/src/json/serializers/ParameterJsonSerializer.java @ 569

Last change on this file since 569 was 569, checked in by vmipsl, 12 years ago

Nouveau projet

File size: 802 bytes
Line 
1package json.serializers;
2
3import com.medias.database.objects.Parametre;
4import net.sf.json.JSONObject;
5import net.sf.json.JsonConfig;
6
7public class ParameterJsonSerializer
8        extends AbstractJsonSerializer<Parametre>
9{
10    public JSONObject process( final Parametre parameter, final JsonConfig jsonConfig )
11    {
12        final JSONObject result = new JSONObject();
13
14        serialize( result, "id", parameter.getParametreId(), jsonConfig );
15        serialize( result, "name", parameter.getParametreNom(), jsonConfig );
16        serialize( result, "code", parameter.getParametreCode(), jsonConfig );
17        if( null != parameter.getCategorieParam() )
18            serialize( result, "categoryName", parameter.getCategorieParam().getCategorieParamNom(), jsonConfig );
19
20        return result;
21    }
22}
Note: See TracBrowser for help on using the repository browser.