mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-11 03:53:07 +00:00
[DS-2763] Add much transience to make DSOs actually serializable
This commit is contained in:
@@ -33,7 +33,7 @@ import java.util.*;
|
||||
public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
{
|
||||
/** log4j category */
|
||||
private static Logger log = Logger.getLogger(Community.class);
|
||||
private static final Logger log = Logger.getLogger(Community.class);
|
||||
|
||||
@Column(name="community_id", insertable = false, updatable = false)
|
||||
private Integer legacyId;
|
||||
@@ -44,13 +44,13 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
joinColumns = {@JoinColumn(name = "parent_comm_id") },
|
||||
inverseJoinColumns = {@JoinColumn(name = "child_comm_id") }
|
||||
)
|
||||
private List<Community> subCommunities = new ArrayList<>();
|
||||
private final List<Community> subCommunities = new ArrayList<>();
|
||||
|
||||
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "subCommunities")
|
||||
private List<Community> parentCommunities = new ArrayList<>();
|
||||
|
||||
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "communities", cascade = {CascadeType.PERSIST})
|
||||
private List<Collection> collections = new ArrayList<>();
|
||||
private final List<Collection> collections = new ArrayList<>();
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "admin")
|
||||
@@ -69,7 +69,7 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
public static final String SIDEBAR_TEXT = "side_bar_text";
|
||||
|
||||
@Transient
|
||||
protected CommunityService communityService;
|
||||
protected transient CommunityService communityService;
|
||||
|
||||
protected Community() {
|
||||
}
|
||||
@@ -207,6 +207,7 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return new HashCodeBuilder().append(getID()).toHashCode();
|
||||
|
Reference in New Issue
Block a user