get Hosts

@Query(value = "SELECT * FROM " + HOSTS_KEY + _WHERE_ + "( " + "MATCH(" + NAME_KEY + "," + HOST_ADDRESS_KEY + ") AGAINST (:" + KEYWORDS_KEY + _IN_BOOLEAN_MODE + ") " + "OR :" + KEYWORDS_KEY + " = ''" + ") " + "AND " + STATUS_KEY + " IN (:" + STATUSES_KEY + ") " + "AND " + SESSION_IDENTIFIER_KEY + "=:" + SESSION_IDENTIFIER_KEY + " ORDER BY " + INSERTION_DATE_KEY + " DESC", nativeQuery = true )
abstract fun getHosts(@Param(value = "session_id") sessionId: String, @Param(value = "keywords") keywords: String, @Param(value = "statuses") statuses: List<String>, pageable: Pageable): List<BrownieHost>

Query used to retrieve the hosts

Return

the list of the hosts as List of BrownieHost

Parameters

keywords

The keywords used as filters

statuses

The statuses of the hosts to count

pageable

The parameters to paginate the query