*/
package org.sonar.core.duplication;
-import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
*/
package org.sonar.core.purge;
-import java.util.Date;
-
public final class PurgeSnapshotQuery {
private Long rootProjectId;
private Long rootSnapshotId;
private Long resourceId;
- private Date beforeBuildDate;
private String[] scopes;
private String[] qualifiers;
private String[] status;
return this;
}
- public Date getBeforeBuildDate() {
- return beforeBuildDate;
- }
-
- public PurgeSnapshotQuery setBeforeBuildDate(Date beforeBuildDate) {
- this.beforeBuildDate = beforeBuildDate;
- return this;
- }
-
public String[] getScopes() {
- return scopes;
+ return scopes;//NOSONAR May expose internal representation by returning reference to mutable object
}
public PurgeSnapshotQuery setScopes(String[] scopes) {
}
public String[] getQualifiers() {
- return qualifiers;
+ return qualifiers;//NOSONAR May expose internal representation by returning reference to mutable object
}
public PurgeSnapshotQuery setQualifiers(String[] qualifiers) {
}
public String[] getStatus() {
- return status;
+ return status;//NOSONAR May expose internal representation by returning reference to mutable object
}
public PurgeSnapshotQuery setStatus(String[] status) {
private boolean isLast;
public Date getDate() {
- return date;
+ return date;//NOSONAR May expose internal representation by returning reference to mutable object
}
public long getSnapshotId() {
}
public void setDate(Date date) {
- this.date = date;
+ this.date = date;//NOSONAR May expose internal representation by incorporating reference to mutable object
}
public PurgeableSnapshotDto setSnapshotId(long snapshotId) {
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
-import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.SqlSession;
}
public Date getDate() {
- return date;
+ return date;//NOSONAR May expose internal representation by returning reference to mutable object
}
public SnapshotDto setDate(Date date) {
- this.date = date;
+ this.date = date;// NOSONAR May expose internal representation by incorporating reference to mutable object
return this;
}
public Date getBuildDate() {
- return buildDate;
+ return buildDate;//NOSONAR May expose internal representation by returning reference to mutable object
}
public SnapshotDto setBuildDate(Date buildDate) {
- this.buildDate = buildDate;
+ this.buildDate = buildDate;// NOSONAR May expose internal representation by incorporating reference to mutable object
return this;
}
<if test="resourceId != null">
and s.project_id=#{resourceId}
</if>
- <if test="beforeBuildDate != null">
- and s.build_date <= #{beforeBuildDate}
- </if>
<if test="status != null">
and s.status in
<foreach item="s" index="index" collection="status" open="(" separator="," close=")">#{s}</foreach>
}
/**
- * @deprecated since 2.14 use {@link #setSeverity()} instead. See SONAR-1829.
+ * @deprecated since 2.14 use {@link #setSeverity(org.sonar.api.rules.RulePriority)} instead. See SONAR-1829.
*/
+ @Deprecated
public RuleMeasure setRulePriority(RulePriority rulePriority) {
this.rulePriority = rulePriority;
return this;