use of org.jooq.Record4 in project textdb by TextDB.
the class KeywordDictionaryResource method listUserDictionaries.
@GET
@Path("/list")
public List<KeywordDictionary> listUserDictionaries(@Session HttpSession session) {
UInteger userID = UserResource.getUser(session).getUserID();
Result<Record4<UInteger, String, byte[], String>> result = getUserDictionaryRecord(userID);
if (result == null)
return new ArrayList<>();
List<KeywordDictionary> dictionaryList = result.stream().map(record -> new KeywordDictionary(record.get(KEYWORD_DICTIONARY.KID), record.get(KEYWORD_DICTIONARY.NAME), convertContentToList(record.get(KEYWORD_DICTIONARY.CONTENT)), record.get(KEYWORD_DICTIONARY.DESCRIPTION))).collect(Collectors.toList());
return dictionaryList;
}
Aggregations