Package org.dspace.content
Class DSpaceObject
- java.lang.Object
-
- org.dspace.content.DSpaceObject
-
- All Implemented Interfaces:
Serializable,ReloadableEntity<UUID>
@Entity public abstract class DSpaceObject extends Object implements Serializable, ReloadableEntity<UUID>
Abstract base class for DSpace objects- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected UUIDidprotected UUIDpredefinedUUIDThis will read our predefinedUUID property to pass it along to the UUID generator
-
Constructor Summary
Constructors Modifier Constructor Description protectedDSpaceObject()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddDetails(String d)Add a string to the cache of event details.voidaddHandle(Handle handle)Append to this object's list of Handles.protected voidaddMetadata(MetadataValue metadataValue)voidclearDetails()Reset the cache of event details.voidclearModified()StringgetDetails()StringgetHandle()Get the Handle of the object.List<Handle>getHandles()UUIDgetID()Get the internal ID (database primary key) of this objectList<MetadataValue>getMetadata()abstract StringgetName()UUIDgetPredefinedUUID()List<ResourcePolicy>getResourcePolicies()abstract intgetType()Get the type of this object, found in ConstantsbooleanisMetadataModified()booleanisModified()protected voidremoveMetadata(List<MetadataValue> metadataValues)protected voidremoveMetadata(MetadataValue metadataValue)voidsetMetadata(List<MetadataValue> metadata)protected voidsetMetadataModified()protected voidsetModified()
-
-
-
Method Detail
-
getPredefinedUUID
public UUID getPredefinedUUID()
-
clearDetails
public void clearDetails()
Reset the cache of event details.
-
addDetails
protected void addDetails(String d)
Add a string to the cache of event details. Automatically separates entries with a comma. Subclass can just start calling addDetails, since it creates the cache if it needs to.- Parameters:
d- detail string to add.
-
getDetails
public String getDetails()
- Returns:
- summary of event details, or null if there are none.
-
getType
public abstract int getType()
Get the type of this object, found in Constants- Returns:
- type of the object
-
getID
public UUID getID()
Get the internal ID (database primary key) of this object- Specified by:
getIDin interfaceReloadableEntity<UUID>- Returns:
- internal ID of object
-
getName
public abstract String getName()
-
getHandle
public String getHandle()
Get the Handle of the object. This may returnnull- Returns:
- Handle of the object, or
nullif it doesn't have one
-
addHandle
public void addHandle(Handle handle)
Append to this object's list of Handles.- Parameters:
handle- the new Handle to be added.
-
getMetadata
public List<MetadataValue> getMetadata()
-
setMetadata
public void setMetadata(List<MetadataValue> metadata)
-
removeMetadata
protected void removeMetadata(MetadataValue metadataValue)
-
removeMetadata
protected void removeMetadata(List<MetadataValue> metadataValues)
-
addMetadata
protected void addMetadata(MetadataValue metadataValue)
-
getResourcePolicies
public List<ResourcePolicy> getResourcePolicies()
-
isMetadataModified
public boolean isMetadataModified()
-
setMetadataModified
protected void setMetadataModified()
-
isModified
public boolean isModified()
-
clearModified
public void clearModified()
-
setModified
protected void setModified()
-
-