Store the DeviceType in the Device entity

(so that we can later recreate a GBDevice from a Device)
This commit is contained in:
cpfeiffer
2016-08-17 00:34:19 +02:00
parent e0c52c7da5
commit 26d490ffd6
3 changed files with 29 additions and 5 deletions
@@ -112,6 +112,7 @@ public class GBDaoGenerator {
device.addStringProperty("name").notNull();
device.addStringProperty("manufacturer").notNull();
device.addStringProperty("identifier").notNull().unique().javaDocGetterAndSetter("The fixed identifier, i.e. MAC address of the device.");
device.addIntProperty("type").notNull().javaDocGetterAndSetter("The DeviceType key, i.e. the GBDevice's type.");
Property deviceId = deviceAttributes.addLongProperty("deviceId").notNull().getProperty();
// sorted by the from-date, newest first
Property deviceAttributesSortProperty = getPropertyByName(deviceAttributes, VALID_FROM_UTC);