Commit a930f2fa authored by fabio martelli's avatar fabio martelli
Browse files

[CRV-107] providing autogenerated UUID compliant with Apache Syncope 2.0.0-M3

parent 6c5d543e
......@@ -20,8 +20,6 @@ import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import org.apache.commons.lang3.ArrayUtils;
......@@ -30,17 +28,12 @@ import org.apache.syncope.core.persistence.api.entity.ChoreographyInstance;
@Entity
@Table(name = JPAChoreography.TABLE)
public class JPAChoreography extends AbstractEntity implements Choreography {
public class JPAChoreography extends AbstractGeneratedKeyEntity implements Choreography {
private static final long serialVersionUID = 3035701306409810715L;
public static final String TABLE = "Choreographies";
@Id
@GeneratedValue
@Column(name = "id")
private String id;
@Column(unique = true, name = "name", nullable = true, length = 255)
private String name;
......@@ -64,14 +57,9 @@ public class JPAChoreography extends AbstractEntity implements Choreography {
private Set<ChoreographyInstance> choreographyInstances = new HashSet<>();
@Override
public String getKey() {
return this.id;
}
@Override
public String getId() {
return this.id;
return getKey();
}
@Override
......
......@@ -19,8 +19,6 @@ import java.util.LinkedHashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
......@@ -30,17 +28,12 @@ import org.apache.syncope.core.persistence.api.entity.ChoreographyInstance;
@Entity
@Table(name = JPAChoreographyInstance.TABLE)
public class JPAChoreographyInstance extends AbstractEntity implements ChoreographyInstance {
public class JPAChoreographyInstance extends AbstractGeneratedKeyEntity implements ChoreographyInstance {
private static final long serialVersionUID = 4730175715632012842L;
public static final String TABLE = "ChoreographyInstances";
@Id
@GeneratedValue
@Column(name = "id")
private String id;
@Column(name = "coreographyInstanceId")
private String choreographyInstanceId;
......@@ -53,14 +46,9 @@ public class JPAChoreographyInstance extends AbstractEntity implements Choreogra
private Set<Event> events = new LinkedHashSet<>();
@Override
public String getKey() {
return this.id;
}
@Override
public String getId() {
return this.id;
return getKey();
}
@Override
......
......@@ -19,8 +19,6 @@ import eu.chorevolution.idm.common.types.ArtifactType;
import eu.chorevolution.idm.common.types.EventType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
......@@ -29,17 +27,12 @@ import org.apache.syncope.core.persistence.api.entity.ChoreographyInstance;
@Entity
@Table(name = JPAEvent.TABLE)
public class JPAEvent extends AbstractEntity implements Event {
public class JPAEvent extends AbstractGeneratedKeyEntity implements Event {
private static final long serialVersionUID = 7402736206016134723L;
public static final String TABLE = "Events";
@Id
@GeneratedValue
@Column(name = "id")
private String id;
@Column(name = "eventType", length = 50)
private EventType eventType;
......@@ -71,14 +64,9 @@ public class JPAEvent extends AbstractEntity implements Event {
@JoinColumn(name = "choreographyInstance_id", nullable = false)
private JPAChoreographyInstance choreographyInstance;
@Override
public String getKey() {
return this.id;
}
@Override
public String getId() {
return this.id;
return getKey();
}
@Override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment