From 09c83ff0eff765042fc38201559663b7b3dbba77 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Thu, 2 Jan 2025 19:43:19 +0000 Subject: [PATCH] feat: update arangodb class structure Signed-off-by: Otavio Santana --- .../java/org/soujava/demos/arangodb/Form.java | 53 ------------------- .../java/org/soujava/demos/arangodb/Hero.java | 2 +- .../demos/arangodb/VillainService.java | 36 ------------- 3 files changed, 1 insertion(+), 90 deletions(-) delete mode 100644 src/main/java/org/soujava/demos/arangodb/Form.java delete mode 100644 src/main/java/org/soujava/demos/arangodb/VillainService.java diff --git a/src/main/java/org/soujava/demos/arangodb/Form.java b/src/main/java/org/soujava/demos/arangodb/Form.java deleted file mode 100644 index 6cf71f1..0000000 --- a/src/main/java/org/soujava/demos/arangodb/Form.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.soujava.demos.arangodb; - -import jakarta.nosql.Column; -import jakarta.nosql.Entity; -import jakarta.nosql.Id; - -import java.util.Map; - -@Entity -public class Form { - - @Id - private String id; - - @Column - private String option; - - @Column - private Map questions; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public Map getQuestions() { - return questions; - } - - public void setQuestions(Map questions) { - this.questions = questions; - } - - public String getOption() { - return option; - } - - public void setOption(String option) { - this.option = option; - } - - @Override - public String toString() { - return "Form{" + - "id='" + id + '\'' + - ", option='" + option + '\'' + - ", questions=" + questions + - '}'; - } -} diff --git a/src/main/java/org/soujava/demos/arangodb/Hero.java b/src/main/java/org/soujava/demos/arangodb/Hero.java index 289b719..8a385bd 100644 --- a/src/main/java/org/soujava/demos/arangodb/Hero.java +++ b/src/main/java/org/soujava/demos/arangodb/Hero.java @@ -8,7 +8,7 @@ * * You may elect to redistribute this code under either of these licenses. */ -package org.jnosql.demo.se; +package org.soujava.demos.arangodb; import jakarta.nosql.Column; import jakarta.nosql.Entity; diff --git a/src/main/java/org/soujava/demos/arangodb/VillainService.java b/src/main/java/org/soujava/demos/arangodb/VillainService.java deleted file mode 100644 index 9989150..0000000 --- a/src/main/java/org/soujava/demos/arangodb/VillainService.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2022 Contributors to the Eclipse Foundation - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * and Apache License v2.0 which accompanies this distribution. - * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html - * and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php. - * - * You may elect to redistribute this code under either of these licenses. - */ -package org.soujava.demos.arangodb; - - -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.inject.Inject; -import org.eclipse.jnosql.mapping.keyvalue.KeyValueTemplate; - -import java.util.Optional; - -@ApplicationScoped -public class VillainService { - - - @Inject - private KeyValueTemplate template; - - - public void put(Villain villain) { - template.put(villain); - } - - public Optional get(String name) { - return template.get(name, Villain.class); - } - -}