com.gisgraphy.domain.repository

## Interface IDatabaseHelper

- All Known Implementing Classes:
    DatabaseHelper

      public interface IDatabaseHelper

  Interface that describe useful function to manage the database
  Author:
    David Masclet

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createNormalize_textFunction()` create a postgres function in postgres to remove accent, lower cased, trim, and remove unwanted char (, . ; ")
    `void` | `dropNormalize_textFunction()` Drop the Normalize_text function in postgres
    `List<String>` | `execute(File file, boolean continueOnError)`
    `void` | `generateSqlCreationSchemaFile(File outputFile)` Generate the sql file to create all the Gisgraphy tables
    `void` | `generateSQLCreationSchemaFileToRerunImport(File outputFile)` Generate the SQL file to create all the Gisgraphy tables that have to be reset to rerun the import, the user and role tables won't be deleted
    `void` | `generateSQLDropSchemaFile(File outputFile)` Generate the sql file to drop all the Gisgraphy tables
    `void` | `generateSqlDropSchemaFileToRerunImport(File outputFile)` Generate the SQL file to drop all the Gisgraphy tables that have to be reset to rerun the import, the user and role tables won't be deleted
    `boolean` | `isNormalize_textFunctionCreated()` Determines if the normalize_text function is created in postgres

- - ### Method Detail

    - #### dropNormalize_textFunction

          void dropNormalize_textFunction()

      Drop the Normalize_text function in postgres

    - #### isNormalize_textFunctionCreated

          boolean isNormalize_textFunctionCreated()

      Determines if the normalize_text function is created in postgres
      Returns:
        true if the call to that function does not throw exception and return a the correct result

    - #### createNormalize_textFunction

          void createNormalize_textFunction()

      create a postgres function in postgres to remove accent, lower cased, trim, and remove unwanted char (, . ; ")

    - #### execute

          List<String> execute(File file,
                             boolean continueOnError)
                               throws Exception

      Parameters:
        `file` - the file to execute, it will be read as an UTF-8 file
        `continueOnError` - if an error occured, the process will go on if this value is true, if not it will throw an exception
      Returns:
        A list of String with errorMessage
      Throws:
        `Exception` - in case of error during execution, or if the file is null or does not exist

    - #### generateSqlCreationSchemaFile

          void generateSqlCreationSchemaFile(File outputFile)

      Generate the sql file to create all the Gisgraphy tables
      Parameters:
        `outputFile` - The File that we want to write the SQL

    - #### generateSQLDropSchemaFile

          void generateSQLDropSchemaFile(File outputFile)

      Generate the sql file to drop all the Gisgraphy tables
      Parameters:
        `outputFile` - The File that we want to write the SQL

    - #### generateSQLCreationSchemaFileToRerunImport

          void generateSQLCreationSchemaFileToRerunImport(File outputFile)

      Generate the SQL file to create all the Gisgraphy tables that have to be reset to rerun the import, the user and role tables won't be deleted
      Parameters:
        `outputFile` - The File that we want to write the SQL

    - #### generateSqlDropSchemaFileToRerunImport

          void generateSqlDropSchemaFileToRerunImport(File outputFile)

      Generate the SQL file to drop all the Gisgraphy tables that have to be reset to rerun the import, the user and role tables won't be deleted
      Parameters:
        `outputFile` - The File that we want to write the SQL

Copyright © 2015. All rights reserved.