Exemple #1
0
 public Analysis(
     org.revenj.postgres.PostgresReader reader,
     int context,
     org.revenj.postgres.ObjectConverter.Reader<Analysis>[] readers)
     throws java.io.IOException {
   this.__locator = reader.getLocator();
   for (org.revenj.postgres.ObjectConverter.Reader<Analysis> rdr : readers) {
     rdr.read(this, reader, context);
   }
   URI = gen.model.stock.converters.AnalysisConverter.buildURI(reader, this);
   this.__originalValue = (Analysis) this.clone();
 }
Exemple #2
0
  static {
    gen.model.stock.repositories.AnalysisRepository.__setupPersist(
        (aggregates, arg) -> {
          try {
            for (gen.model.stock.Analysis agg : aggregates) {

              agg.URI = gen.model.stock.converters.AnalysisConverter.buildURI(arg.getKey(), agg);
            }
          } catch (Exception ex) {
            throw new RuntimeException(ex);
          }
        },
        (aggregates, arg) -> {
          try {
            java.util.List<gen.model.stock.Analysis> oldAggregates = aggregates.getKey();
            java.util.List<gen.model.stock.Analysis> newAggregates = aggregates.getValue();
            for (int i = 0; i < newAggregates.size(); i++) {
              gen.model.stock.Analysis oldAgg = oldAggregates.get(i);
              gen.model.stock.Analysis newAgg = newAggregates.get(i);

              newAgg.URI =
                  gen.model.stock.converters.AnalysisConverter.buildURI(arg.getKey(), newAgg);
            }
          } catch (Exception ex) {
            throw new RuntimeException(ex);
          }
        },
        aggregates -> {
          for (gen.model.stock.Analysis agg : aggregates) {}
        },
        agg -> {
          Analysis _res = agg.__originalValue;
          agg.__originalValue = (Analysis) agg.clone();
          if (_res != null) {
            return _res;
          }
          return null;
        });
  }