aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/filter/CriterionDto.java71
-rw-r--r--sonar-core/src/main/java/org/sonar/core/filter/FilterColumnDto.java64
-rw-r--r--sonar-core/src/main/java/org/sonar/core/filter/FilterDto.java156
3 files changed, 212 insertions, 79 deletions
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;
}
/**
@@ -48,6 +89,14 @@ public final class CriterionDto {
}
/**
+ * @param filterId the filter id to set
+ */
+ public CriterionDto setFilterId(Long filterId) {
+ this.filterId = filterId;
+ return this;
+ }
+
+ /**
* @param key the key to set
*/
public CriterionDto setKey(String key) {
@@ -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;
}
@@ -71,6 +105,14 @@ public final class FilterColumnDto {
}
/**
+ * @param sortDirection the sortDirection to set
+ */
+ public FilterColumnDto setSortDirection(String sortDirection) {
+ this.sortDirection = sortDirection;
+ return this;
+ }
+
+ /**
* @param variation the variation to set
*/
public FilterColumnDto setVariation(Boolean variation) {
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,19 +29,74 @@ 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<CriterionDto> criteria = Lists.newArrayList();
private List<FilterColumnDto> 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<FilterColumnDto> getColumns() {
+ return filterColumns;
+ }
+
+ /**
+ * @return the criterion list
+ */
+ public Collection<CriterionDto> getCriteria() {
+ return criteria;
+ }
+
+ /**
+ * @return the defaut view
+ */
+ public String getDefaultView() {
+ return defaultView;
+ }
+
+ /**
+ * @return <code>true</code> if the filter returns only favourites
+ */
+ public Boolean getFavourites() {
+ return favourites;
+ }
+
+ /**
+ * @return the column list
+ */
+ public List<FilterColumnDto> getFilterColumns() {
+ return filterColumns;
+ }
+
+ /**
* @return the id
*/
public Long getId() {
@@ -49,6 +104,13 @@ public final class FilterDto {
}
/**
+ * @return the key
+ */
+ public String getKey() {
+ return key;
+ }
+
+ /**
* @return the name
*/
public String getName() {
@@ -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 <code>true</code> 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 <code>true</code> 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<CriterionDto> 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<FilterColumnDto> 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;
}
}