Good morning all,

As I am learning/evaluating jOOQ I'm wondering whether the approach below
for creating pojos out of routine calls is 'acceptable' when using jOOQ or
whether you have better alternatives...

I want to hide the jOOQ layer from the layers above.

public UsersRepositoryImpl() throws SQLException {
    context = Connection.getDslContext();
    searchUsers = new SearchPublic();

@Override
public List<User> findAll() {
    searchUsers.execute(context.configuration());
    Result<Record> searchResults = searchUsers.getORefList();
    for (Record r : searchResults) {
        User user = new User();
        user.setId(((BigInteger) r.getValue(PER_ID)).longValue());
        user.setFullName((String) r.getValue(FULLNAME));
        user.setOffice((String) r.getValue(OFFICE));
        user.setPhone((r.getValue(PHONE)).toString());
        users.add(user);
    }
    return users;
}


Thank you, kind regards,

Gian

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to