Package com.proxemo.todo4.bom
Class ToDoAttachment
- java.lang.Object
-
- com.proxemo.todo4.bom.ToDoVersionedIdentifiable
-
- com.proxemo.todo4.bom.ToDoAttachment
-
- All Implemented Interfaces:
java.io.Serializable
public class ToDoAttachment extends ToDoVersionedIdentifiable
The class describing the attachment of acom.proxemo.todo.bom.ToDoTask
. This class is associated to a task via the classcom.proxemo.todo.bom.ToDoAttachmentProxy
. An attachment is lazily loaded.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
INDEXSTATE_ERROR
static int
INDEXSTATE_NONE
static int
INDEXSTATE_OK
-
Constructor Summary
Constructors Constructor Description ToDoAttachment()
Default Constructor.ToDoAttachment(ToDoAttachmentProxy proxy)
Constructor using ancom.proxemo.todo.bom.ToDoAttachmentProxy
.ToDoAttachment(java.lang.String attachmentName, byte[] attachmentContent)
ToDoAttachment Constructor creating a new attachment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
anonymize()
byte[]
getAttachmentContent()
Method returning the content of an attachment.java.lang.String
getAttachmentName()
Method returning the name of the attachment.java.lang.String
getContentId()
Method returning the contentId of the attachment.java.lang.Long
getId()
Method returning a canonical id of the object.java.lang.Integer
getIndexState()
java.lang.String
getSearchVector()
java.lang.Integer
getVersion()
Method returning the version of the instancejava.lang.Boolean
isActive()
Method that returns whether the instance is active or not (means: logically deleted)void
setActive(java.lang.Boolean active)
Method setting the active flag.void
setAttachmentContent(byte[] attachmentContent)
Method setting the byte content of an attachment.void
setAttachmentName(java.lang.String attachmentName)
Method setting the name of the attachment.void
setContentId(java.lang.String contentId)
Method setting the contentId of the attachment.void
setId(java.lang.Long id)
Method setting the canonical id of the object.void
setInactive()
Method to delete an object logically.void
setIndexState(java.lang.Integer indexState)
void
setToActive()
Method to undelete an object logically.void
setVersion(java.lang.Integer version)
Method setting the version of the instance, Should under normal circumstances not be manually invoked.-
Methods inherited from class com.proxemo.todo4.bom.ToDoVersionedIdentifiable
getActiveAsIcon, getAnonymizeString, getCanonicalId, isTransient, setToTransient
-
-
-
-
Field Detail
-
INDEXSTATE_NONE
public static final int INDEXSTATE_NONE
- See Also:
- Constant Field Values
-
INDEXSTATE_OK
public static final int INDEXSTATE_OK
- See Also:
- Constant Field Values
-
INDEXSTATE_ERROR
public static final int INDEXSTATE_ERROR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ToDoAttachment
public ToDoAttachment(ToDoAttachmentProxy proxy)
Constructor using ancom.proxemo.todo.bom.ToDoAttachmentProxy
.- Parameters:
proxy
- acom.proxemo.todo.bom.ToDoAttachmentProxy
whose name and attachmentId is used.
-
ToDoAttachment
public ToDoAttachment()
Default Constructor.
-
ToDoAttachment
public ToDoAttachment(java.lang.String attachmentName, byte[] attachmentContent)
ToDoAttachment Constructor creating a new attachment.- Parameters:
attachmentName
- the name of the newly created attachmentattachmentContent
- the byte content of the attachment
-
-
Method Detail
-
getAttachmentContent
public byte[] getAttachmentContent()
Method returning the content of an attachment. Be careful. Do not modify the byte content! It is a reference to the content and not copied due to efficiency.- Returns:
- the byte content of the attachment
-
setAttachmentContent
public void setAttachmentContent(byte[] attachmentContent)
Method setting the byte content of an attachment.- Parameters:
attachmentContent
- the byte content of the attachment
-
getAttachmentName
public java.lang.String getAttachmentName()
Method returning the name of the attachment.- Returns:
- name of the attachment
-
setAttachmentName
public void setAttachmentName(java.lang.String attachmentName)
Method setting the name of the attachment.- Parameters:
attachmentName
- name of the attachment
-
getContentId
public java.lang.String getContentId()
Method returning the contentId of the attachment. The contentId is the id of thecom.proxemo.todo.bom.ToDoAttachmentProxy
.- Returns:
- contentId of the attachment
-
setContentId
public void setContentId(java.lang.String contentId)
Method setting the contentId of the attachment. The contentId is the id of thecom.proxemo.todo.bom.ToDoAttachmentProxy
.- Parameters:
contentId
- of the attachment
-
anonymize
public void anonymize()
- Specified by:
anonymize
in classToDoVersionedIdentifiable
-
getId
public java.lang.Long getId()
Description copied from class:ToDoVersionedIdentifiable
Method returning a canonical id of the object. Transient objects return -1;- Specified by:
getId
in classToDoVersionedIdentifiable
- Returns:
- id the id of the object. Id is canonical for all instances of a class.
-
setId
public void setId(java.lang.Long id)
Description copied from class:ToDoVersionedIdentifiable
Method setting the canonical id of the object. Should under normal circumstances not be manually invoked.- Specified by:
setId
in classToDoVersionedIdentifiable
- Parameters:
id
- id of the object
-
getVersion
public java.lang.Integer getVersion()
Description copied from class:ToDoVersionedIdentifiable
Method returning the version of the instance- Specified by:
getVersion
in classToDoVersionedIdentifiable
- Returns:
- the version
-
setVersion
public void setVersion(java.lang.Integer version)
Description copied from class:ToDoVersionedIdentifiable
Method setting the version of the instance, Should under normal circumstances not be manually invoked.- Specified by:
setVersion
in classToDoVersionedIdentifiable
- Parameters:
version
- of the object
-
isActive
public java.lang.Boolean isActive()
Description copied from class:ToDoVersionedIdentifiable
Method that returns whether the instance is active or not (means: logically deleted)- Specified by:
isActive
in classToDoVersionedIdentifiable
- Returns:
- boolean whether the object is active
-
setActive
public void setActive(java.lang.Boolean active)
Description copied from class:ToDoVersionedIdentifiable
Method setting the active flag. Invoking this method with false logically deletes the instance in the database.- Specified by:
setActive
in classToDoVersionedIdentifiable
- Parameters:
active
- is the object active or not
-
setToActive
public void setToActive()
Description copied from class:ToDoVersionedIdentifiable
Method to undelete an object logically.- Specified by:
setToActive
in classToDoVersionedIdentifiable
-
setInactive
public void setInactive()
Description copied from class:ToDoVersionedIdentifiable
Method to delete an object logically.- Specified by:
setInactive
in classToDoVersionedIdentifiable
-
getIndexState
public java.lang.Integer getIndexState()
-
setIndexState
public void setIndexState(java.lang.Integer indexState)
-
getSearchVector
public java.lang.String getSearchVector()
-
-