@POST
	@Path("{id}")
	@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
	public Response editSensorById(
			@PathParam("id") int id,
			@FormParam("unity") String unity,
			@FormParam("name") String name,
			@FormParam("statementFrequency") long statementFrequency,
			@FormParam("samplingFrenquency") long samplingFrequency ) {
		Sensor sensor = sensorDao.getOne(id);
		if(sensor != null){
			if(!unity.equals("-1") && !unity.equals(sensor.getUnity())) sensor.setUnity(unity);
			if(!name.equals("-1") && !name.equals(sensor.getName())) sensor.setName(name);
			if(samplingFrequency != -1 && samplingFrequency != sensor.getSamplingFrequency()) sensor.setSamplingFrequency(samplingFrequency);
			if(statementFrequency != -1 && statementFrequency != sensor.getStatementFrequency()) sensor.setStatementFrequency(statementFrequency);

			sensorDao.update(sensor);
			return Response.status(Response.Status.OK).entity("Data saved : " + sensor).build();
		}
		return Response.status(Response.Status.BAD_REQUEST).entity("Data saved : " + sensor).build();
	}