Skip to content

Commit 537247a

Browse files
committed
issues/1588 janusgraph schema
1 parent 8596f5b commit 537247a

File tree

9 files changed

+805
-193
lines changed

9 files changed

+805
-193
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package org.carlspring.strongbox.janusgraph.domain;
2+
3+
import java.util.UUID;
4+
5+
import org.neo4j.ogm.annotation.NodeEntity;
6+
7+
/**
8+
* @author Przemyslaw Fusik
9+
*/
10+
@NodeEntity
11+
public class ChangeSet
12+
extends DomainEntity
13+
implements Comparable<ChangeSet>
14+
{
15+
16+
private Integer order;
17+
18+
private String name;
19+
20+
public static ChangeSet build(final String name,
21+
final Integer order)
22+
{
23+
ChangeSet changeSet = new ChangeSet();
24+
changeSet.setUuid(UUID.randomUUID().toString());
25+
changeSet.setName(name);
26+
changeSet.setOrder(order);
27+
return changeSet;
28+
}
29+
30+
public Integer getOrder()
31+
{
32+
return order;
33+
}
34+
35+
public void setOrder(final Integer order)
36+
{
37+
this.order = order;
38+
}
39+
40+
public String getName()
41+
{
42+
return name;
43+
}
44+
45+
public void setName(final String name)
46+
{
47+
this.name = name;
48+
}
49+
50+
@Override
51+
public int compareTo(final ChangeSet o)
52+
{
53+
return Integer.compare(getOrder(), o.getOrder());
54+
}
55+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package org.carlspring.strongbox.janusgraph.domain;
2+
3+
import java.util.NavigableSet;
4+
5+
import org.neo4j.ogm.annotation.NodeEntity;
6+
import org.neo4j.ogm.annotation.Relationship;
7+
8+
/**
9+
* @author Przemyslaw Fusik
10+
*/
11+
@NodeEntity
12+
public class DatabaseSchema
13+
extends DomainEntity
14+
{
15+
16+
@Relationship(type = "DatabaseSchema_ChangeSet")
17+
private NavigableSet<ChangeSet> changeSets;
18+
19+
public NavigableSet<ChangeSet> getChangeSets()
20+
{
21+
return changeSets;
22+
}
23+
24+
public void setChangeSets(final NavigableSet<ChangeSet> changeSets)
25+
{
26+
this.changeSets = changeSets;
27+
}
28+
}

0 commit comments

Comments
 (0)