org.kuali.rice.krad.bo
Class Attachment

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.krad.bo.Attachment
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject

@Entity
public class Attachment
extends PersistableBusinessObjectBase

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
Attachment()
          Default constructor.
 
Method Summary
 InputStream getAttachmentContents()
           
 String getAttachmentFileName()
          Gets the attachmentFileName attribute.
 Long getAttachmentFileSize()
          Gets the attachmentFileSize attribute.
 String getAttachmentFileSizeWithUnits()
          Returns the size of the attachment with units (byte, kilobyte, ...)
 String getAttachmentIdentifier()
          Gets the attachmentIdentifier attribute.
 String getAttachmentMimeTypeCode()
          Gets the attachmentMimeTypeCode attribute.
 String getAttachmentTypeCode()
          Gets the attachmentTypeCode attribute.
 Note getNote()
          Gets the note attribute.
 Long getNoteIdentifier()
          Gets the noteIdentifier attribute.
 boolean isComplete()
           
 void setAttachmentFileName(String attachmentFileName)
          Sets the attachmentFileName attribute.
 void setAttachmentFileSize(Long attachmentFileSize)
          Sets the attachmentFileSize attribute.
 void setAttachmentIdentifier(String attachmentIdentifier)
          Sets the attachmentIdentifier attribute.
 void setAttachmentMimeTypeCode(String attachmentMimeTypeCode)
          Sets the attachmentMimeTypeCode attribute.
 void setAttachmentTypeCode(String attachmentTypeCode)
          Sets the attachmentTypeCode attribute.
 void setNote(Note note)
          Sets the note attribute value.
 void setNoteIdentifier(Long noteIdentifier)
          Sets the noteIdentifier attribute.
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
 

Constructor Detail

Attachment

public Attachment()
Default constructor.

Method Detail

getNoteIdentifier

public Long getNoteIdentifier()
Gets the noteIdentifier attribute.

Returns:
Returns the noteIdentifier

setNoteIdentifier

public void setNoteIdentifier(Long noteIdentifier)
Sets the noteIdentifier attribute.

Parameters:
noteIdentifier - The noteIdentifier to set.

getAttachmentMimeTypeCode

public String getAttachmentMimeTypeCode()
Gets the attachmentMimeTypeCode attribute.

Returns:
Returns the attachmentMimeTypeCode

setAttachmentMimeTypeCode

public void setAttachmentMimeTypeCode(String attachmentMimeTypeCode)
Sets the attachmentMimeTypeCode attribute.

Parameters:
attachmentMimeTypeCode - The attachmentMimeTypeCode to set.

getAttachmentFileName

public String getAttachmentFileName()
Gets the attachmentFileName attribute.

Returns:
Returns the attachmentFileName

setAttachmentFileName

public void setAttachmentFileName(String attachmentFileName)
Sets the attachmentFileName attribute.

Parameters:
attachmentFileName - The attachmentFileName to set.

getAttachmentIdentifier

public String getAttachmentIdentifier()
Gets the attachmentIdentifier attribute.

Returns:
Returns the attachmentIdentifier

setAttachmentIdentifier

public void setAttachmentIdentifier(String attachmentIdentifier)
Sets the attachmentIdentifier attribute.

Parameters:
attachmentIdentifier - The attachmentIdentifier to set.

getAttachmentFileSize

public Long getAttachmentFileSize()
Gets the attachmentFileSize attribute.

Returns:
Returns the attachmentFileSize

setAttachmentFileSize

public void setAttachmentFileSize(Long attachmentFileSize)
Sets the attachmentFileSize attribute.

Parameters:
attachmentFileSize - The attachmentFileSize to set.

getAttachmentFileSizeWithUnits

public String getAttachmentFileSizeWithUnits()
Returns the size of the attachment with units (byte, kilobyte, ...)

Returns:
String attachment file size

getAttachmentTypeCode

public String getAttachmentTypeCode()
Gets the attachmentTypeCode attribute.

Returns:
Returns the attachmentTypeCode

setAttachmentTypeCode

public void setAttachmentTypeCode(String attachmentTypeCode)
Sets the attachmentTypeCode attribute.

Parameters:
attachmentTypeCode - The attachmentTypeCode to set.

getNote

public Note getNote()
Gets the note attribute.

Returns:
Returns the note.

setNote

public void setNote(Note note)
Sets the note attribute value.

Parameters:
note - The note to set.

isComplete

public boolean isComplete()
Returns:
false if any of the required fields (attachmentId, fileName, fileSize, and mimeType) are blank

getAttachmentContents

public InputStream getAttachmentContents()
                                  throws IOException
Throws:
IOException


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.