Class ObservationsRepository


  • public class ObservationsRepository
    extends Object
    • Constructor Detail

      • ObservationsRepository

        public ObservationsRepository()
    • Method Detail

      • checkObservationsTableExists

        public static boolean checkObservationsTableExists​(int layerId)
                                                    throws SQLException
        Throws:
        SQLException
      • getObservationsByTimeRange

        public static List<Observation> getObservationsByTimeRange​(int layerId,
                                                                   int gfid,
                                                                   String fromDate,
                                                                   String toDate)
                                                            throws SQLException
        Group all observations for a gfid by distinct speciesId and academic name in the given time range and sum their occurrences.
        Parameters:
        layerId -
        gfid -
        fromDate -
        toDate -
        Returns:
        Throws:
        SQLException
      • getObservationsByYears

        public static List<Observation> getObservationsByYears​(int layerId,
                                                               int gfid)
                                                        throws SQLException
        Group all observations for a gfid by distinct species id, academic name and available years and sum their occurrences.
        Parameters:
        layerId -
        gfid -
        Returns:
        Throws:
        SQLException
      • createObservationsTable

        public static void createObservationsTable​(int layerId)
                                            throws SQLException
        Throws:
        SQLException