I want to use Hibernate to map a class to a database. The class contains values from different sensors. It is important that the class may be changed at runtime(new sensor added...). Changes of the variables are estimated to be quite rare. Can I use Hibernate in this case?
I thought about using a Hashmap with String Keys representing the Column Header and the Sensorname. The mapped value would be the current Double sensor value.
An example table could look like this:
Table Station1
-----------------------------------------------------
+ Timestamp + Sensor1 + Sensor2 + Sensor3 +
-----------------------------------------------------
+ 2012-10-10 12:12:12 + 12.1212 + 23.2323 + 34.3434 +
+ 2012-10-10 12:12:13 + 12.1213 + 23.2323 + 54.3434 +
-----------------------------------------------------
I would be happy if someone could give me feedback if its possible and maybe some directions for me to search further.
java.util.ArrayList<YourClass>and add to the List instead? The software can read from the List and display its output from additional sensors