Example usage for javax.persistence CascadeType DETACH

List of usage examples for javax.persistence CascadeType DETACH

Introduction

In this page you can find the example usage for javax.persistence CascadeType DETACH.

Prototype

CascadeType DETACH

To view the source code for javax.persistence CascadeType DETACH.

Click Source Link

Document

Cascade detach operation

Usage

From source file:org.dspace.orm.entity.Item.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "collection2item", joinColumns = {
        @JoinColumn(name = "item_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "collection_id", nullable = false) })
public List<Collection> getCollections() {
    return collections;
}

From source file:org.dspace.orm.entity.Bundle.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "item2bundle", joinColumns = {
        @JoinColumn(name = "item_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "bundle_id", nullable = false) })
public List<Item> getItems() {
    return items;
}

From source file:org.dspace.orm.entity.Community.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "community2community", joinColumns = {
        @JoinColumn(name = "child_comm_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "parent_comm_id", nullable = false) })
public List<Item> getItems() {
    return items;
}

From source file:org.dspace.orm.entity.Collection.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "community2collection", joinColumns = {
        @JoinColumn(name = "collection_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "community_id", nullable = false) })
public List<Community> getParents() {
    return parents;
}

From source file:org.dspace.orm.entity.EpersonGroup.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "group2group", joinColumns = {
        @JoinColumn(name = "parent_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "child_id", nullable = false) })
public List<EpersonGroup> getChilds() {
    return childs;
}

From source file:org.dspace.orm.entity.Community.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "community2community", joinColumns = {
        @JoinColumn(name = "child_comm_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "parent_comm_id", nullable = false) })
public List<Community> getParents() {
    return parents;
}

From source file:org.dspace.orm.entity.Collection.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "collection2item", joinColumns = {
        @JoinColumn(name = "collection_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "item_id", nullable = false) })
public List<Item> getItems() {
    return items;
}

From source file:org.dspace.orm.entity.EpersonGroup.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "group2groupcache", joinColumns = {
        @JoinColumn(name = "parent_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "child_id", nullable = false) })
public List<EpersonGroup> getAllChilds() {
    return allChilds;
}

From source file:org.dspace.orm.entity.Community.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "community2collection", joinColumns = {
        @JoinColumn(name = "community_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "collection_id", nullable = false) })
public List<Collection> getCollections() {
    return collections;
}

From source file:org.dspace.orm.entity.WorkFlowItem.java

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "tasklistitem", joinColumns = {
        @JoinColumn(name = "workflow_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "eperson_id", nullable = false) })
public List<Eperson> getEpersons() {
    return epersons;
}