Skip to content

Commit 86eafba

Browse files
committed
Merge branch 'release/0.29.4'
2 parents f80759f + 6dc18fc commit 86eafba

File tree

2 files changed

+11
-33
lines changed

2 files changed

+11
-33
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# artifact version
2-
currentVersion = 0.29.3
2+
currentVersion = 0.29.4
33

44
# dependency versions
55
springBootVersion = 1.3.3.RELEASE

spar-wings-spring-data-chunk/src/main/java/jp/xet/sparwings/spring/data/model/ChunkedResources.java

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import lombok.EqualsAndHashCode;
3737
import lombok.Getter;
3838
import lombok.NoArgsConstructor;
39+
import lombok.Setter;
3940
import lombok.ToString;
4041

4142
/**
@@ -50,8 +51,17 @@
5051
@NoArgsConstructor(access = AccessLevel.PACKAGE)
5152
public class ChunkedResources<T> {
5253

54+
@Getter
55+
@Setter(AccessLevel.PACKAGE)
56+
@XmlElement(name = "embedded")
57+
@com.fasterxml.jackson.annotation.JsonProperty("_embedded")
58+
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
5359
private Map<String, Collection<T>> content;
5460

61+
@Getter
62+
@Setter(AccessLevel.PACKAGE)
63+
@XmlElement(name = "chunk")
64+
@com.fasterxml.jackson.annotation.JsonProperty("chunk")
5565
private ChunkMetadata metadata;
5666

5767
/**
@@ -106,38 +116,6 @@ public ChunkedResources(String key, Collection<T> content, ChunkMetadata metadat
106116
this.metadata = metadata;
107117
}
108118

109-
/**
110-
* Returns the underlying elements.
111-
*
112-
* @return the content will never be {@literal null}.
113-
* @since 0.11
114-
*/
115-
@XmlElement(name = "embedded")
116-
@com.fasterxml.jackson.annotation.JsonProperty("_embedded")
117-
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
118-
public Map<String, Collection<T>> getContent() {
119-
return content;
120-
}
121-
122-
void setContent(Map<String, Collection<T>> content) {
123-
String key = this.content != null ? //
124-
this.content.keySet().iterator().next() : content.keySet().iterator().next();
125-
Collection<T> collection = content.get(key);
126-
this.content = Collections.singletonMap(key, collection);
127-
}
128-
129-
/**
130-
* Metadata of this chunk.
131-
*
132-
* @return the metadata
133-
* @since 0.11
134-
*/
135-
@XmlElement(name = "chunk")
136-
@com.fasterxml.jackson.annotation.JsonProperty("chunk")
137-
public ChunkMetadata getMetadata() {
138-
return metadata;
139-
}
140-
141119
/**
142120
* Value object for pagination metadata.
143121
*

0 commit comments

Comments
 (0)