package de.philipphager.disclosure.database.app.model;

import com.google.auto.value.AutoValue;

@AutoValue public abstract class AppReport implements AppModel.ReportModel {
  public static final AppModel.ReportMapper MAPPER = new AppModel.ReportMapper((App, libraryCount, permissionCount) -> create(App, libraryCount, permissionCount), App.FACTORY);

  public static AppReport create(AppModel app, long libraryCount, long permissionCount) {
    //TODO: Fix whe
    return new AutoValue_AppReport((App) app, libraryCount, permissionCount);
  }

  public abstract App App();

  public abstract long libraryCount();

  public abstract long permissionCount();

  public boolean librariesDetected() {
    return libraryCount() > 0;
  }

  public boolean wasAnalyzed() {
    return App().analyzedAt() != null;
  }
}

@@ -534,24 +534,269 @@
 ount);%0A  %7D%0A%0A
+  /**%0A   * SqlDelight 0.6.0 alias bug in projection.%0A   * Tracked in Github issue 592.%0A   * Rename to lower case method name if fixed!%0A   * https://github.com/square/sqldelight/issues/592%0A   */%0A  @SuppressWarnings(%22PMD.MethodNamingConventions%22)%0A
   public abs

Document uppercase method name bug