Class GeoPackageDao<T,​ID>

    • Constructor Detail

      • GeoPackageDao

        public GeoPackageDao​(ConnectionSource connectionSource,
                             Class<T> dataClass)
                      throws SQLException
        Constructor, required by ORMLite
        Parameters:
        connectionSource - connection source
        dataClass - data class
        Throws:
        SQLException - upon failure
    • Method Detail

      • isTableOrView

        public boolean isTableOrView()
        Check if the DAO is backed by a table or a view
        Returns:
        true if a table or view exists
      • isTable

        public boolean isTable()
        Check if the DAO is backed by a table
        Returns:
        true if a table exists
      • isView

        public boolean isView()
        Check if the DAO is backed by a view
        Returns:
        true if a view exists
      • verifyExists

        public void verifyExists()
        Verify the DAO is backed by a table or view
        Since:
        4.0.0
      • setDatabase

        public void setDatabase​(GeoPackageCoreConnection db)
        Set the database
        Parameters:
        db - database connection
      • dropTable

        public void dropTable​(String table)
        Drop the table
        Parameters:
        table - table name
      • tableExists

        public boolean tableExists​(String tableName)
        Check if the table exists
        Parameters:
        tableName - table name
        Returns:
        true if exists
      • viewExists

        public boolean viewExists​(String viewName)
        Check if the view exists
        Parameters:
        viewName - view name
        Returns:
        true if exists
      • tableOrViewExists

        public boolean tableOrViewExists​(String name)
        Check if a table or view exists with the name
        Parameters:
        name - table or view name
        Returns:
        true if exists
      • createDao

        public <D extends GeoPackageDao<O,​?>,​O> D createDao​(Class<O> clazz)
        Create a GeoPackage DAO
        Type Parameters:
        D - DAO type
        O - DAO object type
        Parameters:
        clazz - DAO class type
        Returns:
        GeoPackage DAO
      • createDao

        public static <D extends GeoPackageDao<O,​?>,​O> D createDao​(GeoPackageCoreConnection db,
                                                                               Class<O> clazz)
        Create a GeoPackage DAO
        Type Parameters:
        D - DAO type
        O - DAO object type
        Parameters:
        db - database connection
        clazz - DAO class type
        Returns:
        GeoPackage DAO