@Override
 public List<Account> searchUsers(String username) {
   return create()
       .select(ACCOUNT.fields())
       .from(ACCOUNT)
       .join(CREDENTIAL)
       .on(CREDENTIAL.ACCOUNT_ID.eq(ACCOUNT.ID))
       .where(
           ACCOUNT
               .STATE
               .eq(CommonStatesConstants.ACTIVE)
               .and(CREDENTIAL.STATE.eq(CommonStatesConstants.ACTIVE))
               .and(CREDENTIAL.PUBLIC_VALUE.contains(username))
               .and(CREDENTIAL.KIND.eq(CredentialConstants.KIND_PASSWORD)))
       .orderBy(ACCOUNT.ID.asc())
       .fetchInto(Account.class);
 }