[BAEL-5355] code snippets for article - lukaswlodkowski (#12954)
* [BAEL-5355] code snippets for article * [BAEL-5355] fix tests naming convention * [BAEL-5355] try different Mongo configuration, previous one failed on Jenkins. * [BAEL-5355] try different Mongo configuration, previous one failed on Jenkins. * [BAEL-5355] try different Mongo configuration, previous one failed on Jenkins.
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
package com.baeldung.objectId;
|
||||
|
||||
import org.bson.types.ObjectId;
|
||||
|
||||
public class User {
|
||||
public static final String NAME_FIELD = "name";
|
||||
|
||||
private final ObjectId id;
|
||||
private final String name;
|
||||
|
||||
public User(ObjectId id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ObjectId getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user