mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 10:34:25 +00:00
DSpace refactored service api
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.eperson;
|
||||
|
||||
import org.dspace.content.Collection;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* Database entity representation of the subscription table
|
||||
*
|
||||
* @author kevinvandevelde at atmire.com
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "subscription", schema = "public")
|
||||
public class Subscription {
|
||||
|
||||
@Id
|
||||
@Column(name = "subscription_id", unique = true, nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="subscription_seq")
|
||||
@SequenceGenerator(name="subscription_seq", sequenceName="subscription_seq", allocationSize = 1)
|
||||
private int id;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "collection_id")
|
||||
private Collection collection;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "eperson_id")
|
||||
private EPerson ePerson;
|
||||
|
||||
protected Subscription() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Collection getCollection() {
|
||||
return collection;
|
||||
}
|
||||
|
||||
void setCollection(Collection collection) {
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public EPerson getePerson() {
|
||||
return ePerson;
|
||||
}
|
||||
|
||||
void setePerson(EPerson ePerson) {
|
||||
this.ePerson = ePerson;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user