diff --git a/lombok.config b/lombok.config
deleted file mode 100644
index b94b2470c..000000000
--- a/lombok.config
+++ /dev/null
@@ -1,2 +0,0 @@
-lombok.nonNull.exceptionType = IllegalArgumentException
-
diff --git a/pom.xml b/pom.xml
index ff6c7c907..5b082e6a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -523,18 +523,6 @@
maven-jar-plugin
${maven-jar-plugin.version}
-
- org.projectlombok
- lombok-maven-plugin
-
-
-
- org.projectlombok
- lombok
- ${lombok}
-
-
-
org.codehaus.mojo
flatten-maven-plugin
diff --git a/src/test/java/org/springframework/data/neo4j/core/mapping/callback/ImmutableSample.java b/src/test/java/org/springframework/data/neo4j/core/mapping/callback/ImmutableSample.java
index 869c5f21b..856b9650b 100644
--- a/src/test/java/org/springframework/data/neo4j/core/mapping/callback/ImmutableSample.java
+++ b/src/test/java/org/springframework/data/neo4j/core/mapping/callback/ImmutableSample.java
@@ -15,27 +15,99 @@
*/
package org.springframework.data.neo4j.core.mapping.callback;
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
-import lombok.Value;
-import lombok.With;
-
-import java.util.Date;
-
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
+import java.util.Date;
+
/**
* @author Michael J. Simons
*/
-@Value
-@With
-@AllArgsConstructor
-@NoArgsConstructor(force = true)
-public class ImmutableSample {
+public final class ImmutableSample {
- @Id String id;
- @CreatedDate Date created;
- @LastModifiedDate Date modified;
+ @Id
+ private final String id;
+ @CreatedDate
+ private final Date created;
+ @LastModifiedDate
+ private final Date modified;
+
+ public ImmutableSample(String id, Date created, Date modified) {
+ this.id = id;
+ this.created = created;
+ this.modified = modified;
+ }
+
+ public ImmutableSample() {
+ this.id = null;
+ this.created = null;
+ this.modified = null;
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ public Date getCreated() {
+ return this.created;
+ }
+
+ public Date getModified() {
+ return this.modified;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof ImmutableSample)) {
+ return false;
+ }
+ final ImmutableSample other = (ImmutableSample) o;
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ final Object this$created = this.getCreated();
+ final Object other$created = other.getCreated();
+ if (this$created == null ? other$created != null : !this$created.equals(other$created)) {
+ return false;
+ }
+ final Object this$modified = this.getModified();
+ final Object other$modified = other.getModified();
+ if (this$modified == null ? other$modified != null : !this$modified.equals(other$modified)) {
+ return false;
+ }
+ return true;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ final Object $created = this.getCreated();
+ result = result * PRIME + ($created == null ? 43 : $created.hashCode());
+ final Object $modified = this.getModified();
+ result = result * PRIME + ($modified == null ? 43 : $modified.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "ImmutableSample(id=" + this.getId() + ", created=" + this.getCreated() + ", modified=" + this.getModified() + ")";
+ }
+
+ public ImmutableSample withId(String newId) {
+ return this.id == newId ? this : new ImmutableSample(newId, this.created, this.modified);
+ }
+
+ public ImmutableSample withCreated(Date newCreated) {
+ return this.created == newCreated ? this : new ImmutableSample(this.id, newCreated, this.modified);
+ }
+
+ public ImmutableSample withModified(Date newModified) {
+ return this.modified == newModified ? this : new ImmutableSample(this.id, this.created, newModified);
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/imperative/Neo4jTemplateIT.java b/src/test/java/org/springframework/data/neo4j/integration/imperative/Neo4jTemplateIT.java
index a9255d941..88c5796ce 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/imperative/Neo4jTemplateIT.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/imperative/Neo4jTemplateIT.java
@@ -15,23 +15,6 @@
*/
package org.springframework.data.neo4j.integration.imperative;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
-import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
-
-import lombok.Data;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.function.BiPredicate;
-import java.util.function.Function;
-
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.neo4j.cypherdsl.core.Cypher;
@@ -50,7 +33,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.IncorrectResultSizeDataAccessException;
import org.springframework.data.mapping.PropertyPath;
-import org.springframework.data.neo4j.test.Neo4jImperativeTestConfiguration;
import org.springframework.data.neo4j.core.DatabaseSelectionProvider;
import org.springframework.data.neo4j.core.Neo4jTemplate;
import org.springframework.data.neo4j.core.mapping.Neo4jPersistentProperty;
@@ -63,10 +45,26 @@ import org.springframework.data.neo4j.integration.shared.common.PersonWithAssign
import org.springframework.data.neo4j.integration.shared.common.ThingWithGeneratedId;
import org.springframework.data.neo4j.test.BookmarkCapture;
import org.springframework.data.neo4j.test.Neo4jExtension.Neo4jConnectionSupport;
+import org.springframework.data.neo4j.test.Neo4jImperativeTestConfiguration;
import org.springframework.data.neo4j.test.Neo4jIntegrationTest;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.BiPredicate;
+import java.util.function.Function;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
+
/**
* @author Gerrit Meier
* @author Michael J. Simons
@@ -354,14 +352,88 @@ class Neo4jTemplateIT {
return predicate;
}
- @Data
static class DtoPersonProjection {
- /** The ID is required in a project that should be saved. */
+ /**
+ * The ID is required in a project that should be saved.
+ */
private final Long id;
private String lastName;
private String firstName;
+
+ DtoPersonProjection(Long id) {
+ this.id = id;
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public String getLastName() {
+ return this.lastName;
+ }
+
+ public String getFirstName() {
+ return this.firstName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof DtoPersonProjection)) {
+ return false;
+ }
+ final DtoPersonProjection other = (DtoPersonProjection) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ final Object this$lastName = this.getLastName();
+ final Object other$lastName = other.getLastName();
+ if (this$lastName == null ? other$lastName != null : !this$lastName.equals(other$lastName)) {
+ return false;
+ }
+ final Object this$firstName = this.getFirstName();
+ final Object other$firstName = other.getFirstName();
+ if (this$firstName == null ? other$firstName != null : !this$firstName.equals(other$firstName)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof DtoPersonProjection;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ final Object $lastName = this.getLastName();
+ result = result * PRIME + ($lastName == null ? 43 : $lastName.hashCode());
+ final Object $firstName = this.getFirstName();
+ result = result * PRIME + ($firstName == null ? 43 : $firstName.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "Neo4jTemplateIT.DtoPersonProjection(id=" + this.getId() + ", lastName=" + this.getLastName() + ", firstName=" + this.getFirstName() + ")";
+ }
}
@Test // GH-2215
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/IssuesIT.java b/src/test/java/org/springframework/data/neo4j/integration/issues/IssuesIT.java
index acf11b869..84bd1105d 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/IssuesIT.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/IssuesIT.java
@@ -160,6 +160,7 @@ import org.springframework.data.neo4j.test.Neo4jImperativeTestConfiguration;
import org.springframework.data.neo4j.test.Neo4jIntegrationTest;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.transaction.annotation.Transactional;
/**
* @author Michael J. Simons
@@ -307,7 +308,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2415")
void saveWithProjectionImplementedByEntity(@Autowired Neo4jMappingContext mappingContext,
- @Autowired Neo4jTemplate neo4jTemplate) {
+ @Autowired Neo4jTemplate neo4jTemplate) {
Neo4jPersistentEntity> metaData = mappingContext.getPersistentEntity(BaseNodeEntity.class);
NodeEntity nodeEntity = neo4jTemplate
@@ -461,6 +462,7 @@ class IssuesIT extends TestBase {
});
}
+ @Transactional // otherwise the relationships will add up
@RepeatedTest(5)
@Tag("GH-2289")
@Tag("GH-2294")
@@ -534,7 +536,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2326")
void saveShouldAddAllLabels(@Autowired AnimalRepository animalRepository,
- @Autowired BookmarkCapture bookmarkCapture) {
+ @Autowired BookmarkCapture bookmarkCapture) {
List animals = Arrays.asList(new AbstractLevel2.AbstractLevel3.Concrete1(),
new AbstractLevel2.AbstractLevel3.Concrete2());
@@ -547,7 +549,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2326")
void saveAllShouldAddAllLabels(@Autowired AnimalRepository animalRepository,
- @Autowired BookmarkCapture bookmarkCapture) {
+ @Autowired BookmarkCapture bookmarkCapture) {
List animals = Arrays.asList(new AbstractLevel2.AbstractLevel3.Concrete1(),
new AbstractLevel2.AbstractLevel3.Concrete2());
@@ -718,7 +720,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2493")
void saveOneShouldWork(@Autowired Driver driver, @Autowired BookmarkCapture bookmarkCapture,
- @Autowired TestObjectRepository repository) {
+ @Autowired TestObjectRepository repository) {
TestObject testObject = new TestObject(new TestData(4711, "Foobar"));
testObject = repository.save(testObject);
@@ -730,7 +732,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2493")
void saveAllShouldWork(@Autowired Driver driver, @Autowired BookmarkCapture bookmarkCapture,
- @Autowired TestObjectRepository repository) {
+ @Autowired TestObjectRepository repository) {
TestObject testObject = new TestObject(new TestData(4711, "Foobar"));
testObject = repository.saveAll(Collections.singletonList(testObject)).get(0);
@@ -819,7 +821,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2533")
void projectionWorksForDynamicRelationshipsOnSave(@Autowired GH2533Repository repository,
- @Autowired Neo4jTemplate neo4jTemplate) {
+ @Autowired Neo4jTemplate neo4jTemplate) {
EntitiesAndProjections.GH2533Entity rootEntity = createData(repository);
rootEntity = repository.findByIdWithLevelOneLinks(rootEntity.id).get();
@@ -839,7 +841,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2533")
void saveRelatedEntityWithRelationships(@Autowired GH2533Repository repository,
- @Autowired Neo4jTemplate neo4jTemplate) {
+ @Autowired Neo4jTemplate neo4jTemplate) {
EntitiesAndProjections.GH2533Entity rootEntity = createData(repository);
neo4jTemplate.saveAs(rootEntity, EntitiesAndProjections.GH2533EntityWithRelationshipToEntity.class);
@@ -906,7 +908,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2576")
- void listOfMapsShouldBeUsableAsArguments(@Autowired Neo4jTemplate template, @Autowired CollegeRepository collegeRepository) {
+ void listOfMapsShouldBeUsableAsArguments(@Autowired Neo4jTemplate template, @Autowired CollegeRepository collegeRepository) {
var student = template.save(new Student("S1"));
var college = template.save(new College("C1"));
@@ -920,7 +922,7 @@ class IssuesIT extends TestBase {
@Test
@Tag("GH-2576")
- void listOfMapsShouldBeUsableAsArgumentsWithWorkaround(@Autowired Neo4jTemplate template, @Autowired CollegeRepository collegeRepository) {
+ void listOfMapsShouldBeUsableAsArgumentsWithWorkaround(@Autowired Neo4jTemplate template, @Autowired CollegeRepository collegeRepository) {
var student = template.save(new Student("S1"));
var college = template.save(new College("C1"));
@@ -997,7 +999,7 @@ class IssuesIT extends TestBase {
languageRelationships.add(perlRelationship);
Developer harry = new Developer("Harry", languageRelationships);
- List team = Arrays.asList(greg, roy, craig, harry);
+ List team = Arrays.asList(greg, roy, craig, harry);
Company acme = new Company("ACME", team);
companyRepository.save(acme);
@@ -1114,7 +1116,7 @@ class IssuesIT extends TestBase {
@Override
public PlatformTransactionManager transactionManager(Driver driver,
- DatabaseSelectionProvider databaseNameProvider) {
+ DatabaseSelectionProvider databaseNameProvider) {
BookmarkCapture bookmarkCapture = bookmarkCapture();
return new Neo4jTransactionManager(driver, databaseNameProvider,
@@ -1213,7 +1215,7 @@ class IssuesIT extends TestBase {
}
private static void assertThatTestObjectHasBeenCreated(Driver driver, BookmarkCapture bookmarkCapture,
- TestObject testObject) {
+ TestObject testObject) {
try (Session session = driver.session(bookmarkCapture.createSessionConfig())) {
Map arguments = new HashMap<>();
arguments.put("id", testObject.getId());
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/ReactiveIssuesIT.java b/src/test/java/org/springframework/data/neo4j/integration/issues/ReactiveIssuesIT.java
index 83c5f5561..ab5f84a20 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/ReactiveIssuesIT.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/ReactiveIssuesIT.java
@@ -17,6 +17,7 @@ package org.springframework.data.neo4j.integration.issues;
import static org.assertj.core.api.Assertions.assertThat;
+import org.junit.jupiter.api.BeforeEach;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
@@ -86,7 +87,6 @@ class ReactiveIssuesIT extends TestBase {
try (Transaction transaction = session.beginTransaction()) {
transaction.run("MATCH (n) detach delete n");
- setupGH2289(transaction);
setupGH2328(transaction);
setupGH2572(transaction);
@@ -96,6 +96,17 @@ class ReactiveIssuesIT extends TestBase {
}
}
+ @BeforeEach
+ void setup(@Autowired BookmarkCapture bookmarkCapture) {
+ try (Session session = neo4jConnectionSupport.getDriver().session(bookmarkCapture.createSessionConfig())) {
+ try (Transaction transaction = session.beginTransaction()) {
+ setupGH2289(transaction);
+ transaction.commit();
+ }
+ bookmarkCapture.seedWith(session.lastBookmarks());
+ }
+ }
+
@RepeatedTest(23)
@Tag("GH-2289")
void testNewRelation(@Autowired ReactiveSkuRepository skuRepo) {
@@ -204,7 +215,7 @@ class ReactiveIssuesIT extends TestBase {
@Test
@Tag("GH-2326")
void saveShouldAddAllLabels(@Autowired ReactiveAnimalRepository animalRepository,
- @Autowired BookmarkCapture bookmarkCapture) {
+ @Autowired BookmarkCapture bookmarkCapture) {
List ids = new ArrayList<>();
List animals = Arrays.asList(new AbstractLevel2.AbstractLevel3.Concrete1(),
@@ -222,7 +233,7 @@ class ReactiveIssuesIT extends TestBase {
@Test
@Tag("GH-2326")
void saveAllShouldAddAllLabels(@Autowired ReactiveAnimalRepository animalRepository,
- @Autowired BookmarkCapture bookmarkCapture) {
+ @Autowired BookmarkCapture bookmarkCapture) {
List ids = new ArrayList<>();
List animals = Arrays.asList(new AbstractLevel2.AbstractLevel3.Concrete1(),
@@ -314,7 +325,7 @@ class ReactiveIssuesIT extends TestBase {
@Test
@Tag("GH-2498")
void shouldNotDeleteFreshlyCreatedRelationships(@Autowired Driver driver, @Autowired
- ReactiveNeo4jTemplate template) {
+ ReactiveNeo4jTemplate template) {
Group group = new Group();
group.setName("test");
@@ -432,7 +443,7 @@ class ReactiveIssuesIT extends TestBase {
@Override
public ReactiveTransactionManager reactiveTransactionManager(Driver driver,
- ReactiveDatabaseSelectionProvider databaseSelectionProvider) {
+ ReactiveDatabaseSelectionProvider databaseSelectionProvider) {
BookmarkCapture bookmarkCapture = bookmarkCapture();
return new ReactiveNeo4jTransactionManager(driver, databaseSelectionProvider,
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/TestBase.java b/src/test/java/org/springframework/data/neo4j/integration/issues/TestBase.java
index 011745257..1acc9d595 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/TestBase.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/TestBase.java
@@ -48,7 +48,7 @@ abstract class TestBase {
@BeforeEach
protected final void beforeEach(@Autowired BookmarkCapture bookmarkCapture) {
try (Session session = neo4jConnectionSupport.getDriver().session(bookmarkCapture.createSessionConfig());
- Transaction transaction = session.beginTransaction()
+ Transaction transaction = session.beginTransaction()
) {
List labelsToDelete = List.of("AbstractBase", "AccountingMeasurementMeta", "Application",
"BaseNodeEntity", "CityModel", "ConcreteImplementationOne", "ConcreteImplementationTwo",
@@ -100,9 +100,10 @@ abstract class TestBase {
}
protected static void setupGH2289(QueryRunner queryRunner) {
+ queryRunner.run("MATCH (s:SKU_RO) DETACH DELETE s").consume();
for (int i = 0; i < 4; ++i) {
queryRunner.run("CREATE (s:SKU_RO {number: $i, name: $n})",
- Values.parameters("i", i, "n", new String(new char[] { (char) ('A' + i) }))).consume();
+ Values.parameters("i", i, "n", new String(new char[]{(char) ('A' + i)}))).consume();
}
}
@@ -170,7 +171,7 @@ abstract class TestBase {
}
protected static void assertSingleApplicationNodeWithMultipleWorkflows(Driver driver,
- BookmarkCapture bookmarkCapture) {
+ BookmarkCapture bookmarkCapture) {
try (Session session = driver.session(bookmarkCapture.createSessionConfig())) {
Record record = session.executeRead(
@@ -182,7 +183,7 @@ abstract class TestBase {
}
protected static void assertMultipleApplicationsNodeWithASingleWorkflow(Driver driver,
- BookmarkCapture bookmarkCapture) {
+ BookmarkCapture bookmarkCapture) {
try (Session session = driver.session(bookmarkCapture.createSessionConfig())) {
List records = session.executeRead(
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/events/EventsPublisherIT.java b/src/test/java/org/springframework/data/neo4j/integration/issues/events/EventsPublisherIT.java
index fa9a67123..86367f73e 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/events/EventsPublisherIT.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/events/EventsPublisherIT.java
@@ -15,17 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.events;
-import static org.assertj.core.api.Assertions.assertThat;
-
-import lombok.Data;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Optional;
-import java.util.concurrent.atomic.AtomicBoolean;
-
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.neo4j.driver.Driver;
@@ -52,6 +41,13 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalEventListener;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
/**
* @author Michael J. Simons
*/
@@ -73,7 +69,8 @@ class EventsPublisherIT {
static AtomicBoolean receivedAfterCommitEvent = new AtomicBoolean(false);
- @Test // GH-2580
+ @Test
+ // GH-2580
void beforeAndAfterCommitEventsShouldWork(@Autowired Neo4jObjectService service) {
service.save("foobar");
@@ -81,13 +78,15 @@ class EventsPublisherIT {
assertThat(receivedAfterCommitEvent).isTrue();
}
- @Slf4j
@Component
- @RequiredArgsConstructor
static class Neo4jObjectListener {
private final Neo4jObjectService service;
+ Neo4jObjectListener(Neo4jObjectService service) {
+ this.service = service;
+ }
+
@TransactionalEventListener(phase = TransactionPhase.BEFORE_COMMIT)
public void onBeforeCommit(Neo4jMessage message) {
Optional optionalNeo4jObject = service.findById(message.getMessageId());
@@ -139,9 +138,51 @@ class EventsPublisherIT {
}
}
- @Data
static class Neo4jMessage {
private final String messageId;
+
+ Neo4jMessage(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getMessageId() {
+ return this.messageId;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof Neo4jMessage)) {
+ return false;
+ }
+ final Neo4jMessage other = (Neo4jMessage) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$messageId = this.getMessageId();
+ final Object other$messageId = other.getMessageId();
+ if (this$messageId == null ? other$messageId != null : !this$messageId.equals(other$messageId)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof Neo4jMessage;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $messageId = this.getMessageId();
+ result = result * PRIME + ($messageId == null ? 43 : $messageId.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "EventsPublisherIT.Neo4jMessage(messageId=" + this.getMessageId() + ")";
+ }
}
@Repository
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/events/Neo4jObject.java b/src/test/java/org/springframework/data/neo4j/integration/issues/events/Neo4jObject.java
index 7367a7370..2c48bd24d 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/events/Neo4jObject.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/events/Neo4jObject.java
@@ -15,10 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.events;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;
@@ -26,13 +22,60 @@ import org.springframework.data.neo4j.core.schema.Property;
/**
* @author Michael J. Simons
*/
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
@Node(primaryLabel = "Neo4jObject")
public class Neo4jObject {
- @Id
- @Property(name = "id")
- private String id;
+ @Id
+ @Property(name = "id")
+ private String id;
+
+ public Neo4jObject(String id) {
+ this.id = id;
+ }
+
+ public Neo4jObject() {
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof Neo4jObject)) {
+ return false;
+ }
+ final Neo4jObject other = (Neo4jObject) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof Neo4jObject;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "Neo4jObject(id=" + this.getId() + ")";
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/events/Neo4jObjectService.java b/src/test/java/org/springframework/data/neo4j/integration/issues/events/Neo4jObjectService.java
index 1dc0a5c3d..1e4a14ce1 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/events/Neo4jObjectService.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/events/Neo4jObjectService.java
@@ -15,25 +15,27 @@
*/
package org.springframework.data.neo4j.integration.issues.events;
-import lombok.AllArgsConstructor;
-
-import java.util.Optional;
-
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import java.util.Optional;
+
/**
* @author Michael J. Simons
*/
@Service
@Transactional
-@AllArgsConstructor
public class Neo4jObjectService {
private final EventsPublisherIT.Neo4jObjectRepository neo4jObjectRepository;
private final ApplicationEventPublisher publisher;
+ public Neo4jObjectService(EventsPublisherIT.Neo4jObjectRepository neo4jObjectRepository, ApplicationEventPublisher publisher) {
+ this.neo4jObjectRepository = neo4jObjectRepository;
+ this.publisher = publisher;
+ }
+
public Optional findById(String id) {
return neo4jObjectRepository.findById(id);
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/DomainObject.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/DomainObject.java
index bac013094..a23279a9f 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/DomainObject.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/DomainObject.java
@@ -15,9 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2168;
-import lombok.Getter;
-import lombok.Setter;
-
import org.springframework.data.neo4j.core.convert.ConvertWith;
import org.springframework.data.neo4j.core.schema.CompositeProperty;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
@@ -29,8 +26,6 @@ import org.springframework.data.neo4j.core.schema.Property;
* @author Michael J. Simons
*/
@Node
-@Getter
-@Setter
public class DomainObject {
@Id
@@ -46,4 +41,36 @@ public class DomainObject {
@ConvertWith(converterRef = "converterBean")
private UnrelatedObject storedAsAnotherSingleProperty = new UnrelatedObject();
+
+ public String getId() {
+ return this.id;
+ }
+
+ public UnrelatedObject getStoredAsMultipleProperties() {
+ return this.storedAsMultipleProperties;
+ }
+
+ public UnrelatedObject getStoredAsSingleProperty() {
+ return this.storedAsSingleProperty;
+ }
+
+ public UnrelatedObject getStoredAsAnotherSingleProperty() {
+ return this.storedAsAnotherSingleProperty;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public void setStoredAsMultipleProperties(UnrelatedObject storedAsMultipleProperties) {
+ this.storedAsMultipleProperties = storedAsMultipleProperties;
+ }
+
+ public void setStoredAsSingleProperty(UnrelatedObject storedAsSingleProperty) {
+ this.storedAsSingleProperty = storedAsSingleProperty;
+ }
+
+ public void setStoredAsAnotherSingleProperty(UnrelatedObject storedAsAnotherSingleProperty) {
+ this.storedAsAnotherSingleProperty = storedAsAnotherSingleProperty;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/GeneratedValueStrategy.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/GeneratedValueStrategy.java
index f247ee9cd..f773c634f 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/GeneratedValueStrategy.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/GeneratedValueStrategy.java
@@ -27,6 +27,6 @@ public final class GeneratedValueStrategy implements IdGenerator {
@Override
public String generateId(String primaryLabel, Object entity) {
return "Please use something that one randomly create conflicting ids :) " +
- ThreadLocalRandom.current().nextLong();
+ ThreadLocalRandom.current().nextLong();
}
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/UnrelatedObject.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/UnrelatedObject.java
index 29d009588..df170d67c 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/UnrelatedObject.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2168/UnrelatedObject.java
@@ -15,14 +15,10 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2168;
-import lombok.Getter;
-import lombok.Setter;
-
/**
* @author Michael J. Simons
*/
-@Getter
-@Setter
+@SuppressWarnings("HiddenField")
public class UnrelatedObject {
private boolean aBooleanValue;
@@ -36,4 +32,20 @@ public class UnrelatedObject {
this.aBooleanValue = aBooleanValue;
this.aLongValue = aLongValue;
}
+
+ public boolean isABooleanValue() {
+ return this.aBooleanValue;
+ }
+
+ public Long getALongValue() {
+ return this.aLongValue;
+ }
+
+ public void setABooleanValue(boolean aBooleanValue) {
+ this.aBooleanValue = aBooleanValue;
+ }
+
+ public void setALongValue(Long aLongValue) {
+ this.aLongValue = aLongValue;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2244/Step.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2244/Step.java
index a40a4eb5b..c1fc7d735 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2244/Step.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2244/Step.java
@@ -25,7 +25,8 @@ import org.springframework.data.neo4j.core.schema.Node;
@Node
public abstract class Step {
- @Id @GeneratedValue
+ @Id
+ @GeneratedValue
private Long id;
public Long getId() {
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/RangeRelation.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/RangeRelation.java
index 1cde2f24d..f396b4851 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/RangeRelation.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/RangeRelation.java
@@ -15,8 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2289;
-import lombok.Data;
-
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.schema.RelationshipId;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
@@ -25,17 +23,20 @@ import org.springframework.data.neo4j.core.schema.TargetNode;
/**
* @author Michael J. Simons
*/
-@Data // lombok
@RelationshipProperties
public class RangeRelation {
@RelationshipId
private Long id;
- @Property private double minDelta;
- @Property private double maxDelta;
- @Property private RelationType relationType;
+ @Property
+ private double minDelta;
+ @Property
+ private double maxDelta;
+ @Property
+ private RelationType relationType;
- @TargetNode private Sku targetSku;
+ @TargetNode
+ private Sku targetSku;
public RangeRelation(Sku targetSku, double minDelta, double maxDelta, RelationType relationType) {
this.targetSku = targetSku;
@@ -43,4 +44,103 @@ public class RangeRelation {
this.maxDelta = maxDelta;
this.relationType = relationType;
}
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public double getMinDelta() {
+ return this.minDelta;
+ }
+
+ public double getMaxDelta() {
+ return this.maxDelta;
+ }
+
+ public RelationType getRelationType() {
+ return this.relationType;
+ }
+
+ public Sku getTargetSku() {
+ return this.targetSku;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setMinDelta(double minDelta) {
+ this.minDelta = minDelta;
+ }
+
+ public void setMaxDelta(double maxDelta) {
+ this.maxDelta = maxDelta;
+ }
+
+ public void setRelationType(RelationType relationType) {
+ this.relationType = relationType;
+ }
+
+ public void setTargetSku(Sku targetSku) {
+ this.targetSku = targetSku;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof RangeRelation)) {
+ return false;
+ }
+ final RangeRelation other = (RangeRelation) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ if (Double.compare(this.getMinDelta(), other.getMinDelta()) != 0) {
+ return false;
+ }
+ if (Double.compare(this.getMaxDelta(), other.getMaxDelta()) != 0) {
+ return false;
+ }
+ final Object this$relationType = this.getRelationType();
+ final Object other$relationType = other.getRelationType();
+ if (this$relationType == null ? other$relationType != null : !this$relationType.equals(other$relationType)) {
+ return false;
+ }
+ final Object this$targetSku = this.getTargetSku();
+ final Object other$targetSku = other.getTargetSku();
+ if (this$targetSku == null ? other$targetSku != null : !this$targetSku.equals(other$targetSku)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof RangeRelation;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ final long $minDelta = Double.doubleToLongBits(this.getMinDelta());
+ result = result * PRIME + (int) ($minDelta >>> 32 ^ $minDelta);
+ final long $maxDelta = Double.doubleToLongBits(this.getMaxDelta());
+ result = result * PRIME + (int) ($maxDelta >>> 32 ^ $maxDelta);
+ final Object $relationType = this.getRelationType();
+ result = result * PRIME + ($relationType == null ? 43 : $relationType.hashCode());
+ final Object $targetSku = this.getTargetSku();
+ result = result * PRIME + ($targetSku == null ? 43 : $targetSku.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "RangeRelation(id=" + this.getId() + ", minDelta=" + this.getMinDelta() + ", maxDelta=" + this.getMaxDelta() + ", relationType=" + this.getRelationType() + ", targetSku=" + this.getTargetSku() + ")";
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/RangeRelationRO.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/RangeRelationRO.java
index a50bab6b7..22e3e09db 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/RangeRelationRO.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/RangeRelationRO.java
@@ -15,9 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2289;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.schema.RelationshipId;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
@@ -26,19 +23,21 @@ import org.springframework.data.neo4j.core.schema.TargetNode;
/**
* @author Michael J. Simons
*/
-@Data // lombok
@RelationshipProperties
public class RangeRelationRO {
- @EqualsAndHashCode.Exclude
@RelationshipId
private Long id;
- @Property private double minDelta;
- @Property private double maxDelta;
- @Property private RelationType relationType;
+ @Property
+ private double minDelta;
+ @Property
+ private double maxDelta;
+ @Property
+ private RelationType relationType;
- @TargetNode private SkuRO targetSku;
+ @TargetNode
+ private SkuRO targetSku;
public RangeRelationRO(SkuRO targetSku, double minDelta, double maxDelta, RelationType relationType) {
this.targetSku = targetSku;
@@ -46,4 +45,103 @@ public class RangeRelationRO {
this.maxDelta = maxDelta;
this.relationType = relationType;
}
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public double getMinDelta() {
+ return this.minDelta;
+ }
+
+ public double getMaxDelta() {
+ return this.maxDelta;
+ }
+
+ public RelationType getRelationType() {
+ return this.relationType;
+ }
+
+ public SkuRO getTargetSku() {
+ return this.targetSku;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setMinDelta(double minDelta) {
+ this.minDelta = minDelta;
+ }
+
+ public void setMaxDelta(double maxDelta) {
+ this.maxDelta = maxDelta;
+ }
+
+ public void setRelationType(RelationType relationType) {
+ this.relationType = relationType;
+ }
+
+ public void setTargetSku(SkuRO targetSku) {
+ this.targetSku = targetSku;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof RangeRelationRO)) {
+ return false;
+ }
+ final RangeRelationRO other = (RangeRelationRO) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ if (Double.compare(this.getMinDelta(), other.getMinDelta()) != 0) {
+ return false;
+ }
+ if (Double.compare(this.getMaxDelta(), other.getMaxDelta()) != 0) {
+ return false;
+ }
+ final Object this$relationType = this.getRelationType();
+ final Object other$relationType = other.getRelationType();
+ if (this$relationType == null ? other$relationType != null : !this$relationType.equals(other$relationType)) {
+ return false;
+ }
+ final Object this$targetSku = this.getTargetSku();
+ final Object other$targetSku = other.getTargetSku();
+ if (this$targetSku == null ? other$targetSku != null : !this$targetSku.equals(other$targetSku)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof RangeRelationRO;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ final long $minDelta = Double.doubleToLongBits(this.getMinDelta());
+ result = result * PRIME + (int) ($minDelta >>> 32 ^ $minDelta);
+ final long $maxDelta = Double.doubleToLongBits(this.getMaxDelta());
+ result = result * PRIME + (int) ($maxDelta >>> 32 ^ $maxDelta);
+ final Object $relationType = this.getRelationType();
+ result = result * PRIME + ($relationType == null ? 43 : $relationType.hashCode());
+ final Object $targetSku = this.getTargetSku();
+ result = result * PRIME + ($targetSku == null ? 43 : $targetSku.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "RangeRelationRO(id=" + this.getId() + ", minDelta=" + this.getMinDelta() + ", maxDelta=" + this.getMaxDelta() + ", relationType=" + this.getRelationType() + ", targetSku=" + this.getTargetSku() + ")";
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/Sku.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/Sku.java
index e4a380892..9e96e7b97 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/Sku.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/Sku.java
@@ -15,27 +15,23 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2289;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.HashSet;
-import java.util.Set;
-
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.schema.Relationship;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* @author Michael J. Simons
*/
@Node("SKU")
-@Getter // lombok
-@Setter
public class Sku {
- @Id @GeneratedValue
+ @Id
+ @GeneratedValue
private Long id;
@Property("number")
@@ -71,4 +67,44 @@ public class Sku {
", name='" + name +
'}';
}
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public Long getNumber() {
+ return this.number;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Set getRangeRelationsOut() {
+ return this.rangeRelationsOut;
+ }
+
+ public Set getRangeRelationsIn() {
+ return this.rangeRelationsIn;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setNumber(Long number) {
+ this.number = number;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setRangeRelationsOut(Set rangeRelationsOut) {
+ this.rangeRelationsOut = rangeRelationsOut;
+ }
+
+ public void setRangeRelationsIn(Set rangeRelationsIn) {
+ this.rangeRelationsIn = rangeRelationsIn;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/SkuRO.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/SkuRO.java
index df1f88d93..0825602f8 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/SkuRO.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2289/SkuRO.java
@@ -15,13 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2289;
-import lombok.EqualsAndHashCode;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.HashSet;
-import java.util.Set;
-
import org.springframework.data.annotation.ReadOnlyProperty;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
@@ -29,25 +22,23 @@ import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.schema.Relationship;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* @author Michael J. Simons
*/
@Node("SKU_RO")
-@Getter // lombok
-@Setter
-@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public class SkuRO {
- @Id @GeneratedValue
- @EqualsAndHashCode.Include
+ @Id
+ @GeneratedValue
private Long id;
@Property("number")
- @EqualsAndHashCode.Include
private Long number;
@Property(value = "name", readOnly = true)
- @EqualsAndHashCode.Include
private String name;
@Relationship(type = "RANGE_RELATION_TO", direction = Relationship.Direction.OUTGOING)
@@ -67,4 +58,89 @@ public class SkuRO {
rangeRelationsOut.add(relationOut);
return relationOut;
}
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public Long getNumber() {
+ return this.number;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Set getRangeRelationsOut() {
+ return this.rangeRelationsOut;
+ }
+
+ public Set getRangeRelationsIn() {
+ return this.rangeRelationsIn;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setNumber(Long number) {
+ this.number = number;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setRangeRelationsOut(Set rangeRelationsOut) {
+ this.rangeRelationsOut = rangeRelationsOut;
+ }
+
+ public void setRangeRelationsIn(Set rangeRelationsIn) {
+ this.rangeRelationsIn = rangeRelationsIn;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof SkuRO)) {
+ return false;
+ }
+ final SkuRO other = (SkuRO) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ final Object this$number = this.getNumber();
+ final Object other$number = other.getNumber();
+ if (this$number == null ? other$number != null : !this$number.equals(other$number)) {
+ return false;
+ }
+ final Object this$name = this.getName();
+ final Object other$name = other.getName();
+ if (this$name == null ? other$name != null : !this$name.equals(other$name)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof SkuRO;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ final Object $number = this.getNumber();
+ result = result * PRIME + ($number == null ? 43 : $number.hashCode());
+ final Object $name = this.getName();
+ result = result * PRIME + ($name == null ? 43 : $name.hashCode());
+ return result;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2323/Person.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2323/Person.java
index 3a2514c20..69b4573d1 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2323/Person.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2323/Person.java
@@ -29,7 +29,8 @@ import org.springframework.data.neo4j.core.schema.Relationship;
@Node
public class Person {
- @Id @GeneratedValue(GeneratedValue.UUIDGenerator.class)
+ @Id
+ @GeneratedValue(GeneratedValue.UUIDGenerator.class)
private String id;
private final String name;
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2326/BaseEntity.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2326/BaseEntity.java
index f5b1d53de..841052beb 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2326/BaseEntity.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2326/BaseEntity.java
@@ -24,7 +24,8 @@ import org.springframework.data.neo4j.core.support.UUIDStringGenerator;
*/
public abstract class BaseEntity {
- @Id @GeneratedValue(UUIDStringGenerator.class)
+ @Id
+ @GeneratedValue(UUIDStringGenerator.class)
private String id;
public String getId() {
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2328/Entity2328.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2328/Entity2328.java
index 5e5454c52..20ae3bc77 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2328/Entity2328.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2328/Entity2328.java
@@ -15,26 +15,34 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2328;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-
-import java.util.UUID;
-
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
+import java.util.UUID;
+
/**
* @author Michael J. Simons
* @soundtrack Motörhead - Better Motörhead Than Dead - Live At Hammersmith
*/
@Node
-@Getter
-@RequiredArgsConstructor
public class Entity2328 {
- @Id @GeneratedValue
+ @Id
+ @GeneratedValue
private UUID id;
private final String name;
+
+ public Entity2328(String name) {
+ this.name = name;
+ }
+
+ public UUID getId() {
+ return this.id;
+ }
+
+ public String getName() {
+ return this.name;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/BaseNodeEntity.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/BaseNodeEntity.java
index b64b5321f..eef751d6e 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/BaseNodeEntity.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/BaseNodeEntity.java
@@ -15,14 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2415;
-import lombok.AccessLevel;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-import lombok.experimental.NonFinal;
-import lombok.experimental.SuperBuilder;
-
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
@@ -31,24 +23,132 @@ import org.springframework.data.neo4j.core.support.UUIDStringGenerator;
/**
* @author Andreas Berger
*/
+@SuppressWarnings("HiddenField")
@Node
-@NonFinal
-@Data
-@Setter(AccessLevel.PRIVATE)
-@NoArgsConstructor(access = AccessLevel.PROTECTED)
-@EqualsAndHashCode(onlyExplicitlyIncluded = true)
-@SuperBuilder(toBuilder = true)
public class BaseNodeEntity {
@Id
@GeneratedValue(UUIDStringGenerator.class)
- @EqualsAndHashCode.Include
private String nodeId;
private String name;
+ protected BaseNodeEntity() {
+ }
+
+ protected BaseNodeEntity(BaseNodeEntityBuilder, ?> b) {
+ this.nodeId = b.nodeId;
+ this.name = b.name;
+ }
+
+ public static BaseNodeEntityBuilder, ?> builder() {
+ return new BaseNodeEntityBuilderImpl();
+ }
+
@Override
public String toString() {
return getClass().getSimpleName() + " - " + getName() + " (" + getNodeId() + ")";
}
+
+ public String getNodeId() {
+ return this.nodeId;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ private void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ private void setName(String name) {
+ this.name = name;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof BaseNodeEntity)) {
+ return false;
+ }
+ final BaseNodeEntity other = (BaseNodeEntity) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$nodeId = this.getNodeId();
+ final Object other$nodeId = other.getNodeId();
+ if (this$nodeId == null ? other$nodeId != null : !this$nodeId.equals(other$nodeId)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof BaseNodeEntity;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $nodeId = this.getNodeId();
+ result = result * PRIME + ($nodeId == null ? 43 : $nodeId.hashCode());
+ return result;
+ }
+
+ public BaseNodeEntityBuilder, ?> toBuilder() {
+ return new BaseNodeEntityBuilderImpl().$fillValuesFrom(this);
+ }
+
+ /**
+ * the builder
+ * @param needed c type
+ * @param needed b type
+ */
+ public static abstract class BaseNodeEntityBuilder> {
+ private String nodeId;
+ private String name;
+
+ private static void $fillValuesFromInstanceIntoBuilder(BaseNodeEntity instance, BaseNodeEntityBuilder, ?> b) {
+ b.nodeId(instance.nodeId);
+ b.name(instance.name);
+ }
+
+ public B nodeId(String nodeId) {
+ this.nodeId = nodeId;
+ return self();
+ }
+
+ public B name(String name) {
+ this.name = name;
+ return self();
+ }
+
+ protected B $fillValuesFrom(C instance) {
+ BaseNodeEntityBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
+ return self();
+ }
+
+ protected abstract B self();
+
+ public abstract C build();
+
+ public String toString() {
+ return "BaseNodeEntity.BaseNodeEntityBuilder(nodeId=" + this.nodeId + ", name=" + this.name + ")";
+ }
+ }
+
+ private static final class BaseNodeEntityBuilderImpl extends BaseNodeEntityBuilder {
+ private BaseNodeEntityBuilderImpl() {
+ }
+
+ protected BaseNodeEntityBuilderImpl self() {
+ return this;
+ }
+
+ public BaseNodeEntity build() {
+ return new BaseNodeEntity(this);
+ }
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/Credential.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/Credential.java
index a3eaa05f1..1ecf93ae8 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/Credential.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/Credential.java
@@ -15,37 +15,113 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2415;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.With;
-
+import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.data.annotation.Immutable;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.support.UUIDStringGenerator;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
/**
* @author Andreas Berger
*/
+@SuppressWarnings("HiddenField")
@Node
-@Value
-@With
-@AllArgsConstructor
-@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@Immutable
-@Builder(toBuilder = true)
-public class Credential {
+public final class Credential {
@JsonIgnore
@Id
@GeneratedValue(UUIDStringGenerator.class)
- @EqualsAndHashCode.Include
+ private final
String id;
- String name;
+ private final String name;
+
+ public Credential(String id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public static CredentialBuilder builder() {
+ return new CredentialBuilder();
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String toString() {
+ return "Credential(id=" + this.getId() + ", name=" + this.getName() + ")";
+ }
+
+ public Credential withId(String id) {
+ return this.id == id ? this : new Credential(id, this.name);
+ }
+
+ public Credential withName(String name) {
+ return this.name == name ? this : new Credential(this.id, name);
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof Credential)) {
+ return false;
+ }
+ final Credential other = (Credential) o;
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ return true;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ return result;
+ }
+
+ public CredentialBuilder toBuilder() {
+ return new CredentialBuilder().id(this.id).name(this.name);
+ }
+
+ /**
+ * the builder
+ */
+ public static class CredentialBuilder {
+ private String id;
+ private String name;
+
+ CredentialBuilder() {
+ }
+
+ @JsonIgnore
+ public CredentialBuilder id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ public CredentialBuilder name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public Credential build() {
+ return new Credential(this.id, this.name);
+ }
+
+ public String toString() {
+ return "Credential.CredentialBuilder(id=" + this.id + ", name=" + this.name + ")";
+ }
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/NodeEntity.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/NodeEntity.java
index 4eb46fb25..b4c3a1fa0 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/NodeEntity.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2415/NodeEntity.java
@@ -15,29 +15,17 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2415;
-import lombok.AccessLevel;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-import lombok.experimental.SuperBuilder;
-
-import java.util.Set;
-
+import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.Set;
/**
* @author Andreas Berger
*/
+@SuppressWarnings("HiddenField")
@Node
-@Data
-@Setter(AccessLevel.PRIVATE)
-@NoArgsConstructor(access = AccessLevel.PROTECTED)
-@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
-@SuperBuilder(toBuilder = true)
public class NodeEntity extends BaseNodeEntity implements NodeWithDefinedCredentials {
@JsonIgnore
@@ -47,8 +35,121 @@ public class NodeEntity extends BaseNodeEntity implements NodeWithDefinedCredent
@Relationship(type = "HAS_CREDENTIAL")
private Set definedCredentials;
+ protected NodeEntity() {
+ }
+
+ protected NodeEntity(NodeEntityBuilder, ?> b) {
+ super(b);
+ this.children = b.children;
+ this.definedCredentials = b.definedCredentials;
+ }
+
+ public static NodeEntityBuilder, ?> builder() {
+ return new NodeEntityBuilderImpl();
+ }
+
@Override
public String toString() {
return super.toString();
}
+
+ public Set getChildren() {
+ return this.children;
+ }
+
+ public Set getDefinedCredentials() {
+ return this.definedCredentials;
+ }
+
+ @JsonIgnore
+ private void setChildren(Set children) {
+ this.children = children;
+ }
+
+ private void setDefinedCredentials(Set definedCredentials) {
+ this.definedCredentials = definedCredentials;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof NodeEntity)) {
+ return false;
+ }
+ final NodeEntity other = (NodeEntity) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof NodeEntity;
+ }
+
+ public int hashCode() {
+ int result = super.hashCode();
+ return result;
+ }
+
+ public NodeEntityBuilder, ?> toBuilder() {
+ return new NodeEntityBuilderImpl().$fillValuesFrom(this);
+ }
+
+ /**
+ * the builder
+ * @param needed c type
+ * @param needed b type
+ */
+ public static abstract class NodeEntityBuilder> extends BaseNodeEntityBuilder {
+ private Set children;
+ private Set definedCredentials;
+
+ private static void $fillValuesFromInstanceIntoBuilder(NodeEntity instance, NodeEntityBuilder, ?> b) {
+ b.children(instance.children);
+ b.definedCredentials(instance.definedCredentials);
+ }
+
+ @JsonIgnore
+ public B children(Set children) {
+ this.children = children;
+ return self();
+ }
+
+ public B definedCredentials(Set definedCredentials) {
+ this.definedCredentials = definedCredentials;
+ return self();
+ }
+
+ protected B $fillValuesFrom(C instance) {
+ super.$fillValuesFrom(instance);
+ NodeEntityBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
+ return self();
+ }
+
+ protected abstract B self();
+
+ public abstract C build();
+
+ public String toString() {
+ return "NodeEntity.NodeEntityBuilder(super=" + super.toString() + ", children=" + this.children + ", definedCredentials=" + this.definedCredentials + ")";
+ }
+ }
+
+ private static final class NodeEntityBuilderImpl extends NodeEntityBuilder {
+ private NodeEntityBuilderImpl() {
+ }
+
+ protected NodeEntityBuilderImpl self() {
+ return this;
+ }
+
+ public NodeEntity build() {
+ return new NodeEntity(this);
+ }
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2459/PetOwner.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2459/PetOwner.java
index 556dd780d..a432363bc 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2459/PetOwner.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2459/PetOwner.java
@@ -15,26 +15,37 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2459;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
+import java.util.List;
+
/**
* Labels are written out on purpose for the test.
*
* @author Gerrit Meier
*/
@Node("PetOwner")
-@Getter
-@Setter
public abstract class PetOwner {
@Id
private String uuid;
@Relationship(type = "hasPet")
private List pets;
+
+ public String getUuid() {
+ return this.uuid;
+ }
+
+ public List getPets() {
+ return this.pets;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public void setPets(List pets) {
+ this.pets = pets;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModel.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModel.java
index 0a0e19be5..27e407480 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModel.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModel.java
@@ -15,23 +15,20 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2474;
-import lombok.Data;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.schema.Relationship;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
/**
* @author Stephen Jackson
*/
@Node
-@Data
public class CityModel {
@Id
@GeneratedValue(generatorClass = GeneratedValue.UUIDGenerator.class)
@@ -50,4 +47,125 @@ public class CityModel {
@Property("exotic.property")
private String exoticProperty;
+
+ public CityModel() {
+ }
+
+ public UUID getCityId() {
+ return this.cityId;
+ }
+
+ public PersonModel getMayor() {
+ return this.mayor;
+ }
+
+ public List getCitizens() {
+ return this.citizens;
+ }
+
+ public List getCityEmployees() {
+ return this.cityEmployees;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getExoticProperty() {
+ return this.exoticProperty;
+ }
+
+ public void setCityId(UUID cityId) {
+ this.cityId = cityId;
+ }
+
+ public void setMayor(PersonModel mayor) {
+ this.mayor = mayor;
+ }
+
+ public void setCitizens(List citizens) {
+ this.citizens = citizens;
+ }
+
+ public void setCityEmployees(List cityEmployees) {
+ this.cityEmployees = cityEmployees;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setExoticProperty(String exoticProperty) {
+ this.exoticProperty = exoticProperty;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof CityModel)) {
+ return false;
+ }
+ final CityModel other = (CityModel) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$cityId = this.getCityId();
+ final Object other$cityId = other.getCityId();
+ if (this$cityId == null ? other$cityId != null : !this$cityId.equals(other$cityId)) {
+ return false;
+ }
+ final Object this$mayor = this.getMayor();
+ final Object other$mayor = other.getMayor();
+ if (this$mayor == null ? other$mayor != null : !this$mayor.equals(other$mayor)) {
+ return false;
+ }
+ final Object this$citizens = this.getCitizens();
+ final Object other$citizens = other.getCitizens();
+ if (this$citizens == null ? other$citizens != null : !this$citizens.equals(other$citizens)) {
+ return false;
+ }
+ final Object this$cityEmployees = this.getCityEmployees();
+ final Object other$cityEmployees = other.getCityEmployees();
+ if (this$cityEmployees == null ? other$cityEmployees != null : !this$cityEmployees.equals(other$cityEmployees)) {
+ return false;
+ }
+ final Object this$name = this.getName();
+ final Object other$name = other.getName();
+ if (this$name == null ? other$name != null : !this$name.equals(other$name)) {
+ return false;
+ }
+ final Object this$exoticProperty = this.getExoticProperty();
+ final Object other$exoticProperty = other.getExoticProperty();
+ if (this$exoticProperty == null ? other$exoticProperty != null : !this$exoticProperty.equals(other$exoticProperty)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof CityModel;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $cityId = this.getCityId();
+ result = result * PRIME + ($cityId == null ? 43 : $cityId.hashCode());
+ final Object $mayor = this.getMayor();
+ result = result * PRIME + ($mayor == null ? 43 : $mayor.hashCode());
+ final Object $citizens = this.getCitizens();
+ result = result * PRIME + ($citizens == null ? 43 : $citizens.hashCode());
+ final Object $cityEmployees = this.getCityEmployees();
+ result = result * PRIME + ($cityEmployees == null ? 43 : $cityEmployees.hashCode());
+ final Object $name = this.getName();
+ result = result * PRIME + ($name == null ? 43 : $name.hashCode());
+ final Object $exoticProperty = this.getExoticProperty();
+ result = result * PRIME + ($exoticProperty == null ? 43 : $exoticProperty.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "CityModel(cityId=" + this.getCityId() + ", mayor=" + this.getMayor() + ", citizens=" + this.getCitizens() + ", cityEmployees=" + this.getCityEmployees() + ", name=" + this.getName() + ", exoticProperty=" + this.getExoticProperty() + ")";
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModelDTO.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModelDTO.java
index 0bf765c7a..6ae69e79a 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModelDTO.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModelDTO.java
@@ -15,8 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2474;
-import lombok.Data;
-
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@@ -24,7 +22,6 @@ import java.util.UUID;
/**
* @author Stephen Jackson
*/
-@Data
public class CityModelDTO {
private UUID cityId;
private String name;
@@ -34,19 +31,230 @@ public class CityModelDTO {
public List citizens = new ArrayList<>();
public List cityEmployees = new ArrayList<>();
- /**
- * Nested projection
- */
- @Data
- public static class PersonModelDTO {
- private UUID personId;
+ public CityModelDTO() {
+ }
+
+ public UUID getCityId() {
+ return this.cityId;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getExoticProperty() {
+ return this.exoticProperty;
+ }
+
+ public PersonModelDTO getMayor() {
+ return this.mayor;
+ }
+
+ public List getCitizens() {
+ return this.citizens;
+ }
+
+ public List getCityEmployees() {
+ return this.cityEmployees;
+ }
+
+ public void setCityId(UUID cityId) {
+ this.cityId = cityId;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setExoticProperty(String exoticProperty) {
+ this.exoticProperty = exoticProperty;
+ }
+
+ public void setMayor(PersonModelDTO mayor) {
+ this.mayor = mayor;
+ }
+
+ public void setCitizens(List citizens) {
+ this.citizens = citizens;
+ }
+
+ public void setCityEmployees(List cityEmployees) {
+ this.cityEmployees = cityEmployees;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof CityModelDTO)) {
+ return false;
+ }
+ final CityModelDTO other = (CityModelDTO) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$cityId = this.getCityId();
+ final Object other$cityId = other.getCityId();
+ if (this$cityId == null ? other$cityId != null : !this$cityId.equals(other$cityId)) {
+ return false;
+ }
+ final Object this$name = this.getName();
+ final Object other$name = other.getName();
+ if (this$name == null ? other$name != null : !this$name.equals(other$name)) {
+ return false;
+ }
+ final Object this$exoticProperty = this.getExoticProperty();
+ final Object other$exoticProperty = other.getExoticProperty();
+ if (this$exoticProperty == null ? other$exoticProperty != null : !this$exoticProperty.equals(other$exoticProperty)) {
+ return false;
+ }
+ final Object this$mayor = this.getMayor();
+ final Object other$mayor = other.getMayor();
+ if (this$mayor == null ? other$mayor != null : !this$mayor.equals(other$mayor)) {
+ return false;
+ }
+ final Object this$citizens = this.getCitizens();
+ final Object other$citizens = other.getCitizens();
+ if (this$citizens == null ? other$citizens != null : !this$citizens.equals(other$citizens)) {
+ return false;
+ }
+ final Object this$cityEmployees = this.getCityEmployees();
+ final Object other$cityEmployees = other.getCityEmployees();
+ if (this$cityEmployees == null ? other$cityEmployees != null : !this$cityEmployees.equals(other$cityEmployees)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof CityModelDTO;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $cityId = this.getCityId();
+ result = result * PRIME + ($cityId == null ? 43 : $cityId.hashCode());
+ final Object $name = this.getName();
+ result = result * PRIME + ($name == null ? 43 : $name.hashCode());
+ final Object $exoticProperty = this.getExoticProperty();
+ result = result * PRIME + ($exoticProperty == null ? 43 : $exoticProperty.hashCode());
+ final Object $mayor = this.getMayor();
+ result = result * PRIME + ($mayor == null ? 43 : $mayor.hashCode());
+ final Object $citizens = this.getCitizens();
+ result = result * PRIME + ($citizens == null ? 43 : $citizens.hashCode());
+ final Object $cityEmployees = this.getCityEmployees();
+ result = result * PRIME + ($cityEmployees == null ? 43 : $cityEmployees.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "CityModelDTO(cityId=" + this.getCityId() + ", name=" + this.getName() + ", exoticProperty=" + this.getExoticProperty() + ", mayor=" + this.getMayor() + ", citizens=" + this.getCitizens() + ", cityEmployees=" + this.getCityEmployees() + ")";
+ }
+
+ /**
+ * Nested projection
+ */
+ public static class PersonModelDTO {
+ private UUID personId;
+
+ public PersonModelDTO() {
+ }
+
+ public UUID getPersonId() {
+ return this.personId;
+ }
+
+ public void setPersonId(UUID personId) {
+ this.personId = personId;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof PersonModelDTO)) {
+ return false;
+ }
+ final PersonModelDTO other = (PersonModelDTO) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$personId = this.getPersonId();
+ final Object other$personId = other.getPersonId();
+ if (this$personId == null ? other$personId != null : !this$personId.equals(other$personId)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof PersonModelDTO;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $personId = this.getPersonId();
+ result = result * PRIME + ($personId == null ? 43 : $personId.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "CityModelDTO.PersonModelDTO(personId=" + this.getPersonId() + ")";
+ }
}
/**
* Nested projection
*/
- @Data
public static class JobRelationshipDTO {
private PersonModelDTO person;
+
+ public JobRelationshipDTO() {
+ }
+
+ public PersonModelDTO getPerson() {
+ return this.person;
+ }
+
+ public void setPerson(PersonModelDTO person) {
+ this.person = person;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof JobRelationshipDTO)) {
+ return false;
+ }
+ final JobRelationshipDTO other = (JobRelationshipDTO) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$person = this.getPerson();
+ final Object other$person = other.getPerson();
+ if (this$person == null ? other$person != null : !this$person.equals(other$person)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof JobRelationshipDTO;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $person = this.getPerson();
+ result = result * PRIME + ($person == null ? 43 : $person.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "CityModelDTO.JobRelationshipDTO(person=" + this.getPerson() + ")";
+ }
}
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModelRepository.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModelRepository.java
index 42a28c077..71b7777ad 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModelRepository.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/CityModelRepository.java
@@ -32,8 +32,8 @@ public interface CityModelRepository extends Neo4jRepository {
Optional findByCityId(UUID cityId);
@Query(""
- + "MATCH (n:CityModel)"
- + "RETURN n :#{orderBy(#sort)}")
+ + "MATCH (n:CityModel)"
+ + "RETURN n :#{orderBy(#sort)}")
List customQuery(Sort sort);
long deleteAllByExoticProperty(String property);
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/JobRelationship.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/JobRelationship.java
index d6f057a0d..38456487f 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/JobRelationship.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/JobRelationship.java
@@ -15,7 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2474;
-import lombok.Data;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
@@ -25,14 +24,89 @@ import org.springframework.data.neo4j.core.schema.TargetNode;
* @author Stephen Jackson
*/
@RelationshipProperties
-@Data
public class JobRelationship {
- @Id
- @GeneratedValue
- private Long id;
+ @Id
+ @GeneratedValue
+ private Long id;
- @TargetNode
- private PersonModel person;
+ @TargetNode
+ private PersonModel person;
- private String jobTitle;
+ private String jobTitle;
+
+ public JobRelationship() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public PersonModel getPerson() {
+ return this.person;
+ }
+
+ public String getJobTitle() {
+ return this.jobTitle;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setPerson(PersonModel person) {
+ this.person = person;
+ }
+
+ public void setJobTitle(String jobTitle) {
+ this.jobTitle = jobTitle;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof JobRelationship)) {
+ return false;
+ }
+ final JobRelationship other = (JobRelationship) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ final Object this$person = this.getPerson();
+ final Object other$person = other.getPerson();
+ if (this$person == null ? other$person != null : !this$person.equals(other$person)) {
+ return false;
+ }
+ final Object this$jobTitle = this.getJobTitle();
+ final Object other$jobTitle = other.getJobTitle();
+ if (this$jobTitle == null ? other$jobTitle != null : !this$jobTitle.equals(other$jobTitle)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof JobRelationship;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ final Object $person = this.getPerson();
+ result = result * PRIME + ($person == null ? 43 : $person.hashCode());
+ final Object $jobTitle = this.getJobTitle();
+ result = result * PRIME + ($jobTitle == null ? 43 : $jobTitle.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "JobRelationship(id=" + this.getId() + ", person=" + this.getPerson() + ", jobTitle=" + this.getJobTitle() + ")";
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/PersonModel.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/PersonModel.java
index 528009026..53156414e 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/PersonModel.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2474/PersonModel.java
@@ -15,19 +15,16 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2474;
-import lombok.Data;
-
-import java.util.UUID;
-
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
+import java.util.UUID;
+
/**
* @author Stephen Jackson
*/
@Node
-@Data
public class PersonModel {
@Id
@GeneratedValue(generatorClass = GeneratedValue.UUIDGenerator.class)
@@ -36,4 +33,95 @@ public class PersonModel {
private String address;
private String name;
private String favoriteFood;
+
+ public PersonModel() {
+ }
+
+ public UUID getPersonId() {
+ return this.personId;
+ }
+
+ public String getAddress() {
+ return this.address;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getFavoriteFood() {
+ return this.favoriteFood;
+ }
+
+ public void setPersonId(UUID personId) {
+ this.personId = personId;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setFavoriteFood(String favoriteFood) {
+ this.favoriteFood = favoriteFood;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof PersonModel)) {
+ return false;
+ }
+ final PersonModel other = (PersonModel) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ final Object this$personId = this.getPersonId();
+ final Object other$personId = other.getPersonId();
+ if (this$personId == null ? other$personId != null : !this$personId.equals(other$personId)) {
+ return false;
+ }
+ final Object this$address = this.getAddress();
+ final Object other$address = other.getAddress();
+ if (this$address == null ? other$address != null : !this$address.equals(other$address)) {
+ return false;
+ }
+ final Object this$name = this.getName();
+ final Object other$name = other.getName();
+ if (this$name == null ? other$name != null : !this$name.equals(other$name)) {
+ return false;
+ }
+ final Object this$favoriteFood = this.getFavoriteFood();
+ final Object other$favoriteFood = other.getFavoriteFood();
+ if (this$favoriteFood == null ? other$favoriteFood != null : !this$favoriteFood.equals(other$favoriteFood)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof PersonModel;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $personId = this.getPersonId();
+ result = result * PRIME + ($personId == null ? 43 : $personId.hashCode());
+ final Object $address = this.getAddress();
+ result = result * PRIME + ($address == null ? 43 : $address.hashCode());
+ final Object $name = this.getName();
+ result = result * PRIME + ($name == null ? 43 : $name.hashCode());
+ final Object $favoriteFood = this.getFavoriteFood();
+ result = result * PRIME + ($favoriteFood == null ? 43 : $favoriteFood.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "PersonModel(personId=" + this.getPersonId() + ", address=" + this.getAddress() + ", name=" + this.getName() + ", favoriteFood=" + this.getFavoriteFood() + ")";
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestConverter.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestConverter.java
index 252f45938..cce3b0271 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestConverter.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestConverter.java
@@ -32,7 +32,7 @@ public class TestConverter implements Neo4jPersistentPropertyToMapConverter decompose(TestData property,
- Neo4jConversionService neo4jConversionService) {
+ Neo4jConversionService neo4jConversionService) {
if (property == null) {
return Map.of();
@@ -43,7 +43,7 @@ public class TestConverter implements Neo4jPersistentPropertyToMapConverter source,
- Neo4jConversionService neo4jConversionService) {
+ Neo4jConversionService neo4jConversionService) {
TestData data = new TestData();
if (source.get(NUM) != null) {
data.setNum(source.get(NUM).asInt());
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestData.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestData.java
index 675b29ab1..0239e004c 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestData.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestData.java
@@ -15,14 +15,9 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2493;
-import lombok.Getter;
-import lombok.Setter;
-
/**
* @author Michael J. Simons
*/
-@Getter
-@Setter
public class TestData {
private int num;
@@ -36,4 +31,20 @@ public class TestData {
this.num = num;
this.string = string;
}
+
+ public int getNum() {
+ return this.num;
+ }
+
+ public String getString() {
+ return this.string;
+ }
+
+ public void setNum(int num) {
+ this.num = num;
+ }
+
+ public void setString(String string) {
+ this.string = string;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestObject.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestObject.java
index fc0127f58..fd50fc004 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestObject.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2493/TestObject.java
@@ -15,9 +15,7 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2493;
-import lombok.Getter;
-import lombok.Setter;
-
+import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.data.neo4j.core.schema.CompositeProperty;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
@@ -25,14 +23,10 @@ import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.support.UUIDStringGenerator;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
/**
* @author Michael J. Simons
*/
@Node
-@Getter
-@Setter
public class TestObject {
@Id
@@ -48,4 +42,21 @@ public class TestObject {
super();
data = aData;
}
+
+ public String getId() {
+ return this.id;
+ }
+
+ public TestData getData() {
+ return this.data;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonIgnore
+ public void setData(TestData data) {
+ this.data = data;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/DomainModel.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/DomainModel.java
index 766a8ecc0..f4a482f89 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/DomainModel.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/DomainModel.java
@@ -27,7 +27,9 @@ import org.springframework.data.neo4j.core.schema.Node;
@Node
public class DomainModel {
- @Id @GeneratedValue UUID id;
+ @Id
+ @GeneratedValue
+ UUID id;
private final String name;
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/Edge.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/Edge.java
index e24a8dd4f..48d660499 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/Edge.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/Edge.java
@@ -15,12 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2498;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
@@ -29,16 +23,73 @@ import org.springframework.data.neo4j.core.schema.TargetNode;
/**
* @author Michael J. Simons
*/
+@SuppressWarnings("HiddenField")
@RelationshipProperties
-@Getter
-@Setter
-@NoArgsConstructor
-@AllArgsConstructor
-@Builder(toBuilder = true)
public class Edge {
@Id
@GeneratedValue
Long id;
@TargetNode
Vertex vertex;
+
+ public Edge(Long id, Vertex vertex) {
+ this.id = id;
+ this.vertex = vertex;
+ }
+
+ public Edge() {
+ }
+
+ public static EdgeBuilder builder() {
+ return new EdgeBuilder();
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public Vertex getVertex() {
+ return this.vertex;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setVertex(Vertex vertex) {
+ this.vertex = vertex;
+ }
+
+ public EdgeBuilder toBuilder() {
+ return new EdgeBuilder().id(this.id).vertex(this.vertex);
+ }
+
+ /**
+ * the builder
+ */
+ public static class EdgeBuilder {
+ private Long id;
+ private Vertex vertex;
+
+ EdgeBuilder() {
+ }
+
+ public EdgeBuilder id(Long id) {
+ this.id = id;
+ return this;
+ }
+
+ public EdgeBuilder vertex(Vertex vertex) {
+ this.vertex = vertex;
+ return this;
+ }
+
+ public Edge build() {
+ return new Edge(this.id, this.vertex);
+ }
+
+ public String toString() {
+ return "Edge.EdgeBuilder(id=" + this.id + ", vertex=" + this.vertex + ")";
+ }
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/Vertex.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/Vertex.java
index 36deba3ee..6640e1e9c 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/Vertex.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2498/Vertex.java
@@ -15,33 +15,99 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2498;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
-import java.util.List;
-
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
+import java.util.List;
+
/**
* @author Michael J. Simons
*/
-@Getter
-@Setter
-@NoArgsConstructor
-@AllArgsConstructor
+@SuppressWarnings("HiddenField")
@Node("Vertex")
-@Builder(toBuilder = true)
public class Vertex {
- @Id
- @GeneratedValue
- Long id;
- String name;
- @Relationship(type = "CONNECTED_TO", direction = Relationship.Direction.INCOMING)
+ @Id
+ @GeneratedValue
+ Long id;
+ String name;
+ @Relationship(type = "CONNECTED_TO", direction = Relationship.Direction.INCOMING)
List edges;
+
+ public Vertex(Long id, String name, List edges) {
+ this.id = id;
+ this.name = name;
+ this.edges = edges;
+ }
+
+ public Vertex() {
+ }
+
+ public static VertexBuilder builder() {
+ return new VertexBuilder();
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public List getEdges() {
+ return this.edges;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setEdges(List edges) {
+ this.edges = edges;
+ }
+
+ public VertexBuilder toBuilder() {
+ return new VertexBuilder().id(this.id).name(this.name).edges(this.edges);
+ }
+
+ /**
+ * the builder
+ */
+ public static class VertexBuilder {
+ private Long id;
+ private String name;
+ private List edges;
+
+ VertexBuilder() {
+ }
+
+ public VertexBuilder id(Long id) {
+ this.id = id;
+ return this;
+ }
+
+ public VertexBuilder name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public VertexBuilder edges(List edges) {
+ this.edges = edges;
+ return this;
+ }
+
+ public Vertex build() {
+ return new Vertex(this.id, this.name, this.edges);
+ }
+
+ public String toString() {
+ return "Vertex.VertexBuilder(id=" + this.id + ", name=" + this.name + ", edges=" + this.edges + ")";
+ }
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2500/Device.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2500/Device.java
index 5a5ceba17..89d9e764c 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2500/Device.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2500/Device.java
@@ -15,23 +15,18 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2500;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
import org.springframework.data.annotation.Version;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
/**
* @author Michael J. Simons
*/
@Node
-@Getter
-@Setter
public class Device {
@Id
@@ -65,4 +60,36 @@ public class Device {
result = 31 * result + (name != null ? name.hashCode() : 0);
return result;
}
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public Long getVersion() {
+ return this.version;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Set getGroups() {
+ return this.groups;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setGroups(Set groups) {
+ this.groups = groups;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2500/Group.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2500/Group.java
index a3a32db0e..4f3262c3b 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2500/Group.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2500/Group.java
@@ -15,12 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2500;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
import org.springframework.data.annotation.Version;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
@@ -29,12 +23,13 @@ import org.springframework.data.neo4j.core.schema.Relationship;
import org.springframework.data.neo4j.core.support.UUIDStringGenerator;
import org.springframework.lang.NonNull;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
/**
* @author Michael J. Simons
*/
@Node
-@Getter
-@Setter
public class Group {
@Id
@@ -77,4 +72,45 @@ public class Group {
result = 31 * result + name.hashCode();
return result;
}
+
+ public String getId() {
+ return this.id;
+ }
+
+ public Long getVersion() {
+ return this.version;
+ }
+
+ @NonNull
+ public String getName() {
+ return this.name;
+ }
+
+ public Set getDevices() {
+ return this.devices;
+ }
+
+ public Set getGroups() {
+ return this.groups;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public void setName(@NonNull String name) {
+ this.name = name;
+ }
+
+ public void setDevices(Set devices) {
+ this.devices = devices;
+ }
+
+ public void setGroups(Set groups) {
+ this.groups = groups;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/AccountingMeasurementMeta.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/AccountingMeasurementMeta.java
index c7071d99d..6ce025507 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/AccountingMeasurementMeta.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/AccountingMeasurementMeta.java
@@ -15,31 +15,138 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2526;
-import lombok.AccessLevel;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-import lombok.experimental.SuperBuilder;
-
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
/**
* Defining most concrete entity
*/
+@SuppressWarnings("HiddenField")
@Node
-@Data
-@Setter(AccessLevel.PRIVATE)
-@NoArgsConstructor(access = AccessLevel.PROTECTED)
-@AllArgsConstructor(access = AccessLevel.PROTECTED)
-@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
-@SuperBuilder(toBuilder = true)
public class AccountingMeasurementMeta extends MeasurementMeta {
private String formula;
@Relationship(type = "WEIGHTS", direction = Relationship.Direction.OUTGOING)
private MeasurementMeta baseMeasurement;
+
+ protected AccountingMeasurementMeta(String formula, MeasurementMeta baseMeasurement) {
+ this.formula = formula;
+ this.baseMeasurement = baseMeasurement;
+ }
+
+ protected AccountingMeasurementMeta() {
+ }
+
+ protected AccountingMeasurementMeta(AccountingMeasurementMetaBuilder, ?> b) {
+ super(b);
+ this.formula = b.formula;
+ this.baseMeasurement = b.baseMeasurement;
+ }
+
+ public static AccountingMeasurementMetaBuilder, ?> builder() {
+ return new AccountingMeasurementMetaBuilderImpl();
+ }
+
+ public String getFormula() {
+ return this.formula;
+ }
+
+ public MeasurementMeta getBaseMeasurement() {
+ return this.baseMeasurement;
+ }
+
+ public String toString() {
+ return "AccountingMeasurementMeta(formula=" + this.getFormula() + ", baseMeasurement=" + this.getBaseMeasurement() + ")";
+ }
+
+ private void setFormula(String formula) {
+ this.formula = formula;
+ }
+
+ private void setBaseMeasurement(MeasurementMeta baseMeasurement) {
+ this.baseMeasurement = baseMeasurement;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof AccountingMeasurementMeta)) {
+ return false;
+ }
+ final AccountingMeasurementMeta other = (AccountingMeasurementMeta) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof AccountingMeasurementMeta;
+ }
+
+ public int hashCode() {
+ int result = super.hashCode();
+ return result;
+ }
+
+ public AccountingMeasurementMetaBuilder, ?> toBuilder() {
+ return new AccountingMeasurementMetaBuilderImpl().$fillValuesFrom(this);
+ }
+
+ /**
+ * the builder
+ * @param needed c type
+ * @param needed b type
+ */
+ public static abstract class AccountingMeasurementMetaBuilder> extends MeasurementMetaBuilder {
+ private String formula;
+ private MeasurementMeta baseMeasurement;
+
+ private static void $fillValuesFromInstanceIntoBuilder(AccountingMeasurementMeta instance, AccountingMeasurementMetaBuilder, ?> b) {
+ b.formula(instance.formula);
+ b.baseMeasurement(instance.baseMeasurement);
+ }
+
+ public B formula(String formula) {
+ this.formula = formula;
+ return self();
+ }
+
+ public B baseMeasurement(MeasurementMeta baseMeasurement) {
+ this.baseMeasurement = baseMeasurement;
+ return self();
+ }
+
+ protected B $fillValuesFrom(C instance) {
+ super.$fillValuesFrom(instance);
+ AccountingMeasurementMetaBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
+ return self();
+ }
+
+ protected abstract B self();
+
+ public abstract C build();
+
+ public String toString() {
+ return "AccountingMeasurementMeta.AccountingMeasurementMetaBuilder(super=" + super.toString() + ", formula=" + this.formula + ", baseMeasurement=" + this.baseMeasurement + ")";
+ }
+ }
+
+ private static final class AccountingMeasurementMetaBuilderImpl extends AccountingMeasurementMetaBuilder {
+ private AccountingMeasurementMetaBuilderImpl() {
+ }
+
+ protected AccountingMeasurementMetaBuilderImpl self() {
+ return this;
+ }
+
+ public AccountingMeasurementMeta build() {
+ return new AccountingMeasurementMeta(this);
+ }
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/DataPoint.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/DataPoint.java
index e4d350c55..9496705db 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/DataPoint.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/DataPoint.java
@@ -15,11 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2526;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.With;
-
import org.springframework.data.annotation.Immutable;
import org.springframework.data.neo4j.core.schema.RelationshipId;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
@@ -28,20 +23,76 @@ import org.springframework.data.neo4j.core.schema.TargetNode;
/**
* Relationship with properties between measurement and measurand
*/
+@SuppressWarnings("HiddenField")
@RelationshipProperties
-@Value
-@With
-@AllArgsConstructor
@Immutable
-@EqualsAndHashCode(onlyExplicitlyIncluded = true)
-public class DataPoint {
+public final class DataPoint {
@RelationshipId
+ private final
Long id;
- boolean manual;
+ private final boolean manual;
@TargetNode
- @EqualsAndHashCode.Include
+ private final
Measurand measurand;
+
+ public DataPoint(Long id, boolean manual, Measurand measurand) {
+ this.id = id;
+ this.manual = manual;
+ this.measurand = measurand;
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public boolean isManual() {
+ return this.manual;
+ }
+
+ public Measurand getMeasurand() {
+ return this.measurand;
+ }
+
+ public String toString() {
+ return "DataPoint(id=" + this.getId() + ", manual=" + this.isManual() + ", measurand=" + this.getMeasurand() + ")";
+ }
+
+ public DataPoint withId(Long id) {
+ return this.id == id ? this : new DataPoint(id, this.manual, this.measurand);
+ }
+
+ public DataPoint withManual(boolean manual) {
+ return this.manual == manual ? this : new DataPoint(this.id, manual, this.measurand);
+ }
+
+ public DataPoint withMeasurand(Measurand measurand) {
+ return this.measurand == measurand ? this : new DataPoint(this.id, this.manual, measurand);
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof DataPoint)) {
+ return false;
+ }
+ final DataPoint other = (DataPoint) o;
+ final Object this$measurand = this.getMeasurand();
+ final Object other$measurand = other.getMeasurand();
+ if (this$measurand == null ? other$measurand != null : !this$measurand.equals(other$measurand)) {
+ return false;
+ }
+ return true;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $measurand = this.getMeasurand();
+ result = result * PRIME + ($measurand == null ? 43 : $measurand.hashCode());
+ return result;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/Measurand.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/Measurand.java
index 0a09469c9..48331a624 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/Measurand.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/Measurand.java
@@ -15,9 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2526;
-import lombok.AllArgsConstructor;
-import lombok.Value;
-
import org.springframework.data.annotation.Immutable;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
@@ -26,11 +23,46 @@ import org.springframework.data.neo4j.core.schema.Node;
* Target node
*/
@Node
-@Value
-@AllArgsConstructor
@Immutable
-public class Measurand {
+public final class Measurand {
@Id
+ private final
String measurandId;
+
+ public Measurand(String measurandId) {
+ this.measurandId = measurandId;
+ }
+
+ public String getMeasurandId() {
+ return this.measurandId;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof Measurand)) {
+ return false;
+ }
+ final Measurand other = (Measurand) o;
+ final Object this$measurandId = this.getMeasurandId();
+ final Object other$measurandId = other.getMeasurandId();
+ if (this$measurandId == null ? other$measurandId != null : !this$measurandId.equals(other$measurandId)) {
+ return false;
+ }
+ return true;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $measurandId = this.getMeasurandId();
+ result = result * PRIME + ($measurandId == null ? 43 : $measurandId.hashCode());
+ return result;
+ }
+
+ public String toString() {
+ return "Measurand(measurandId=" + this.getMeasurandId() + ")";
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/MeasurementMeta.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/MeasurementMeta.java
index 403da8ff7..4c3c5c499 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/MeasurementMeta.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/MeasurementMeta.java
@@ -15,30 +15,17 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2526;
-import lombok.AccessLevel;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-import lombok.experimental.SuperBuilder;
-
-import java.util.Set;
-
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
import org.springframework.data.neo4j.integration.issues.gh2415.BaseNodeEntity;
+import java.util.Set;
+
/**
* Defining relationship to measurand
*/
+@SuppressWarnings("HiddenField")
@Node
-@Data
-@Setter(AccessLevel.PRIVATE)
-@NoArgsConstructor(access = AccessLevel.PROTECTED)
-@AllArgsConstructor(access = AccessLevel.PROTECTED)
-@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
-@SuperBuilder(toBuilder = true)
public class MeasurementMeta extends BaseNodeEntity {
@Relationship(type = "IS_MEASURED_BY", direction = Relationship.Direction.INCOMING)
@@ -46,4 +33,124 @@ public class MeasurementMeta extends BaseNodeEntity {
@Relationship(type = "USES", direction = Relationship.Direction.OUTGOING)
private Set variables;
+
+ protected MeasurementMeta(Set dataPoints, Set variables) {
+ this.dataPoints = dataPoints;
+ this.variables = variables;
+ }
+
+ protected MeasurementMeta() {
+ }
+
+ protected MeasurementMeta(MeasurementMetaBuilder, ?> b) {
+ super(b);
+ this.dataPoints = b.dataPoints;
+ this.variables = b.variables;
+ }
+
+ public static MeasurementMetaBuilder, ?> builder() {
+ return new MeasurementMetaBuilderImpl();
+ }
+
+ public Set getDataPoints() {
+ return this.dataPoints;
+ }
+
+ public Set getVariables() {
+ return this.variables;
+ }
+
+ public String toString() {
+ return "MeasurementMeta(dataPoints=" + this.getDataPoints() + ", variables=" + this.getVariables() + ")";
+ }
+
+ private void setDataPoints(Set dataPoints) {
+ this.dataPoints = dataPoints;
+ }
+
+ private void setVariables(Set variables) {
+ this.variables = variables;
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof MeasurementMeta)) {
+ return false;
+ }
+ final MeasurementMeta other = (MeasurementMeta) o;
+ if (!other.canEqual((Object) this)) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canEqual(final Object other) {
+ return other instanceof MeasurementMeta;
+ }
+
+ public int hashCode() {
+ int result = super.hashCode();
+ return result;
+ }
+
+ public MeasurementMetaBuilder, ?> toBuilder() {
+ return new MeasurementMetaBuilderImpl().$fillValuesFrom(this);
+ }
+
+ /**
+ * the builder
+ * @param needed c type
+ * @param needed b type
+ */
+ public static abstract class MeasurementMetaBuilder> extends BaseNodeEntityBuilder {
+ private Set dataPoints;
+ private Set variables;
+
+ private static void $fillValuesFromInstanceIntoBuilder(MeasurementMeta instance, MeasurementMetaBuilder, ?> b) {
+ b.dataPoints(instance.dataPoints);
+ b.variables(instance.variables);
+ }
+
+ public B dataPoints(Set dataPoints) {
+ this.dataPoints = dataPoints;
+ return self();
+ }
+
+ public B variables(Set variables) {
+ this.variables = variables;
+ return self();
+ }
+
+ protected B $fillValuesFrom(C instance) {
+ super.$fillValuesFrom(instance);
+ MeasurementMetaBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
+ return self();
+ }
+
+ protected abstract B self();
+
+ public abstract C build();
+
+ public String toString() {
+ return "MeasurementMeta.MeasurementMetaBuilder(super=" + super.toString() + ", dataPoints=" + this.dataPoints + ", variables=" + this.variables + ")";
+ }
+ }
+
+ private static final class MeasurementMetaBuilderImpl extends MeasurementMetaBuilder {
+ private MeasurementMetaBuilderImpl() {
+ }
+
+ protected MeasurementMetaBuilderImpl self() {
+ return this;
+ }
+
+ public MeasurementMeta build() {
+ return new MeasurementMeta(this);
+ }
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/Variable.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/Variable.java
index 7f6c4b238..d50c400cc 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/Variable.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2526/Variable.java
@@ -15,11 +15,6 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2526;
-import lombok.AllArgsConstructor;
-import lombok.EqualsAndHashCode;
-import lombok.Value;
-import lombok.With;
-
import org.springframework.data.annotation.Immutable;
import org.springframework.data.neo4j.core.schema.RelationshipId;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
@@ -28,20 +23,25 @@ import org.springframework.data.neo4j.core.schema.TargetNode;
/**
* Second type of relationship
*/
+@SuppressWarnings("HiddenField")
@RelationshipProperties
-@Value
-@With
-@AllArgsConstructor
-@EqualsAndHashCode
@Immutable
-public class Variable {
+public final class Variable {
@RelationshipId
+ private final
Long id;
@TargetNode
+ private final
MeasurementMeta measurement;
- String variable;
+ private final String variable;
+
+ public Variable(Long id, MeasurementMeta measurement, String variable) {
+ this.id = id;
+ this.measurement = measurement;
+ this.variable = variable;
+ }
public static Variable create(MeasurementMeta measurement, String variable) {
return new Variable(null, measurement, variable);
@@ -51,4 +51,66 @@ public class Variable {
public String toString() {
return variable + ": " + measurement.getNodeId();
}
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public MeasurementMeta getMeasurement() {
+ return this.measurement;
+ }
+
+ public String getVariable() {
+ return this.variable;
+ }
+
+ public Variable withId(Long id) {
+ return this.id == id ? this : new Variable(id, this.measurement, this.variable);
+ }
+
+ public Variable withMeasurement(MeasurementMeta measurement) {
+ return this.measurement == measurement ? this : new Variable(this.id, measurement, this.variable);
+ }
+
+ public Variable withVariable(String variable) {
+ return this.variable == variable ? this : new Variable(this.id, this.measurement, variable);
+ }
+
+ public boolean equals(final Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof Variable)) {
+ return false;
+ }
+ final Variable other = (Variable) o;
+ final Object this$id = this.getId();
+ final Object other$id = other.getId();
+ if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
+ return false;
+ }
+ final Object this$measurement = this.getMeasurement();
+ final Object other$measurement = other.getMeasurement();
+ if (this$measurement == null ? other$measurement != null : !this$measurement.equals(other$measurement)) {
+ return false;
+ }
+ final Object this$variable = this.getVariable();
+ final Object other$variable = other.getVariable();
+ if (this$variable == null ? other$variable != null : !this$variable.equals(other$variable)) {
+ return false;
+ }
+ return true;
+ }
+
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final Object $id = this.getId();
+ result = result * PRIME + ($id == null ? 43 : $id.hashCode());
+ final Object $measurement = this.getMeasurement();
+ result = result * PRIME + ($measurement == null ? 43 : $measurement.hashCode());
+ final Object $variable = this.getVariable();
+ result = result * PRIME + ($variable == null ? 43 : $variable.hashCode());
+ return result;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2530/SomeStringGenerator.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2530/SomeStringGenerator.java
index 3ff8f3cf4..b5a57be87 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2530/SomeStringGenerator.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2530/SomeStringGenerator.java
@@ -24,8 +24,8 @@ import java.util.UUID;
*/
public class SomeStringGenerator implements IdGenerator {
- @Override
- public String generateId(String primaryLabel, Object entity) {
- return primaryLabel + UUID.randomUUID();
- }
+ @Override
+ public String generateId(String primaryLabel, Object entity) {
+ return primaryLabel + UUID.randomUUID();
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Child.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Child.java
index 3c94e8b4f..5a0fcf062 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Child.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Child.java
@@ -15,25 +15,40 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2572;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
/**
* @author Michael J. Simons
*/
-@Getter
-@Setter
-@NoArgsConstructor
-@AllArgsConstructor
@Node
public class GH2572Child extends GH2572BaseEntity {
private String name;
@Relationship(value = "IS_PET", direction = Relationship.Direction.OUTGOING)
private GH2572Parent owner;
+
+ public GH2572Child(String name, GH2572Parent owner) {
+ this.name = name;
+ this.owner = owner;
+ }
+
+ public GH2572Child() {
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public GH2572Parent getOwner() {
+ return this.owner;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setOwner(GH2572Parent owner) {
+ this.owner = owner;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Parent.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Parent.java
index 4b8b653a5..65afec6b8 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Parent.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Parent.java
@@ -15,24 +15,39 @@
*/
package org.springframework.data.neo4j.integration.issues.gh2572;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
import org.springframework.data.neo4j.core.schema.Node;
/**
* @author Michael J. Simons
*/
-@Getter
-@Setter
-@NoArgsConstructor
-@AllArgsConstructor
@Node
public class GH2572Parent extends GH2572BaseEntity {
private String name;
private int age;
+
+ public GH2572Parent(String name, int age) {
+ this.name = name;
+ this.age = age;
+ }
+
+ public GH2572Parent() {
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public int getAge() {
+ return this.age;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Repository.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Repository.java
index 5c8cbf826..ef6f02196 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Repository.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/GH2572Repository.java
@@ -27,17 +27,17 @@ import org.springframework.data.neo4j.repository.query.Query;
public interface GH2572Repository extends Neo4jRepository {
@Query("MATCH(person:GH2572Parent {id: $id}) "
- + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
- + "RETURN dog")
+ + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
+ + "RETURN dog")
List getDogsForPerson(String id);
@Query("MATCH(person:GH2572Parent {id: $id}) "
- + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
- + "RETURN dog ORDER BY dog.name ASC LIMIT 1")
+ + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
+ + "RETURN dog ORDER BY dog.name ASC LIMIT 1")
Optional findOneDogForPerson(String id);
@Query("MATCH(person:GH2572Parent {id: $id}) "
- + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
- + "RETURN dog ORDER BY dog.name ASC LIMIT 1")
+ + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
+ + "RETURN dog ORDER BY dog.name ASC LIMIT 1")
GH2572Child getOneDogForPerson(String id);
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/ReactiveGH2572Repository.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/ReactiveGH2572Repository.java
index 9b45b7c67..396f7fe9d 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/ReactiveGH2572Repository.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2572/ReactiveGH2572Repository.java
@@ -27,12 +27,12 @@ import org.springframework.data.neo4j.repository.query.Query;
public interface ReactiveGH2572Repository extends ReactiveNeo4jRepository {
@Query("MATCH(person:GH2572Parent {id: $id}) "
- + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
- + "RETURN dog")
+ + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
+ + "RETURN dog")
Flux getDogsForPerson(String id);
@Query("MATCH(person:GH2572Parent {id: $id}) "
- + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
- + "RETURN dog ORDER BY dog.name ASC LIMIT 1")
+ + "OPTIONAL MATCH (person)<-[:IS_PET]-(dog:GH2572Child) "
+ + "RETURN dog ORDER BY dog.name ASC LIMIT 1")
Mono findOneDogForPerson(String id);
}
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2576/College.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2576/College.java
index c2a879a5a..7a4de4ece 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2576/College.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2576/College.java
@@ -26,7 +26,8 @@ import org.springframework.data.neo4j.core.support.UUIDStringGenerator;
@Node
public class College {
- @Id @GeneratedValue(UUIDStringGenerator.class)
+ @Id
+ @GeneratedValue(UUIDStringGenerator.class)
private String guid;
private String name;
diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2576/CollegeRepository.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2576/CollegeRepository.java
index 259b176c0..eaa4d96de 100644
--- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2576/CollegeRepository.java
+++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2576/CollegeRepository.java
@@ -28,18 +28,18 @@ import org.springframework.data.neo4j.repository.query.Query;
public interface CollegeRepository extends Neo4jRepository {
@Query("""
- UNWIND $0 AS row
- MATCH (student:Student{guid:row.stuGuid})
- MATCH (college:College{guid:row.collegeGuid})
- CREATE (student)<-[:STUDENT_OF]-(college) RETURN student.guid"""
+ UNWIND $0 AS row
+ MATCH (student:Student{guid:row.stuGuid})
+ MATCH (college:College{guid:row.collegeGuid})
+ CREATE (student)<-[:STUDENT_OF]-(college) RETURN student.guid"""
)
List addStudentToCollege(List