count
Hosts
@Query(value = ""SELECT COUNT(*) 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",
nativeQuery = true
)
Query used to count the hosts number
Return
the number of the hosts as long
Parameters
keywords
The keywords used as filters
statuses
The statuses of the hosts to count