src/main/java/de/otto/teamdojo/service/BadgeSkillQueryService.java
private Specification<BadgeSkill> createSpecification(BadgeSkillCriteria criteria) {
        Specification<BadgeSkill> specification = Specification.where(null);
        if (criteria != null) {
            if (criteria.getId() != null) {
                specification = specification.and(buildSpecification(criteria.getId(), BadgeSkill_.id));
            }
            if (criteria.getBadgeId() != null) {
                specification = specification.and(buildReferringEntitySpecification(criteria.getBadgeId(), BadgeSkill_.badge, Badge_.id));
            }
            if (criteria.getSkillId() != null) {
                specification = specification.and(buildReferringEntitySpecification(criteria.getSkillId(), BadgeSkill_.skill, Skill_.id));
            }
        }
        return specification;
    }
/**
     * Function to convert BadgeSkillCriteria to a {@link Specification}
     */
Function to convert BadgeSkillCriteria to a  Specification
Function to convert BadgeSkillCriteria to a Specification
private Specification<BadgeSkill> createSpecification(BadgeSkillCriteria criteria) {
        Specification<BadgeSkill> specification = Specification.where(null);
        if (criteria != null) {
            if (criteria.getId() != null) {
                specification = specification.and(buildSpecification(criteria.getId(), BadgeSkill_.id));
            }
            if (criteria.getBadgeId() != null) {
                specification = specification.and(buildReferringEntitySpecification(criteria.getBadgeId(), BadgeSkill_.badge, Badge_.id));
            }
            if (criteria.getSkillId() != null) {
                specification = specification.and(buildReferringEntitySpecification(criteria.getSkillId(), BadgeSkill_.skill, Skill_.id));
            }
        }
        return specification;
    }
private Specification < BadgeSkill > createSpecification ( BadgeSkillCriteria criteria ) { Specification < BadgeSkill > specification = Specification . where ( null ) ; if ( criteria != null ) { if ( criteria . getId ( ) != null ) { specification = specification . and ( buildSpecification ( criteria . getId ( ) , BadgeSkill_ . id ) ) ; } if ( criteria . getBadgeId ( ) != null ) { specification = specification . and ( buildReferringEntitySpecification ( criteria . getBadgeId ( ) , BadgeSkill_ . badge , Badge_ . id ) ) ; } if ( criteria . getSkillId ( ) != null ) { specification = specification . and ( buildReferringEntitySpecification ( criteria . getSkillId ( ) , BadgeSkill_ . skill , Skill_ . id ) ) ; } } return specification ; }
Function to convert BadgeSkillCriteria to a {@link Specification}
Function to convert BadgeSkillCriteria to a { @link Specification }