news
git-svn-id: svn://svn.dsv.su.se/scipro/scipro/trunk@532 73ecded7-942e-4092-bab0-0e58ef0ee984
This commit is contained in:
parent
ec20e0df48
commit
e581f74320
src/main/java/se/su/dsv/scipro/data/dataobjects
@ -1,24 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
/**
|
||||
* @author Johan Aschan - aschan@dsv.su.se
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Cacheable(true)
|
||||
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
|
||||
@Table(name="embed_resource")
|
||||
public class EmbedResource extends Resource {
|
||||
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
/**
|
||||
* @author Johan Aschan - aschan@dsv.su.se
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Cacheable(true)
|
||||
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
|
||||
@Table(name="file_resource")
|
||||
public class FileResource extends Resource {
|
||||
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
/**
|
||||
* @author Johan Aschan - aschan@dsv.su.se
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Cacheable(true)
|
||||
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
|
||||
@Table(name="link_resource")
|
||||
public class LinkResource extends Resource {
|
||||
|
||||
@Lob
|
||||
private String link;
|
||||
|
||||
@Lob
|
||||
private String linkName;
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public String getLinkName() {
|
||||
return linkName;
|
||||
}
|
||||
|
||||
public void setLinkName(String linkName) {
|
||||
this.linkName = linkName;
|
||||
}
|
||||
|
||||
}
|
@ -1,18 +1,21 @@
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.PreRemove;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import org.apache.wicket.injection.web.InjectorHolder;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import se.su.dsv.scipro.repository.FileRepository;
|
||||
|
||||
@ -20,8 +23,11 @@ import se.su.dsv.scipro.repository.FileRepository;
|
||||
* @author Johan Aschan - aschan@se.su.dsv
|
||||
*
|
||||
*/
|
||||
@MappedSuperclass
|
||||
public abstract class Resource extends Ratable {
|
||||
@Entity
|
||||
@Cacheable(true)
|
||||
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
|
||||
@Table(name="resource")
|
||||
public class Resource extends Ratable {
|
||||
|
||||
@SpringBean
|
||||
@Transient
|
||||
@ -40,6 +46,9 @@ public abstract class Resource extends Ratable {
|
||||
@Lob
|
||||
private String heading;
|
||||
|
||||
@Lob
|
||||
private String embedCode;
|
||||
|
||||
@Lob
|
||||
private String info;
|
||||
|
||||
@ -48,8 +57,28 @@ public abstract class Resource extends Ratable {
|
||||
|
||||
|
||||
@ManyToMany
|
||||
private List<Tag> tagList = new ArrayList<Tag>();
|
||||
private Set<Tag> tagSet = new HashSet<Tag>();
|
||||
|
||||
@Lob
|
||||
private String link;
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
|
||||
public Set<Tag> getTagSet() {
|
||||
return tagSet;
|
||||
}
|
||||
|
||||
public void setTagSet(Set<Tag> tagSet) {
|
||||
this.tagSet = tagSet;
|
||||
}
|
||||
|
||||
public void setHeading(String heading) {
|
||||
this.heading = heading;
|
||||
}
|
||||
@ -66,13 +95,7 @@ public abstract class Resource extends Ratable {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public List<Tag> getTagList() {
|
||||
return tagList;
|
||||
}
|
||||
|
||||
public void setTagList(List<Tag> tagList) {
|
||||
this.tagList = tagList;
|
||||
}
|
||||
|
||||
public User getCreator() {
|
||||
return creator;
|
||||
@ -81,6 +104,15 @@ public abstract class Resource extends Ratable {
|
||||
public void setCreator(User creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getEmbedCode() {
|
||||
return embedCode;
|
||||
}
|
||||
|
||||
public void setEmbedCode(String embedCode) {
|
||||
this.embedCode = embedCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
@Table(name="tag")
|
||||
@Cacheable(true)
|
||||
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
|
||||
public class Tag extends DomainObject {
|
||||
public class Tag extends LazyDeletableDomainObject {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
|
Loading…
x
Reference in New Issue
Block a user