public class AttachmentData extends com.atlassian.core.bean.EntityObject implements FileExportable
This class is designed to only be used once, since the InputStream can only be used once. It should only be used within the AttachmentDataDao classes, when dealing with database Attachment storage.
Once an object has been used in a Hibernate session (e.g. saved), it should be evicted from the session, otherwise the object may be cached and a consumed InputStream will be returned the next time the object is used. Evicting it will cause a new object to be created.
Constructor and Description |
---|
AttachmentData() |
AttachmentData(int version,
Attachment attachment,
InputStream data) |
Modifier and Type | Method and Description |
---|---|
Attachment |
getAttachment() |
InputStream |
getData() |
protected int |
getHibernateVersion() |
int |
getVersion() |
void |
setAttachment(Attachment attachment) |
void |
setData(InputStream data) |
protected void |
setHibernateVersion(int hibernateVersion) |
void |
setVersion(int version) |
public AttachmentData()
public AttachmentData(int version, Attachment attachment, InputStream data)
public int getVersion()
public void setVersion(int version)
public Attachment getAttachment()
public void setAttachment(Attachment attachment)
public InputStream getData()
public void setData(InputStream data)
protected int getHibernateVersion()
protected void setHibernateVersion(int hibernateVersion)
Copyright © 2003–2019 Atlassian. All rights reserved.