Skip to content

issues/1588 janusgraph schema #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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());
}
}
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;
}
}
Loading