palio.modules.forum.dao
Class AttachmentDAO

java.lang.Object
  extended by palio.modules.forum.dao.AttachmentDAO
All Implemented Interfaces:
SimpleDAO

public class AttachmentDAO
extends java.lang.Object
implements SimpleDAO

Author:
leszek TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
AttachmentDAO()
           
 
Method Summary
 void delete(SQLConnectable connector)
           
static java.util.LinkedList getActiveAttachments(SQLConnectable connector, java.lang.Long messageId)
           
 byte[] getAttachmentContent(SQLConnectable connector)
           
 byte[] getContent()
           
 java.lang.String getFileName()
           
 java.lang.String getFilePath()
           
 java.lang.Long getFileSize()
           
 java.lang.Long getId()
           
 java.lang.Long getMessageId()
           
 java.lang.String getMimeType()
           
 java.lang.String getType()
           
 void retrieve(SQLConnectable connector, java.lang.Object id)
          Pobiera dane do pustego obiektu.
 void save(SQLConnectable connector)
          Zapisuje obiekt w bazie danych; dane obiektu muszą być wypełnione!
 void setContent(byte[] content)
           
 void setFileName(java.lang.String fileName)
           
 void setFilePath(java.lang.String filePath)
           
 void setFileSize(java.lang.Long fileSize)
           
 void setId(java.lang.Long id)
           
 void setMessageId(java.lang.Long messageId)
           
 void setMimeType(java.lang.String mimeType)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentDAO

public AttachmentDAO()
Method Detail

save

public void save(SQLConnectable connector)
          throws palio.PalioException,
                 DAOException
Description copied from interface: SimpleDAO
Zapisuje obiekt w bazie danych; dane obiektu muszą być wypełnione! Jeżeli obiekt istnieje, jest on update-owany.

Specified by:
save in interface SimpleDAO
Throws:
DAOException
palio.PalioException

retrieve

public void retrieve(SQLConnectable connector,
                     java.lang.Object id)
              throws palio.PalioException,
                     DAOException
Description copied from interface: SimpleDAO
Pobiera dane do pustego obiektu.

Specified by:
retrieve in interface SimpleDAO
id - identyfikator obiektu w bazie
Throws:
DAOException
palio.PalioException

getActiveAttachments

public static java.util.LinkedList getActiveAttachments(SQLConnectable connector,
                                                        java.lang.Long messageId)
                                                 throws palio.PalioException
Throws:
palio.PalioException

getAttachmentContent

public byte[] getAttachmentContent(SQLConnectable connector)
                            throws palio.PalioException
Throws:
palio.PalioException

delete

public void delete(SQLConnectable connector)
            throws palio.PalioException
Throws:
palio.PalioException

getContent

public byte[] getContent()
Returns:
Returns the content.

setContent

public void setContent(byte[] content)
Parameters:
content - The content to set.

getFileName

public java.lang.String getFileName()
Returns:
Returns the fileName.

setFileName

public void setFileName(java.lang.String fileName)
Parameters:
fileName - The fileName to set.

getFilePath

public java.lang.String getFilePath()
Returns:
Returns the filePath.

setFilePath

public void setFilePath(java.lang.String filePath)
Parameters:
filePath - The filePath to set.

getFileSize

public java.lang.Long getFileSize()
Returns:
Returns the fileSize.

setFileSize

public void setFileSize(java.lang.Long fileSize)
Parameters:
fileSize - The fileSize to set.

getId

public java.lang.Long getId()
Returns:
Returns the id.

setId

public void setId(java.lang.Long id)
Parameters:
id - The id to set.

getMessageId

public java.lang.Long getMessageId()
Returns:
Returns the messageId.

setMessageId

public void setMessageId(java.lang.Long messageId)
Parameters:
messageId - The messageId to set.

getMimeType

public java.lang.String getMimeType()
Returns:
Returns the mimeType.

setMimeType

public void setMimeType(java.lang.String mimeType)
Parameters:
mimeType - The mimeType to set.

getType

public java.lang.String getType()
Returns:
Returns the type.

setType

public void setType(java.lang.String type)
Parameters:
type - The type to set.