A Data Transfer Object (DTO) is easily serializable having only public fields of primitive types and their wrapper classes, Strings, and DTOs. List, Set, Map and array aggregates may also be used. The aggregates must only hold objects of the listed types or aggregates.
The object graph from a Data Transfer Object must be a tree to simplify serialization and deserialization.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static StringBuilder | Returns: The specified StringBuilder.StringBuilder to which the string representation is
appended. result, final Map<Object, String> References to "seen" objects. objectRefs, final String The reference path of the specified array. refpath, final Object The array whose string representation is to be appended. array)Append the specified array's string representation to the specified StringBuilder. |
| private static StringBuilder | Returns: The specified StringBuilder.StringBuilder to which the string representation is
appended. result, final Map<Object, String> References to "seen" objects. objectRefs, final String The reference path of the specified DTO. refpath, final DTO The DTO whose string representation is to be appended. dto)Append the specified DTO's string representation to the specified StringBuilder. |
| private static StringBuilder | Returns: The specified StringBuilder.StringBuilder to which the string representation is
appended. result, final Map<Object, String> References to "seen" objects. objectRefs, final String The reference path of the specified list. refpath, final Iterable<?> The iterable whose string representation is to be
appended. iterable)Append the specified iterable's string representation to the specified StringBuilder. |
| private static StringBuilder | Returns: The specified StringBuilder.StringBuilder to which the string representation is
appended. result, final Map<Object, String> References to "seen" objects. objectRefs, final String The reference path of the specified map. refpath, final Map<?, ?> The map whose string representation is to be appended. map)Append the specified map's string representation to the specified StringBuilder. |
| private static StringBuilder | Returns: The specified StringBuilder.StringBuilder to which the string is appended. result, final CharSequence The string to be appended. string)Append the specified string to the specified StringBuilder. |
| private static StringBuilder | Returns: The specified StringBuilder.StringBuilder to which the string representation is
appended. result, final Map<Object, String> References to "seen" objects. objectRefs, final String The reference path of the specified value. refpath, final Object The object whose string representation is to be appended. value)Append the specified value's string representation to the specified StringBuilder. |
| private static CharSequence | Returns: The string compressed, if necessary.The string to potentially compress. in)Compress, in length, the specified string. |
| public String | Returns: A string representation of this DTO suitable for use when debugging.Overrides java. Return a string representation of this DTO suitable for use when debugging. |
| DTO | back to summary |
|---|---|
| public DTO() | |
| appendArray | back to summary |
|---|---|
| private static StringBuilder appendArray(final StringBuilder result, final Map<Object, String> objectRefs, final String refpath, final Object array) Append the specified array's string representation to the specified StringBuilder.
| |
| appendDTO | back to summary |
|---|---|
| private static StringBuilder appendDTO(final StringBuilder result, final Map<Object, String> objectRefs, final String refpath, final DTO dto) Append the specified DTO's string representation to the specified StringBuilder.
| |
| appendIterable | back to summary |
|---|---|
| private static StringBuilder appendIterable(final StringBuilder result, final Map<Object, String> objectRefs, final String refpath, final Iterable<?> iterable) Append the specified iterable's string representation to the specified StringBuilder.
| |
| appendMap | back to summary |
|---|---|
| private static StringBuilder appendMap(final StringBuilder result, final Map<Object, String> objectRefs, final String refpath, final Map<?, ?> map) Append the specified map's string representation to the specified StringBuilder.
| |
| appendString | back to summary |
|---|---|
| private static StringBuilder appendString(final StringBuilder result, final CharSequence string) Append the specified string to the specified StringBuilder.
| |
| appendValue | back to summary |
|---|---|
| private static StringBuilder appendValue(final StringBuilder result, final Map<Object, String> objectRefs, final String refpath, final Object value) Append the specified value's string representation to the specified StringBuilder. This method handles cycles in the object graph, using path-based references, even though the specification requires the object graph from a DTO to be a tree.
| |
| compress | back to summary |
|---|---|
| private static CharSequence compress(final CharSequence in) Compress, in length, the specified string.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Return a string representation of this DTO suitable for use when debugging. The format of the string representation is not specified and subject to change. | |