Interface Convertible<T extends RowEntity>

  • All Known Implementing Classes:
    UserCredentialsConverter

    public interface Convertible<T extends RowEntity>
    Interface for all converters of data from other servers. In principle it makes a query to database, process each row creating an object of RowEntity and then insets it to Tigase repository
    • Method Detail

      • getMainQuery

        Optional<String> getMainQuery()
        Principal query used to retrieve data from source repository. It's used to determine if implementation offers support for particular combination of source XMPP Server and database type (empty Optional indicates lack of support resulting in skipping implementation).
      • initialise

        void initialise​(Converter.ConverterProperties properties)
        Method is responsible for initialising converter based on ConverterProperties.
        Parameters:
        properties - various properties allowing determine appropriate set of queries and applied processing.
      • storeEntity

        boolean storeEntity​(T entity)
                     throws Exception
        Method stores RowEntity in the destination repositories.
        Parameters:
        entity - RowEntity to be stored
        Returns:
        value indicating if storing was successful
        Throws:
        Exception - indicates any problem with storing of the RowEntity
      • getAdditionalQueriesToInitialise

        default Map<String,​String> getAdditionalQueriesToInitialise()
        Method allows providing additional queries that needs to be initialised in DataRepository for future use
        Returns:
        Map with key-value pair of query ID and actual query to be initialised