*/
package org.sonar.core.component;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
public final class SnapshotDto {
/**
return this;
}
+ @CheckForNull
public Long getParentId() {
return parentId;
}
- public SnapshotDto setParentId(Long parentId) {
+ public SnapshotDto setParentId(@Nullable Long parentId) {
this.parentId = parentId;
return this;
}
+ /**
+ * Root id is null on project's snapshot
+ */
+ @CheckForNull
public Long getRootId() {
return rootId;
}
- public SnapshotDto setRootId(Long rootId) {
+ public SnapshotDto setRootId(@Nullable Long rootId) {
this.rootId = rootId;
return this;
}
return this;
}
+ @CheckForNull
public Integer getPurgeStatus() {
return purgeStatus;
}
- public SnapshotDto setPurgeStatus(Integer purgeStatus) {
+ public SnapshotDto setPurgeStatus(@Nullable Integer purgeStatus) {
this.purgeStatus = purgeStatus;
return this;
}
return this;
}
+ /**
+ * Version is only available on projects and modules
+ */
+ @CheckForNull
public String getVersion() {
return version;
}
- public SnapshotDto setVersion(String version) {
+ public SnapshotDto setVersion(@Nullable String version) {
this.version = version;
return this;
}
return this;
}
- public SnapshotDto setPeriodMode(int index, String p) {
+ public SnapshotDto setPeriodMode(int index, @Nullable String p) {
switch (index) {
case 1:
period1Mode = p;
return this;
}
+ @CheckForNull
public String getPeriodMode(int index) {
switch (index) {
case 1:
}
}
- public SnapshotDto setPeriodParam(int index, String p) {
+ public SnapshotDto setPeriodParam(int index, @Nullable String p) {
switch (index) {
case 1:
period1Param = p;
return this;
}
+ @CheckForNull
public String getPeriodModeParameter(int periodIndex) {
switch (periodIndex) {
case 1:
}
}
- public SnapshotDto setPeriodDate(int index, Long date) {
+ public SnapshotDto setPeriodDate(int index, @Nullable Long date) {
switch (index) {
case 1:
period1Date = date;
return this;
}
+ @CheckForNull
public Long getPeriodDate(int periodIndex) {
switch (periodIndex) {
case 1:
}
}
- public Long getKey() {
- return id;
- }
-
public SnapshotDto setCreatedAt(Long createdAt) {
this.createdAt = createdAt;
return this;