-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
805 additions
and
193 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
src/main/java/org/carlspring/strongbox/janusgraph/domain/ChangeSet.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,55 @@ | ||
package org.carlspring.strongbox.janusgraph.domain; | ||
|
||
import java.util.UUID; | ||
|
||
import org.neo4j.ogm.annotation.NodeEntity; | ||
|
||
/** | ||
* @author Przemyslaw Fusik | ||
*/ | ||
@NodeEntity | ||
public class ChangeSet | ||
extends DomainEntity | ||
implements Comparable<ChangeSet> | ||
{ | ||
|
||
private Integer order; | ||
|
||
private String name; | ||
|
||
public static ChangeSet build(final String name, | ||
final Integer order) | ||
{ | ||
ChangeSet changeSet = new ChangeSet(); | ||
changeSet.setUuid(UUID.randomUUID().toString()); | ||
changeSet.setName(name); | ||
changeSet.setOrder(order); | ||
return changeSet; | ||
} | ||
|
||
public Integer getOrder() | ||
{ | ||
return order; | ||
} | ||
|
||
public void setOrder(final Integer order) | ||
{ | ||
this.order = order; | ||
} | ||
|
||
public String getName() | ||
{ | ||
return name; | ||
} | ||
|
||
public void setName(final String name) | ||
{ | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public int compareTo(final ChangeSet o) | ||
{ | ||
return Integer.compare(getOrder(), o.getOrder()); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/org/carlspring/strongbox/janusgraph/domain/DatabaseSchema.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,28 @@ | ||
package org.carlspring.strongbox.janusgraph.domain; | ||
|
||
import java.util.NavigableSet; | ||
|
||
import org.neo4j.ogm.annotation.NodeEntity; | ||
import org.neo4j.ogm.annotation.Relationship; | ||
|
||
/** | ||
* @author Przemyslaw Fusik | ||
*/ | ||
@NodeEntity | ||
public class DatabaseSchema | ||
extends DomainEntity | ||
{ | ||
|
||
@Relationship(type = "DatabaseSchema_ChangeSet") | ||
private NavigableSet<ChangeSet> changeSets; | ||
|
||
public NavigableSet<ChangeSet> getChangeSets() | ||
{ | ||
return changeSets; | ||
} | ||
|
||
public void setChangeSets(final NavigableSet<ChangeSet> changeSets) | ||
{ | ||
this.changeSets = changeSets; | ||
} | ||
} |
Oops, something went wrong.