|
| 1 | +package mocka.odm.document; |
| 2 | + |
| 3 | +import org.bson.types.*; |
| 4 | +import org.springframework.data.annotation.Id; |
| 5 | +import org.springframework.data.geo.Box; |
| 6 | +import org.springframework.data.geo.Circle; |
| 7 | +import org.springframework.data.geo.Point; |
| 8 | +import org.springframework.data.geo.Polygon; |
| 9 | +import org.springframework.data.mongodb.core.geo.*; |
| 10 | +import org.springframework.data.mongodb.core.mapping.Document; |
| 11 | + |
| 12 | +import java.time.*; |
| 13 | +import java.util.*; |
| 14 | + |
| 15 | +@Document |
| 16 | +public class Member { |
| 17 | + |
| 18 | + @Id |
| 19 | + private String id; |
| 20 | + |
| 21 | + private String name; |
| 22 | + |
| 23 | + private String implicit; |
| 24 | + |
| 25 | + private Boolean typeBoolean; |
| 26 | + |
| 27 | + private Double typeDouble; |
| 28 | + |
| 29 | + private String typeString; |
| 30 | + |
| 31 | + private String[] stringArray; |
| 32 | + |
| 33 | + private float[] floatArray; |
| 34 | + |
| 35 | + |
| 36 | + // enum |
| 37 | + private MemberEnum memberEnum; |
| 38 | + |
| 39 | + // UUID |
| 40 | + private UUID uuid; |
| 41 | + |
| 42 | + // org.bson |
| 43 | + private Binary typeBinary; |
| 44 | + private ObjectId typeObjectId; |
| 45 | + private BSONTimestamp typeTimestamp; |
| 46 | + private Decimal128 typeDecimal128; |
| 47 | + |
| 48 | + |
| 49 | + // java.time & java.sql |
| 50 | + private Date typeDate; |
| 51 | + private LocalDate typeLocalDate; |
| 52 | + private LocalDateTime typeLocalDateTime; |
| 53 | + private LocalTime typeLocalTime; |
| 54 | + private Instant typeInstant; |
| 55 | + private ZonedDateTime typeZonedDateTime; |
| 56 | + private OffsetDateTime typeOffsetDateTime; |
| 57 | + |
| 58 | + |
| 59 | + // org.springframework.data.geo |
| 60 | + private Point typePoint; |
| 61 | + private Box typeBox; |
| 62 | + private Circle typeCircle; |
| 63 | + private Polygon typePolygon; |
| 64 | + |
| 65 | + // org.springframework.data.mongodb.core.geo |
| 66 | + private GeoJsonPoint typeGeoJsonPoint; |
| 67 | + private GeoJsonPolygon typeGeoJsonPolygon; |
| 68 | + private GeoJsonLineString typeGeoJsonLineString; |
| 69 | + private GeoJsonMultiPoint typeGeoJsonMultiPoint; |
| 70 | + private GeoJsonMultiPolygon typeGeoJsonMultiPolygon; |
| 71 | + private GeoJsonMultiLineString typeGeoJsonMultiLineString; |
| 72 | + |
| 73 | + // Collections |
| 74 | + private List<String> strings; |
| 75 | + private Set<Integer> integers; |
| 76 | + private List<Float> floats; |
| 77 | + private Collection<Long> longs; |
| 78 | + |
| 79 | + public String getId() { |
| 80 | + return id; |
| 81 | + } |
| 82 | + |
| 83 | + public String getName() { |
| 84 | + return name; |
| 85 | + } |
| 86 | + |
| 87 | + @Override |
| 88 | + public String toString() { |
| 89 | + return "Member{" + |
| 90 | + "id='" + id + '\'' + '\n' + |
| 91 | + ", name='" + name + '\'' + '\n' + |
| 92 | + ", implicit='" + implicit + '\'' + '\n' + |
| 93 | + ", typeBoolean=" + typeBoolean + '\n' + |
| 94 | + ", typeDouble=" + typeDouble + '\n' + |
| 95 | + ", typeString='" + typeString + '\'' + '\n' + |
| 96 | + ", stringArray=" + Arrays.toString(stringArray) + '\n' + |
| 97 | + ", floatArray=" + Arrays.toString(floatArray) + '\n' + |
| 98 | + ", memberEnum=" + memberEnum + '\n' + |
| 99 | + ", uuid=" + uuid + '\n' + |
| 100 | + ", typeBinary=" + typeBinary + '\n' + |
| 101 | + ", typeObjectId=" + typeObjectId + '\n' + |
| 102 | + ", typeTimestamp=" + typeTimestamp + '\n' + |
| 103 | + ", typeDecimal128=" + typeDecimal128 + '\n' + |
| 104 | + ", typeDate=" + typeDate + '\n' + |
| 105 | + ", typeLocalDate=" + typeLocalDate + '\n' + |
| 106 | + ", typeLocalDateTime=" + typeLocalDateTime + '\n' + |
| 107 | + ", typeLocalTime=" + typeLocalTime + '\n' + |
| 108 | + ", typeInstant=" + typeInstant + '\n' + |
| 109 | + ", typeZonedDateTime=" + typeZonedDateTime + '\n' + |
| 110 | + ", typeOffsetDateTime=" + typeOffsetDateTime + '\n' + |
| 111 | + ", typePoint=" + typePoint + '\n' + |
| 112 | + ", typeBox=" + typeBox + '\n' + |
| 113 | + ", typeCircle=" + typeCircle + '\n' + |
| 114 | + ", typePolygon=" + typePolygon + '\n' + |
| 115 | + ", typeGeoJsonPoint=" + typeGeoJsonPoint + '\n' + |
| 116 | + ", typeGeoJsonPolygon=" + typeGeoJsonPolygon + '\n' + |
| 117 | + ", typeGeoJsonLineString=" + typeGeoJsonLineString + '\n' + |
| 118 | + ", typeGeoJsonMultiPolygon=" + typeGeoJsonMultiPolygon + '\n' + |
| 119 | + ", typeGeoJsonMultiLineString=" + typeGeoJsonMultiLineString + '\n' + |
| 120 | + ", strings=" + strings + '\n' + |
| 121 | + ", integers=" + integers + '\n' + |
| 122 | + ", floats=" + floats + '\n' + |
| 123 | + ", longs=" + longs + |
| 124 | + '}'; |
| 125 | + } |
| 126 | +} |
0 commit comments