Skip to content

Commit 162dcf9

Browse files
committed
extra lines
1 parent d6dcc8b commit 162dcf9

File tree

3 files changed

+4
-208
lines changed

3 files changed

+4
-208
lines changed

services-custom/dynamodb-enhanced/src/it/java/software/amazon/awssdk/enhanced/dynamodb/AsyncCrudWithResponseIntegrationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ public void putItem_returnItemCollectionMetrics_set_itemCollectionMetricsNotNull
118118
public void updateItem_returnItemCollectionMetrics_set_itemCollectionMetricsNull() {
119119
Record record = new Record().setId("1").setSort(10);
120120
UpdateItemEnhancedRequest<Record> request = UpdateItemEnhancedRequest.builder(Record.class)
121-
.item(record)
122-
.build();
121+
.item(record)
122+
.build();
123123

124124
UpdateItemEnhancedResponse<Record> response = mappedTable.updateItemWithResponse(request).join();
125125

@@ -201,8 +201,8 @@ public void updateItem_returnValues_all_old() {
201201

202202

203203
UpdateItemEnhancedResponse<Record> response = mappedTable.updateItemWithResponse(r -> r.item(updatedRecord)
204-
.returnValues(ReturnValue.ALL_OLD))
205-
.join();
204+
.returnValues(ReturnValue.ALL_OLD))
205+
.join();
206206

207207
assertThat(response.attributes().getId()).isEqualTo(record.getId());
208208
assertThat(response.attributes().getSort()).isEqualTo(record.getSort());

services-custom/dynamodb-enhanced/src/it/java/software/amazon/awssdk/enhanced/dynamodb/DynamoDbEnhancedIntegrationTestBase.java

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -104,96 +104,34 @@ protected static String getStringAttrValue(int numChars) {
104104
return new String(chars);
105105
}
106106

107-
108107
protected static final TableSchema<RecordWithVersion> RECORD_WITH_VERSION_TABLE_SCHEMA =
109-
110-
111-
112108
StaticTableSchema.builder(RecordWithVersion.class)
113-
114-
115109
.newItemSupplier(RecordWithVersion::new)
116-
117-
118110
.addAttribute(String.class, a -> a.name("id")
119-
120-
121111
.getter(RecordWithVersion::getId)
122-
123-
124112
.setter(RecordWithVersion::setId)
125-
126-
127113
.tags(primaryPartitionKey(), secondaryPartitionKey("index1")))
128-
129-
130114
.addAttribute(Integer.class, a -> a.name("sort")
131-
132-
133115
.getter(RecordWithVersion::getSort)
134-
135-
136116
.setter(RecordWithVersion::setSort)
137-
138-
139117
.tags(primarySortKey(), secondarySortKey("index1")))
140-
141-
142118
.addAttribute(Integer.class, a -> a.name("value")
143-
144-
145119
.getter(RecordWithVersion::getValue)
146-
147-
148120
.setter(RecordWithVersion::setValue))
149-
150-
151121
.addAttribute(String.class, a -> a.name("gsi_id")
152-
153-
154122
.getter(RecordWithVersion::getGsiId)
155-
156-
157123
.setter(RecordWithVersion::setGsiId)
158-
159-
160124
.tags(secondaryPartitionKey("gsi_keys_only")))
161-
162-
163125
.addAttribute(Integer.class, a -> a.name("gsi_sort")
164-
165-
166126
.getter(RecordWithVersion::getGsiSort)
167-
168-
169127
.setter(RecordWithVersion::setGsiSort)
170-
171-
172128
.tags(secondarySortKey("gsi_keys_only")))
173-
174-
175129
.addAttribute(String.class, a -> a.name("stringAttribute")
176-
177-
178130
.getter(RecordWithVersion::getStringAttribute)
179-
180-
181131
.setter(RecordWithVersion::setStringAttribute))
182-
183-
184132
.addAttribute(Integer.class, a -> a.name("version")
185-
186-
187133
.getter(RecordWithVersion::getVersion)
188-
189-
190134
.setter(RecordWithVersion::setVersion)
191-
192-
193135
.tags(versionAttribute(0L, 1L, true))) // startAt=0, incrementBy=1,
194-
// optimisticLockingOnDelete=true
195-
196-
197136
.build();
198-
199137
}

services-custom/dynamodb-enhanced/src/it/java/software/amazon/awssdk/enhanced/dynamodb/model/RecordWithVersion.java

Lines changed: 0 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -19,243 +19,101 @@
1919
import software.amazon.awssdk.enhanced.dynamodb.extensions.annotations.DynamoDbVersionAttribute;
2020
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;
2121

22-
2322
@DynamoDbBean
2423
public class RecordWithVersion {
2524

26-
2725
private String id;
28-
29-
3026
private Integer sort;
31-
32-
3327
private Integer value;
34-
35-
3628
private String gsiId;
37-
38-
3929
private Integer gsiSort;
40-
41-
4230
private String stringAttribute;
43-
44-
4531
private Integer version;
4632

47-
4833
public String getId() {
49-
50-
5134
return id;
52-
53-
5435
}
5536

56-
5737
public RecordWithVersion setId(String id) {
58-
59-
6038
this.id = id;
61-
62-
6339
return this;
64-
65-
6640
}
6741

68-
6942
public Integer getSort() {
70-
71-
7243
return sort;
73-
74-
7544
}
7645

77-
7846
public RecordWithVersion setSort(Integer sort) {
79-
80-
8147
this.sort = sort;
82-
83-
8448
return this;
85-
86-
8749
}
8850

89-
9051
public Integer getValue() {
91-
92-
9352
return value;
94-
95-
9653
}
9754

98-
9955
public RecordWithVersion setValue(Integer value) {
100-
101-
10256
this.value = value;
103-
104-
10557
return this;
106-
107-
10858
}
10959

110-
11160
public String getGsiId() {
112-
113-
11461
return gsiId;
115-
116-
11762
}
11863

119-
12064
public RecordWithVersion setGsiId(String gsiId) {
121-
122-
12365
this.gsiId = gsiId;
124-
125-
12666
return this;
127-
128-
12967
}
13068

131-
13269
public Integer getGsiSort() {
133-
134-
13570
return gsiSort;
136-
137-
13871
}
13972

140-
14173
public RecordWithVersion setGsiSort(Integer gsiSort) {
142-
143-
14474
this.gsiSort = gsiSort;
145-
146-
14775
return this;
148-
149-
15076
}
15177

152-
15378
public String getStringAttribute() {
154-
155-
15679
return stringAttribute;
157-
158-
15980
}
16081

161-
16282
public RecordWithVersion setStringAttribute(String stringAttribute) {
163-
164-
16583
this.stringAttribute = stringAttribute;
166-
167-
16884
return this;
169-
170-
17185
}
17286

173-
17487
@DynamoDbVersionAttribute
175-
176-
17788
public Integer getVersion() {
178-
179-
18089
return version;
181-
182-
18390
}
18491

185-
18692
public RecordWithVersion setVersion(Integer version) {
187-
188-
18993
this.version = version;
190-
191-
19294
return this;
193-
194-
19595
}
19696

197-
19897
@Override
199-
200-
20198
public boolean equals(Object o) {
202-
203-
20499
if (this == o) {
205-
206-
207100
return true;
208-
209-
210101
}
211-
212-
213102
if (o == null || getClass() != o.getClass()) {
214-
215-
216103
return false;
217-
218-
219104
}
220-
221-
222105
RecordWithVersion recordWithVersion = (RecordWithVersion) o;
223-
224-
225106
return Objects.equals(id, recordWithVersion.id) &&
226-
227-
228107
Objects.equals(sort, recordWithVersion.sort) &&
229-
230-
231108
Objects.equals(value, recordWithVersion.value) &&
232-
233-
234109
Objects.equals(gsiId, recordWithVersion.gsiId) &&
235-
236-
237110
Objects.equals(stringAttribute, recordWithVersion.stringAttribute) &&
238-
239-
240111
Objects.equals(gsiSort, recordWithVersion.gsiSort) &&
241-
242-
243112
Objects.equals(version, recordWithVersion.version);
244-
245-
246113
}
247114

248-
249115
@Override
250-
251-
252116
public int hashCode() {
253-
254-
255117
return Objects.hash(id, sort, value, gsiId, gsiSort, stringAttribute, version);
256-
257-
258118
}
259-
260-
261119
}

0 commit comments

Comments
 (0)