File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
src/main/java/com/otaviojava/demos/ddd Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1717import jakarta .enterprise .inject .se .SeContainerInitializer ;
1818import net .datafaker .Faker ;
1919import net .datafaker .providers .base .Commerce ;
20- import org .eclipse .jnosql .mapping .Database ;
2120import org .eclipse .jnosql .mapping .DatabaseQualifier ;
22- import org .eclipse .jnosql .mapping .Databases ;
2321
2422import java .util .List ;
2523import java .util .Set ;
@@ -40,7 +38,7 @@ public static void main(String[] args) {
4038 new Category ("category2" , "description2" ));
4139 Commerce commerce = faker .commerce ();
4240 Product product = new ProductBuilder ()
43- .id (UUID .randomUUID (). toString () )
41+ .id (UUID .randomUUID ())
4442 .name (commerce .productName ())
4543 .manufacturer (manufacturer )
4644 .tags (List .of ("tag1" , "tag2" ))
Original file line number Diff line number Diff line change 1313public class Product {
1414
1515 @ Id
16- private String id ;
16+ private UUID id ;
1717
1818 @ Column
1919 private String name ;
@@ -33,7 +33,7 @@ public class Product {
3333 Product () {
3434 }
3535
36- Product (String id , String name ,
36+ Product (UUID id , String name ,
3737 Manufacturer manufacturer ,
3838 List <String > tags ,
3939 Set <Category > categories ) {
@@ -44,7 +44,7 @@ public class Product {
4444 this .categories = categories ;
4545 }
4646
47- public String getId () {
47+ public UUID getId () {
4848 return id ;
4949 }
5050
Original file line number Diff line number Diff line change 22
33import java .util .List ;
44import java .util .Set ;
5+ import java .util .UUID ;
56
67public class ProductBuilder {
7- private String id ;
8+ private UUID id ;
89 private String name ;
910 private Manufacturer manufacturer ;
1011 private List <String > tags ;
1112 private Set <Category > categories ;
1213
13- public ProductBuilder id (String id ) {
14+ public ProductBuilder id (UUID id ) {
1415 this .id = id ;
1516 return this ;
1617 }
Original file line number Diff line number Diff line change 99# You may elect to redistribute this code under either of these licenses.
1010#
1111
12- jnosql.arangodb.host =localhost:8529
13- jnosql.document.database =products
12+
1413jnosql.keyvalue.database =products
14+ jnosql.document.database =products
15+ jnosql.oracle.nosql.host =http://localhost:8080
You can’t perform that action at this time.
0 commit comments