Skip to content

Commit bd82fb0

Browse files
committed
chore: make setters package private and use jspecify notation
1 parent d4f4546 commit bd82fb0

1 file changed

Lines changed: 18 additions & 29 deletions

File tree

  • java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery

java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableResult.java

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.google.common.collect.Iterators;
2727
import java.io.Serializable;
2828
import java.util.Objects;
29-
import javax.annotation.Nullable;
29+
import org.jspecify.annotations.Nullable;
3030

3131
@AutoValue
3232
public abstract class TableResult implements Page<FieldValueList>, Serializable {
@@ -53,17 +53,17 @@ public abstract static class Builder {
5353

5454
abstract TableResult.Builder setRowsInPage(Long rowsInPage);
5555

56-
public abstract TableResult.Builder setStatementType(StatementType statementType);
56+
abstract TableResult.Builder setStatementType(@Nullable StatementType statementType);
5757

58-
public abstract TableResult.Builder setTotalBytesBilled(Long totalBytesBilled);
58+
abstract TableResult.Builder setTotalBytesBilled(@Nullable Long totalBytesBilled);
5959

60-
public abstract TableResult.Builder setTotalBytesProcessed(Long totalBytesProcessed);
60+
abstract TableResult.Builder setTotalBytesProcessed(@Nullable Long totalBytesProcessed);
6161

62-
public abstract TableResult.Builder setTotalSlotMs(Long totalSlotMs);
62+
abstract TableResult.Builder setTotalSlotMs(@Nullable Long totalSlotMs);
6363

64-
public abstract TableResult.Builder setNumDmlAffectedRows(Long numDmlAffectedRows);
64+
abstract TableResult.Builder setNumDmlAffectedRows(@Nullable Long numDmlAffectedRows);
6565

66-
public abstract TableResult.Builder setSessionInfo(SessionInfo sessionInfo);
66+
abstract TableResult.Builder setSessionInfo(@Nullable SessionInfo sessionInfo);
6767

6868
/** Creates a @code TableResult} object. */
6969
public abstract TableResult build();
@@ -76,8 +76,7 @@ public static Builder newBuilder() {
7676
}
7777

7878
/** Returns the schema of the results. Null if the schema is not supplied. */
79-
@Nullable
80-
public abstract Schema getSchema();
79+
public abstract @Nullable Schema getSchema();
8180

8281
/**
8382
* Returns the total number of rows in the complete result set, which can be more than the number
@@ -88,48 +87,38 @@ public static Builder newBuilder() {
8887

8988
public abstract Page<FieldValueList> getPageNoSchema();
9089

91-
@Nullable
92-
public abstract JobId getJobId();
90+
public abstract @Nullable JobId getJobId();
9391

94-
@Nullable
95-
public abstract String getQueryId();
92+
public abstract @Nullable String getQueryId();
9693

97-
@Nullable
98-
public abstract JobCreationReason getJobCreationReason();
94+
public abstract @Nullable JobCreationReason getJobCreationReason();
9995

10096
/** Returns the number of rows in the current page of results. */
101-
@Nullable
102-
public abstract Long getRowsInPage();
97+
public abstract @Nullable Long getRowsInPage();
10398

10499
/**
105100
* Returns the statement type of the query (e.g. SELECT, INSERT, UPDATE, DDL, SCRIPT), if
106101
* available.
107102
*/
108-
@Nullable
109-
public abstract StatementType getStatementType();
103+
public abstract @Nullable StatementType getStatementType();
110104

111105
/** Returns the total number of bytes billed for the query, if available. */
112-
@Nullable
113-
public abstract Long getTotalBytesBilled();
106+
public abstract @Nullable Long getTotalBytesBilled();
114107

115108
/** Returns the total number of bytes processed by the query, if available. */
116-
@Nullable
117-
public abstract Long getTotalBytesProcessed();
109+
public abstract @Nullable Long getTotalBytesProcessed();
118110

119111
/** Returns the total slot milliseconds for the query, if available. */
120-
@Nullable
121-
public abstract Long getTotalSlotMs();
112+
public abstract @Nullable Long getTotalSlotMs();
122113

123114
/**
124115
* Returns the number of rows affected by a DML statement (INSERT, UPDATE, DELETE, MERGE), if
125116
* available.
126117
*/
127-
@Nullable
128-
public abstract Long getNumDmlAffectedRows();
118+
public abstract @Nullable Long getNumDmlAffectedRows();
129119

130120
/** Returns information about the session if this query is part of one, if available. */
131-
@Nullable
132-
public abstract SessionInfo getSessionInfo();
121+
public abstract @Nullable SessionInfo getSessionInfo();
133122

134123
@Override
135124
public boolean hasNextPage() {

0 commit comments

Comments
 (0)