From: David Gageot Date: Thu, 24 May 2012 05:17:58 +0000 (+0200) Subject: Remove violations X-Git-Tag: 3.1~91 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=55bcb1d3f76e85f821971eb9a3ea31f976beefbf;p=sonarqube.git Remove violations --- diff --git a/sonar-core/src/main/java/org/sonar/core/filter/CriterionDto.java b/sonar-core/src/main/java/org/sonar/core/filter/CriterionDto.java index 936af6d3572..4f8261a0365 100644 --- a/sonar-core/src/main/java/org/sonar/core/filter/CriterionDto.java +++ b/sonar-core/src/main/java/org/sonar/core/filter/CriterionDto.java @@ -27,16 +27,57 @@ public final class CriterionDto { private String family; private String key; private String operator; - private Float value; private String textValue; + private Float value; private Boolean variation; /** - * @param filterId the filter id to set + * @return the family */ - public CriterionDto setFilterId(Long filterId) { - this.filterId = filterId; - return this; + public String getFamily() { + return family; + } + + /** + * @return the filter id + */ + public Long getFilterId() { + return filterId; + } + + /** + * @return the key + */ + public String getKey() { + return key; + } + + /** + * @return the operator + */ + public String getOperator() { + return operator; + } + + /** + * @return the text value + */ + public String getTextValue() { + return textValue; + } + + /** + * @return the value + */ + public Float getValue() { + return value; + } + + /** + * @return the variation + */ + public Boolean getVariation() { + return variation; } /** @@ -47,6 +88,14 @@ public final class CriterionDto { return this; } + /** + * @param filterId the filter id to set + */ + public CriterionDto setFilterId(Long filterId) { + this.filterId = filterId; + return this; + } + /** * @param key the key to set */ @@ -64,18 +113,18 @@ public final class CriterionDto { } /** - * @param value the value to set + * @param textValue the textValue to set */ - public CriterionDto setValue(Float value) { - this.value = value; + public CriterionDto setTextValue(String textValue) { + this.textValue = textValue; return this; } /** - * @param textValue the textValue to set + * @param value the value to set */ - public CriterionDto setTextValue(String textValue) { - this.textValue = textValue; + public CriterionDto setValue(Float value) { + this.value = value; return this; } diff --git a/sonar-core/src/main/java/org/sonar/core/filter/FilterColumnDto.java b/sonar-core/src/main/java/org/sonar/core/filter/FilterColumnDto.java index 38a92e51baf..66b7b3d0f5b 100644 --- a/sonar-core/src/main/java/org/sonar/core/filter/FilterColumnDto.java +++ b/sonar-core/src/main/java/org/sonar/core/filter/FilterColumnDto.java @@ -26,16 +26,50 @@ public final class FilterColumnDto { private Long filterId; private String family; private String key; - private String sortDirection; private Long orderIndex; + private String sortDirection; private Boolean variation; /** - * @param filterId the filterId to set + * @return the family */ - public FilterColumnDto setFilterId(Long filterId) { - this.filterId = filterId; - return this; + public String getFamily() { + return family; + } + + /** + * @return the filter id + */ + public Long getFilterId() { + return filterId; + } + + /** + * @return the key + */ + public String getKey() { + return key; + } + + /** + * @return the order index + */ + public Long getOrderIndex() { + return orderIndex; + } + + /** + * @return the sort direction + */ + public String getSortDirection() { + return sortDirection; + } + + /** + * @return the variation + */ + public Boolean getVariation() { + return variation; } /** @@ -47,18 +81,18 @@ public final class FilterColumnDto { } /** - * @param key the key to set + * @param filterId the filterId to set */ - public FilterColumnDto setKey(String key) { - this.key = key; + public FilterColumnDto setFilterId(Long filterId) { + this.filterId = filterId; return this; } /** - * @param sortDirection the sortDirection to set + * @param key the key to set */ - public FilterColumnDto setSortDirection(String sortDirection) { - this.sortDirection = sortDirection; + public FilterColumnDto setKey(String key) { + this.key = key; return this; } @@ -70,6 +104,14 @@ public final class FilterColumnDto { return this; } + /** + * @param sortDirection the sortDirection to set + */ + public FilterColumnDto setSortDirection(String sortDirection) { + this.sortDirection = sortDirection; + return this; + } + /** * @param variation the variation to set */ diff --git a/sonar-core/src/main/java/org/sonar/core/filter/FilterDto.java b/sonar-core/src/main/java/org/sonar/core/filter/FilterDto.java index 8cd6c1db334..cde7262d49f 100644 --- a/sonar-core/src/main/java/org/sonar/core/filter/FilterDto.java +++ b/sonar-core/src/main/java/org/sonar/core/filter/FilterDto.java @@ -29,18 +29,73 @@ import java.util.List; */ public final class FilterDto { private Long id; - private String name; - private String key; private Long userId; - private Boolean shared; - private Boolean favourites; - private Long resourceId; private String defaultView; + private Boolean favourites; + private String key; + private String name; private Long pageSize; private Long periodIndex; + private Long resourceId; + private Boolean shared; private List criteria = Lists.newArrayList(); private List filterColumns = Lists.newArrayList(); + /** + * Add a {@link CriterionDto} to the list. + * + * @param criterion the criterion to add + */ + public FilterDto add(CriterionDto criterion) { + criteria.add(criterion); + return this; + } + + /** + * Add a {@link FilterColumnDto} to the list. + * + * @param filterColumn the column to add + */ + public FilterDto add(FilterColumnDto filterColumn) { + filterColumns.add(filterColumn); + return this; + } + + /** + * @return the column list + */ + public Collection getColumns() { + return filterColumns; + } + + /** + * @return the criterion list + */ + public Collection getCriteria() { + return criteria; + } + + /** + * @return the defaut view + */ + public String getDefaultView() { + return defaultView; + } + + /** + * @return true if the filter returns only favourites + */ + public Boolean getFavourites() { + return favourites; + } + + /** + * @return the column list + */ + public List getFilterColumns() { + return filterColumns; + } + /** * @return the id */ @@ -48,6 +103,13 @@ public final class FilterDto { return id; } + /** + * @return the key + */ + public String getKey() { + return key; + } + /** * @return the name */ @@ -56,41 +118,38 @@ public final class FilterDto { } /** - * @param name the name to set + * @return the page size */ - public FilterDto setName(String name) { - this.name = name; - return this; + public Long getPageSize() { + return pageSize; } /** - * @return the key + * @return the period index */ - public String getKey() { - return key; + public Long getPeriodIndex() { + return periodIndex; } /** - * @param key the key to set + * @return the resource id */ - public FilterDto setKey(String key) { - this.key = key; - return this; + public Long getResourceId() { + return resourceId; } /** * @return true if the filter is shared */ - public Boolean isShared() { + public Boolean getShared() { return shared; } /** - * @param shared the shared to set + * @return the user id */ - public FilterDto setShared(Boolean shared) { - this.shared = shared; - return this; + public Long getUserId() { + return userId; } /** @@ -101,18 +160,10 @@ public final class FilterDto { } /** - * @param favourites the favourites to set - */ - public FilterDto setFavourites(Boolean favourites) { - this.favourites = favourites; - return this; - } - - /** - * @return the defaut view + * @return true if the filter is shared */ - public String getDefaultView() { - return defaultView; + public Boolean isShared() { + return shared; } /** @@ -124,48 +175,39 @@ public final class FilterDto { } /** - * @return the page size + * @param favourites the favourites to set */ - public Long getPageSize() { - return pageSize; - } - - public FilterDto setPageSize(Long pageSize) { - this.pageSize = pageSize; + public FilterDto setFavourites(Boolean favourites) { + this.favourites = favourites; return this; } /** - * @return the criterion list + * @param key the key to set */ - public Collection getCriteria() { - return criteria; + public FilterDto setKey(String key) { + this.key = key; + return this; } /** - * Add a {@link CriterionDto} to the list. - * - * @param criterion the criterion to add + * @param name the name to set */ - public FilterDto add(CriterionDto criterion) { - criteria.add(criterion); + public FilterDto setName(String name) { + this.name = name; return this; } - /** - * @return the column list - */ - public Collection getColumns() { - return filterColumns; + public FilterDto setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; } /** - * Add a {@link FilterColumnDto} to the list. - * - * @param filterColumn the column to add + * @param shared the shared to set */ - public FilterDto add(FilterColumnDto filterColumn) { - filterColumns.add(filterColumn); + public FilterDto setShared(Boolean shared) { + this.shared = shared; return this; } }