private long updatedAt;
// These fields do not exists in db, it's only retrieve by joins
- private Integer parentId;
private String repository;
private String ruleField;
private String profileKey;
- /**
- * @deprecated for internal use, should be private
- */
public ActiveRuleDto setKey(ActiveRuleKey key) {
this.repository = key.ruleKey().repository();
this.ruleField = key.ruleKey().rule();
return this;
}
- @CheckForNull
- @Deprecated
- public Integer getParentId() {
- return parentId;
- }
-
- @Deprecated
- public ActiveRuleDto setParentId(@Nullable Integer parentId) {
- this.parentId = parentId;
- return this;
- }
-
public boolean isInherited() {
return StringUtils.equals(INHERITED, inheritance);
}
a.rule_id as ruleId,
a.failure_level as severity,
a.inheritance as inheritance,
- active_rule_parent.id as parentId,
a.created_at as "createdAt",
a.updated_at as "updatedAt"
</sql>
<sql id="activeRuleJoin">
INNER JOIN rules_profiles qp ON qp.id=a.profile_id
LEFT JOIN rules_profiles profile_parent ON profile_parent.kee=qp.parent_kee
- LEFT JOIN active_rules active_rule_parent ON active_rule_parent.profile_id=profile_parent.id AND a.rule_id=active_rule_parent.rule_id
</sql>
<select id="selectAfterDate" parameterType="Date" resultType="ActiveRule"