package org.sonar.core.qualityprofile.db;
-import com.google.common.base.Preconditions;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
import org.sonar.core.db.Dto;
import org.sonar.core.rule.RuleDto;
import org.sonar.core.rule.SeverityUtil;
return dto;
}
+ @Override
+ public String toString() {
+ return new ReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).toString();
+ }
+
+
}
return this;
}
- public static ActiveRuleParamDto createFor(RuleParamDto minParam) {
- ActiveRuleParamDto dto = new ActiveRuleParamDto();
- dto.setKey(minParam.getName());
- dto.setRulesParameterId(minParam.getId());
- return dto;
+ public static ActiveRuleParamDto createFor(RuleParamDto param) {
+ return new ActiveRuleParamDto()
+ .setKey(param.getName())
+ .setRulesParameterId(param.getId());
+ }
+
+ public static ActiveRuleParamDto createFrom(ActiveRuleParamDto parentParam) {
+ return new ActiveRuleParamDto()
+ .setKey(parentParam.getKey())
+ .setRulesParameterId(parentParam.getId());
}
}