From 4ee1e6cfca4d1086a85873f3fe9c1f4ba812faa6 Mon Sep 17 00:00:00 2001 From: Vadim Kaushan Date: Sun, 29 Jul 2018 19:49:45 +0300 Subject: [PATCH] ID115: generate entities for activity samples --- .../gadgetbridge/daogen/GBDaoGenerator.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java b/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java index 8aed0d76e..4ef0d8a1b 100644 --- a/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java +++ b/GBDaoGenerator/src/nodomain/freeyourgadget/gadgetbridge/daogen/GBDaoGenerator.java @@ -70,6 +70,7 @@ public class GBDaoGenerator { addNo1F1ActivitySample(schema, user, device); addXWatchActivitySample(schema, user, device); addZeTimeActivitySample(schema, user, device); + addID115ActivitySample(schema, user, device); addCalendarSyncState(schema, device); @@ -301,6 +302,18 @@ public class GBDaoGenerator { return activitySample; } + private static Entity addID115ActivitySample(Schema schema, Entity user, Entity device) { + Entity activitySample = addEntity(schema, "ID115ActivitySample"); + activitySample.implementsSerializable(); + addCommonActivitySampleProperties("AbstractActivitySample", activitySample, user, device); + activitySample.addIntProperty(SAMPLE_STEPS).notNull().codeBeforeGetterAndSetter(OVERRIDE); + activitySample.addIntProperty(SAMPLE_RAW_KIND).notNull().codeBeforeGetterAndSetter(OVERRIDE); + activitySample.addIntProperty("caloriesBurnt"); + activitySample.addIntProperty("distanceMeters"); + activitySample.addIntProperty("activeTimeMinutes"); + return activitySample; + } + private static void addCommonActivitySampleProperties(String superClass, Entity activitySample, Entity user, Entity device) { activitySample.setSuperclass(superClass); activitySample.addImport(MAIN_PACKAGE + ".devices.SampleProvider");