forked from spring-projects/spring-data-neo4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test to showcase spring-projects#2918
Signed-off-by: Mathias Kühn <kuehn@synerva.de>
- Loading branch information
Showing
5 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/test/java/org/springframework/data/neo4j/integration/issues/gh2918/ConditionNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2011-2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.springframework.data.neo4j.integration.issues.gh2918; | ||
|
||
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.Relationship; | ||
import org.springframework.data.neo4j.core.support.UUIDStringGenerator; | ||
|
||
/** | ||
* @author Mathias Kühn | ||
*/ | ||
@Node | ||
public class ConditionNode { | ||
@Id | ||
@GeneratedValue(UUIDStringGenerator.class) | ||
public String uuid; | ||
|
||
@Relationship(type = "CAUSES", direction = Relationship.Direction.INCOMING) | ||
public Set<FailureRelationship> upstreamFailures; | ||
|
||
@Relationship(type = "CAUSES", direction = Relationship.Direction.OUTGOING) | ||
public Set<FailureRelationship> downstreamFailures; | ||
} | ||
|
24 changes: 24 additions & 0 deletions
24
...st/java/org/springframework/data/neo4j/integration/issues/gh2918/ConditionRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright 2011-2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.springframework.data.neo4j.integration.issues.gh2918; | ||
|
||
import org.springframework.data.neo4j.repository.Neo4jRepository; | ||
|
||
/** | ||
* @author Mathias Kühn | ||
*/ | ||
public interface ConditionRepository extends Neo4jRepository<ConditionNode, String> { | ||
} |
32 changes: 32 additions & 0 deletions
32
src/test/java/org/springframework/data/neo4j/integration/issues/gh2918/FailureNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2011-2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.springframework.data.neo4j.integration.issues.gh2918; | ||
|
||
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; | ||
|
||
/** | ||
* @author Mathias Kühn | ||
*/ | ||
@Node | ||
public class FailureNode { | ||
@Id | ||
@GeneratedValue(UUIDStringGenerator.class) | ||
public String uuid; | ||
} | ||
|
33 changes: 33 additions & 0 deletions
33
...st/java/org/springframework/data/neo4j/integration/issues/gh2918/FailureRelationship.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2011-2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.springframework.data.neo4j.integration.issues.gh2918; | ||
|
||
import org.springframework.data.neo4j.core.schema.RelationshipId; | ||
import org.springframework.data.neo4j.core.schema.RelationshipProperties; | ||
import org.springframework.data.neo4j.core.schema.TargetNode; | ||
|
||
/** | ||
* @author Mathias Kühn | ||
*/ | ||
@RelationshipProperties | ||
public abstract class FailureRelationship { | ||
|
||
@RelationshipId | ||
public String id; | ||
|
||
@TargetNode | ||
public FailureNode target; | ||
} |