BAEL-5363 Mongodb crud by date (#12293)

Created new mongo module, model, mongo client and unit test

Co-authored-by: Christian Jaimes <christian.jaimes@oracle>
Co-authored-by: bipster <openbip@gmail.com>
This commit is contained in:
chrisjaimes
2022-07-06 23:57:53 -04:00
committed by GitHub
parent 20c050ad31
commit f72cd0dee7
6 changed files with 336 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
package com.baeldung.mongo.crud.model;
import java.time.LocalDateTime;
public class Event {
public String title;
public String location;
public LocalDateTime dateTime;
public String timeZoneOffset;
public Event() {}
public Event(String title, String location, LocalDateTime dateTime) {
this.title = title;
this.location = location;
this.dateTime = dateTime;
}
public Event(String title, String location, LocalDateTime dateTime, String timeZoneOffset) {
this.title = title;
this.location = location;
this.dateTime = dateTime;
this.timeZoneOffset = timeZoneOffset;
}
@Override
public String toString() { return "\nEvent: " + title + "\nWhere: " + location + "\nWhen: " + dateTime; }
}