mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 12:26:48 +01:00
ID115: generate entities for activity samples
This commit is contained in:
parent
14dc3ad9c5
commit
4ee1e6cfca
@ -70,6 +70,7 @@ public class GBDaoGenerator {
|
|||||||
addNo1F1ActivitySample(schema, user, device);
|
addNo1F1ActivitySample(schema, user, device);
|
||||||
addXWatchActivitySample(schema, user, device);
|
addXWatchActivitySample(schema, user, device);
|
||||||
addZeTimeActivitySample(schema, user, device);
|
addZeTimeActivitySample(schema, user, device);
|
||||||
|
addID115ActivitySample(schema, user, device);
|
||||||
|
|
||||||
addCalendarSyncState(schema, device);
|
addCalendarSyncState(schema, device);
|
||||||
|
|
||||||
@ -301,6 +302,18 @@ public class GBDaoGenerator {
|
|||||||
return activitySample;
|
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) {
|
private static void addCommonActivitySampleProperties(String superClass, Entity activitySample, Entity user, Entity device) {
|
||||||
activitySample.setSuperclass(superClass);
|
activitySample.setSuperclass(superClass);
|
||||||
activitySample.addImport(MAIN_PACKAGE + ".devices.SampleProvider");
|
activitySample.addImport(MAIN_PACKAGE + ".devices.SampleProvider");
|
||||||
|
Loading…
Reference in New Issue
Block a user