org.jooq.Record - java examples

Here are the examples of the java api org.jooq.Record taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

155 Examples 7

19 View Complete Implementation : MappingDSLContext.java
Copyright MIT License
Author : openforis
public E fromRecord(Record record) {
    E enreplacedy = newEnreplacedy();
    fromRecord(record, enreplacedy);
    return enreplacedy;
}

19 View Complete Implementation : TaxonAttributeMapper.java
Copyright MIT License
Author : openforis
@Override
Node<?> addNode(NodeDefinition defn, Record r, Enreplacedy parent) {
    // TODO
    return new TaxonAttribute((TaxonAttributeDefinition) defn);
}

19 View Complete Implementation : MessagingUserPreferenceDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<MessagingUserPreferenceWrapper> getByUserId(long userId) {
    final Record record = dslContext.select().from(MESSAGING_USER_PREFERENCE).where(MESSAGING_USER_PREFERENCE.USER_ID.eq(userId)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(MessagingUserPreferenceWrapper.clreplaced));
}

19 View Complete Implementation : SamplingDesignDao.java
Copyright MIT License
Author : openforis
public SamplingDesignItem loadItem(int surveyId, String... parentKeys) {
    SamplingDesignDSLContext dsl = dsl();
    SelectQuery<Record> q = dsl.selectQuery();
    q.addFrom(OFC_SAMPLING_DESIGN);
    q.addConditions(OFC_SAMPLING_DESIGN.SURVEY_ID.equal(surveyId));
    addParentKeysConditions(q, parentKeys);
    int nextLevelIndex = parentKeys == null ? 0 : parentKeys.length;
    addLevelKeyNullConditions(q, nextLevelIndex);
    Record r = q.fetchAny();
    return r == null ? null : dsl.fromRecord(r);
}

19 View Complete Implementation : RoleGroupDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public boolean groupHasRole(Long roleGroupId, Long groupId) {
    Record record = this.dslContext.select().from(ROLE_GROUP_ROLE).where(ROLE_GROUP_ROLE.ROLE_GROUP_ID.eq(roleGroupId)).and(ROLE_GROUP_ROLE.ROLE_ID.eq(roleGroupId)).fetchOne();
    return record != null;
}

19 View Complete Implementation : BalloonLinkDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IBalloonLink getBalloonLink(String uuid) throws NotFoundException {
    final Record record = dslContext.select().from(BALLOON_LINK).where(BALLOON_LINK.UUID.eq(uuid)).fetchOne();
    if (record == null) {
        throw new NotFoundException();
    }
    return record.into(BalloonLink.clreplaced);
}

19 View Complete Implementation : MappingJooqDaoSupport.java
Copyright MIT License
Author : openforis
protected E loadById(C dsl, I id) {
    ResultQuery<?> selectQuery = dsl.selectByIdQuery(id);
    Record r = selectQuery.fetchOne();
    if (r == null) {
        return null;
    } else {
        return dsl.fromRecord(r);
    }
}

19 View Complete Implementation : OntologySpaceDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public OntologySpaceWrapper get(Long id) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(ONTOLOGY_SPACE).where(ONTOLOGY_SPACE.ID.eq(id)).fetchOne();
    if (record == null) {
        throw new NotFoundException("OntologySpace with id " + id + " does not exist");
    }
    return record.into(OntologySpaceWrapper.clreplaced);
}

19 View Complete Implementation : MappingDSLContext.java
Copyright MIT License
Author : openforis
protected <T extends Object> List<T> extractFields(Record r, Field<T>[] fields) {
    List<T> result = new ArrayList<T>(fields.length);
    for (int i = 0; i < fields.length; i++) {
        Field<T> field = fields[i];
        T value = r.getValue(field);
        result.add(value);
    }
    return result;
}

19 View Complete Implementation : ImpactTemplateSeriesDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IImpactTemplateSeries get(Long seriesId) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(IMPACT_TEMPLATE_SERIES).where(IMPACT_TEMPLATE_SERIES.SERIES_ID.eq(seriesId)).fetchOne();
    if (record == null) {
        throw new NotFoundException("ImpactTemplateSeries with id " + seriesId + " does not exist");
    }
    return record.into(ImpactTemplateSeries.clreplaced);
}

19 View Complete Implementation : CodeAttributeMapper.java
Copyright MIT License
Author : openforis
@Override
CodeAttribute addNode(NodeDefinition defn, Record r, Enreplacedy parent) {
    String name = defn.getName();
    String qualifier = r.getValuereplacedtring(DATA.TEXT2);
    CodeAttributeDefinition codeAttrDefn = (CodeAttributeDefinition) defn;
    CodeList list = codeAttrDefn.getList();
    String code = r.getValuereplacedtring(DATA.TEXT1);
    Code value = new Code(code, qualifier);
    return parent.addValue(name, value);
}

19 View Complete Implementation : ContestTeamMemberRoleDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IContestTeamMemberRole> get(Long id) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(CONTEST_TEAM_MEMBER_ROLE).where(CONTEST_TEAM_MEMBER_ROLE.ID.eq(id)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(ContestTeamMemberRole.clreplaced));
}

19 View Complete Implementation : ContestDiscussionDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IContestDiscussion> get(Long contestDiscussion) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(CONTEST_DISCUSSION).where(CONTEST_DISCUSSION.ID.eq(contestDiscussion)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(ContestDiscussion.clreplaced));
}

19 View Complete Implementation : TimeAttributeMapper.java
Copyright MIT License
Author : openforis
@Override
Node<?> addNode(NodeDefinition defn, Record r, Enreplacedy parent) {
    String name = defn.getName();
    Integer hour = r.getValueAsInteger(DATA.NUMBER1);
    Integer minute = r.getValueAsInteger(DATA.NUMBER2);
    Time time = new Time(hour, minute);
    return parent.addValue(name, time);
}

19 View Complete Implementation : ModelCategoryDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IModelCategory> get(long id) {
    final Record record = dslContext.select().from(MODEL_CATEGORY).where(MODEL_CATEGORY.ID.eq(id)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(ModelCategoryImpl.clreplaced));
}

19 View Complete Implementation : UserDao.java
Copyright MIT License
Author : openforis
public int getUserId(String username) {
    UserDSLContext jf = dsl();
    Record record = jf.select(OFC_USER.ID).from(OFC_USER).where(OFC_USER.USERNAME.equal(username)).fetchOne();
    Integer id = record.getValue(OFC_USER.ID);
    return id;
}

19 View Complete Implementation : ModelPositionDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IModelPosition> get(long id) {
    final Record record = dslContext.select().from(MODEL_POSITION).where(MODEL_POSITION.ID.eq(id)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(ModelPositionImpl.clreplaced));
}

19 View Complete Implementation : SamplingDesignDao.java
Copyright MIT License
Author : openforis
public int countBySurvey(int surveyId) {
    SelectQuery<?> q = dsl().selectCountQuery();
    q.addConditions(OFC_SAMPLING_DESIGN.SURVEY_ID.equal(surveyId));
    Record r = q.fetchOne();
    return (Integer) r.getValue(0);
}

19 View Complete Implementation : TrackedVisitorDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<ITrackedVisitor> getByUuid(String uuid) {
    final Record record = dslContext.select().from(TRACKED_VISITOR).where(TRACKED_VISITOR.UUID.eq(uuid)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(TrackedVisitor.clreplaced));
}

19 View Complete Implementation : SurveyObjectMappingJooqDaoSupport.java
Copyright MIT License
Author : openforis
public T loadById(CollectSurvey survey, I id) {
    C dsl = dsl(survey);
    ResultQuery<?> selectQuery = dsl.selectByIdQuery(id);
    Record r = selectQuery.fetchOne();
    return r == null ? null : dsl.fromRecord(r);
}

19 View Complete Implementation : ProposalTemplateDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IProposalTemplate get(Long id) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(PROPOSAL_TEMPLATE).where(PROPOSAL_TEMPLATE.ID.eq(id)).fetchOne();
    if (record == null) {
        throw new NotFoundException("ProposalTemplate with id " + id + " does not exist");
    }
    return record.into(ProposalTemplate.clreplaced);
}

19 View Complete Implementation : MemberCategoryDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<MemberCategoryWrapper> getMemberCategory(Long roleId) {
    final Record record = this.dslContext.select().from(MEMBER_CATEGORY).where(MEMBER_CATEGORY.ROLE_ID.equal(roleId)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(MemberCategoryWrapper.clreplaced));
}

19 View Complete Implementation : BalloonTextDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IBalloonText getBalloonText(Long id) throws NotFoundException {
    final Record record = dslContext.select().from(BALLOON_TEXT).where(BALLOON_TEXT.ID.eq(id)).fetchOne();
    if (record == null) {
        throw new NotFoundException();
    }
    return record.into(BalloonText.clreplaced);
}

19 View Complete Implementation : FileEntryDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IFileEntry get(Long fileEntryId) throws NotFoundException {
    final Record record = this.dslContext.select().from(FILE_ENTRY).where(FILE_ENTRY.ID.eq(fileEntryId)).fetchOne();
    if (record == null) {
        throw new NotFoundException();
    }
    return record.into(FileEntry.clreplaced);
}

19 View Complete Implementation : ModelDiscussionDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IModelDiscussion> get(long id) {
    final Record record = dslContext.select().from(MODEL_DISCUSSION).where(MODEL_DISCUSSION.ID.eq(id)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(ModelDiscussionImpl.clreplaced));
}

19 View Complete Implementation : ContestTeamMemberDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IContestTeamMember findOneBy(Long userId, Long contestId, Long roleId) {
    final Record record = this.dslContext.selectFrom(CONTEST_TEAM_MEMBER).where(CONTEST_TEAM_MEMBER.USER_ID.eq(userId)).and(CONTEST_TEAM_MEMBER.CONTEST_ID.eq(contestId)).and(CONTEST_TEAM_MEMBER.ROLE_ID.eq(roleId)).fetchOne();
    if (record == null) {
        return null;
    }
    return record.into(ContestTeamMember.clreplaced);
}

19 View Complete Implementation : ProposalRatingValueDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IProposalRatingValue get(Long id) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(PROPOSAL_RATING_VALUE).where(PROPOSAL_RATING_VALUE.ID.eq(id)).fetchOne();
    if (record == null) {
        throw new NotFoundException("ProposalRatingValue with id " + id + " does not exist");
    }
    return record.into(ProposalRatingValue.clreplaced);
}

19 View Complete Implementation : ProposalRatingTypeDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IProposalRatingType get(Long id) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(PROPOSAL_RATING_TYPE).where(PROPOSAL_RATING_TYPE.ID.eq(id)).fetchOne();
    if (record == null) {
        throw new NotFoundException("ProposalRatingType with id " + id + " does not exist");
    }
    return record.into(ProposalRatingType.clreplaced);
}

19 View Complete Implementation : NumberAttributeMapper.java
Copyright MIT License
Author : openforis
@Override
NumberAttribute<?> addNode(NodeDefinition defn, Record r, Enreplacedy parent) {
    String name = defn.getName();
    if (((NumberAttributeDefinition) defn).isInteger()) {
        Integer value = r.getValueAsInteger(DATA.NUMBER1);
        return parent.addValue(name, value);
    } else if (((NumberAttributeDefinition) defn).isReal()) {
        Double value = r.getValueAsDouble(DATA.NUMBER1);
        return parent.addValue(name, value);
    } else {
        throw new RuntimeException("Unimplemented numeric type " + ((NumberAttributeDefinition) defn).getType());
    }
}

19 View Complete Implementation : ContestTeamMemberDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IContestTeamMember> get(Long id) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(CONTEST_TEAM_MEMBER).where(CONTEST_TEAM_MEMBER.ID.eq(id)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(ContestTeamMember.clreplaced));
}

19 View Complete Implementation : BooleanAttributeMapper.java
Copyright MIT License
Author : openforis
@Override
Node<?> addNode(NodeDefinition defn, Record r, Enreplacedy parent) {
    Double v = r.getValueAsDouble(DATA.NUMBER1);
    Boolean b = null;
    if (v != null) {
        if (v.equals(Double.valueOf(1))) {
            b = Boolean.TRUE;
        } else if (v.equals(Double.valueOf(0))) {
            b = Boolean.FALSE;
        }
    }
    return parent.addValue(defn.getName(), b);
}

19 View Complete Implementation : MessagingUserPreferenceDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<MessagingUserPreferenceWrapper> get(long id) {
    final Record record = dslContext.select().from(MESSAGING_USER_PREFERENCE).where(MESSAGING_USER_PREFERENCE.ID.eq(id)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(MessagingUserPreferenceWrapper.clreplaced));
}

19 View Complete Implementation : SurveyObjectMappingDSLContext.java
Copyright MIT License
Author : openforis
@Override
protected void fromRecord(Record r, T o) {
    o.setId(r.getValue(getIdField()));
}

19 View Complete Implementation : LoginLogDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<LoginLog> get(long loginLogId) {
    final Record record = dslContext.select().from(LOGIN_LOG).where(LOGIN_LOG.ID.eq(loginLogId)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(LoginLog.clreplaced));
}

19 View Complete Implementation : MappingDSLContext.java
Copyright MIT License
Author : openforis
public List<E> fromResult(Result<?> records) {
    List<E> enreplacedies = new ArrayList<E>(records.size());
    for (Record record : records) {
        E result = fromRecord(record);
        enreplacedies.add(result);
    }
    return enreplacedies;
}

19 View Complete Implementation : ImpactTemplateMaxFocusAreaDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IImpactTemplateMaxFocusArea getByFocusAreaListId(Long id) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(IMPACT_TEMPLATE_MAX_FOCUS_AREA).where(IMPACT_TEMPLATE_MAX_FOCUS_AREA.FOCUS_AREA_LIST_ID.eq(id)).fetchOne();
    if (record == null) {
        throw new NotFoundException("ImpactTemplateMaxFocusArea with id " + id + " does not exist");
    }
    return record.into(ImpactTemplateMaxFocusArea.clreplaced);
}

19 View Complete Implementation : TextAttributeMapper.java
Copyright MIT License
Author : openforis
@Override
Node<?> addNode(NodeDefinition defn, Record r, Enreplacedy parent) {
    String value = r.getValuereplacedtring(Data.DATA.TEXT1);
    return parent.addValue(defn.getName(), value);
}

19 View Complete Implementation : PlatformTeamDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<PlatformTeamWrapper> getPlatformTeam(long teamId) {
    final Record memberRecord = dslContext.select().from(PLATFORM_TEAM).where(PLATFORM_TEAM.ID.eq(teamId)).fetchOne();
    if (memberRecord == null) {
        return Optional.empty();
    }
    return Optional.of(memberRecord.into(PlatformTeamWrapper.clreplaced));
}

19 View Complete Implementation : EntityMapper.java
Copyright MIT License
Author : openforis
@Override
Enreplacedy addNode(NodeDefinition defn, Record r, Enreplacedy parent) {
    String name = defn.getName();
    return parent.addEnreplacedy(name);
}

19 View Complete Implementation : ContestScheduleDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IContestSchedule> get(Long id) {
    final Record record = dslContext.selectFrom(CONTEST_SCHEDULE).where(CONTEST_SCHEDULE.ID.eq(id)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(ContestSchedule.clreplaced));
}

19 View Complete Implementation : TaxonomyDao.java
Copyright MIT License
Author : openforis
public CollectTaxonomy loadByName(CollectSurvey survey, String name) {
    TaxonomyDSLContext dsl = dsl(survey);
    Record r = dsl.selectFrom(OFC_TAXONOMY).where(OFC_TAXONOMY.SURVEY_ID.equal(survey.getId())).and(OFC_TAXONOMY.NAME.equal(name)).fetchOne();
    return r == null ? null : dsl.fromRecord(r);
}

19 View Complete Implementation : ContestTypeAttributeDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IContestTypeAttribute> get(String attributeName, long additionalId, String locale) {
    final Condition localeCondition;
    if (StringUtils.isEmpty(locale) || DEFAULT_LOCALE.equalsIgnoreCase(locale)) {
        localeCondition = CONTEST_TYPE_ATTRIBUTE.LOCALE.eq(StringUtils.EMPTY).or(CONTEST_TYPE_ATTRIBUTE.LOCALE.equalIgnoreCase(DEFAULT_LOCALE));
    } else {
        localeCondition = CONTEST_TYPE_ATTRIBUTE.LOCALE.equalIgnoreCase(locale);
    }
    final Record attributeRecord = dslContext.select().from(CONTEST_TYPE_ATTRIBUTE).where(CONTEST_TYPE_ATTRIBUTE.NAME.eq(attributeName).and(CONTEST_TYPE_ATTRIBUTE.ADDITIONAL_ID.eq(additionalId)).and(localeCondition)).fetchOne();
    if (attributeRecord == null) {
        return Optional.empty();
    }
    return Optional.of(attributeRecord.into(ContestTypeAttribute.clreplaced));
}

19 View Complete Implementation : SurveyWorkDao.java
Copyright MIT License
Author : openforis
@Transactional
public SurveySummary loadSurveySummary(int id) {
    Record record = dsl().select().from(OFC_SURVEY_WORK).where(OFC_SURVEY_WORK.ID.equal(id)).fetchOne();
    SurveySummary result = processSurveySummaryRow(record);
    return result;
}

19 View Complete Implementation : ProposalReferenceDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IProposalReference get(Long proposalId, Long subProposalId) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(PROPOSAL_REFERENCE).where(PROPOSAL_REFERENCE.PROPOSAL_ID.eq(proposalId)).and(PROPOSAL_REFERENCE.SUB_PROPOSAL_ID.eq(subProposalId)).fetchOne();
    if (record == null) {
        throw new NotFoundException("ProposalReference with id " + proposalId + " does not exist");
    }
    return record.into(ProposalReference.clreplaced);
}

19 View Complete Implementation : ContestPhaseRibbonTypeDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IContestPhaseRibbonType> get(Long id) throws NotFoundException {
    final Record record = dslContext.selectFrom(CONTEST_PHASE_RIBBON_TYPE).where(CONTEST_PHASE_RIBBON_TYPE.ID.eq(id)).fetchOne();
    if (record == null) {
        return Optional.empty();
    }
    return Optional.of(record.into(ContestPhaseRibbonType.clreplaced));
}

19 View Complete Implementation : ConfigurationAttributeDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public Optional<IConfigurationAttribute> getConfigurationAttribute(String attributeName, String locale) {
    final Condition localeCondition;
    if (StringUtils.isEmpty(locale) || DEFAULT_LOCALE.equalsIgnoreCase(locale)) {
        localeCondition = CONFIGURATION_ATTRIBUTE.LOCALE.eq(StringUtils.EMPTY).or(CONFIGURATION_ATTRIBUTE.LOCALE.equalIgnoreCase(DEFAULT_LOCALE));
    } else {
        localeCondition = CONFIGURATION_ATTRIBUTE.LOCALE.equalIgnoreCase(locale);
    }
    final Record attributeRecord = dslContext.select().from(CONFIGURATION_ATTRIBUTE).where(CONFIGURATION_ATTRIBUTE.NAME.eq(attributeName).and(localeCondition)).fetchOne();
    if (attributeRecord == null) {
        return Optional.empty();
    }
    return Optional.of(attributeRecord.into(ConfigurationAttribute.clreplaced));
}

19 View Complete Implementation : ImpactTemplateFocusAreaListDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public IImpactTemplateFocusAreaList get(Long focusAreaListId) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(IMPACT_TEMPLATE_FOCUS_AREA_LIST).where(IMPACT_TEMPLATE_FOCUS_AREA_LIST.ID.eq(focusAreaListId)).fetchOne();
    if (record == null) {
        throw new NotFoundException("ImpactTemplateFocusAreaList with id " + focusAreaListId + " does not exist");
    }
    return record.into(ImpactTemplateFocusAreaList.clreplaced);
}

19 View Complete Implementation : FocusAreaDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public FocusAreaWrapper get(Long id) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(FOCUS_AREA).where(FOCUS_AREA.ID.eq(id)).fetchOne();
    if (record == null) {
        throw new NotFoundException("FocusArea with id " + id + " does not exist");
    }
    return record.into(FocusAreaWrapper.clreplaced);
}

19 View Complete Implementation : CategoryGroupDaoImpl.java
Copyright MIT License
Author : CCI-MIT
@Override
public ICategoryGroup get(long groupId) throws NotFoundException {
    final Record groupRecord = dslContext.select().from(CATEGORY_GROUP).where(CATEGORY_GROUP.ID.eq(groupId)).fetchOne();
    if (groupRecord == null) {
        throw new NotFoundException("CategoryGroup with id " + groupId + " does not exist");
    }
    return groupRecord.into(CategoryGroup.clreplaced);
}

19 View Complete Implementation : ImpactDefaultSeriesDaoImpl.java
Copyright MIT License
Author : CCI-MIT
public IImpactDefaultSeries get(Long seriesId) throws NotFoundException {
    final Record record = this.dslContext.selectFrom(IMPACT_DEFAULT_SERIES).where(IMPACT_DEFAULT_SERIES.SERIES_ID.eq(seriesId)).fetchOne();
    if (record == null) {
        throw new NotFoundException("ImpactDefaultSeries with id " + seriesId + " does not exist");
    }
    return record.into(ImpactDefaultSeries.clreplaced);
}