Class CourseComment
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.DatabaseBlobBean
org.deltava.beans.AbstractComment
org.deltava.beans.academy.CourseComment
- All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, IDBean, Cacheable
A bean to store comments between Instructors and Students.
- Since:
- 1.0
- Version:
- 9.0
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class DatabaseBlobBean
_buffer -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractComment
compareTo, getAuthorID, getBody, getBuffer, getCreatedOn, getExtension, getName, getParentID, getSize, setAuthorID, setBody, setCreatedOn, setName, setParentID, setSizeModifier and TypeMethodDescriptionintintReturns the Author of this bean.getBody()Returns the body text of this Comment.byte[]Returns the file buffer.Returns the creation date of this Comment.Returns the file extension.getName()Returns the name of the attachment.intReturns the parent record's database ID.intgetSize()Returns the size of the attachment.voidsetAuthorID(int id) Updates the author of this bean.voidUpdates the body text of this Comment.voidsetCreatedOn(Instant dt) Updates the creation date of this Comment.voidUpdates the name of the attachment.voidsetParentID(int id) Updates the ID of the parent record.voidsetSize(int size) Updates the size of the attachment.Methods inherited from class DatabaseBlobBean
clear, getInputStream, isLoaded, load, loadModifier and TypeMethodDescriptionvoidclear()Clears the buffer.Returns the content of the buffer.booleanisLoaded()Returns whether the buffer has been populated.voidload(byte[] buffer) Replaces the buffer data.voidload(InputStream is) Loads the contents of a stream into the buffer.Methods inherited from class DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateIDModifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.booleangetHexID()Returns the hexadecimal database ID of this object.intgetID()Returns the database ID of this object.inthashCode()voidsetID(int id) Update the database row ID of this bean.static voidvalidateID(int oldID, int newID) Validates a database ID.static voidvalidateID(int oldID, int newID, boolean allowZero) Validates a database ID.
-
Constructor Details
-
CourseComment
public CourseComment(int courseID, int authorID) Creates a new Comment bean.- Parameters:
courseID- the database ID of the CourseauthorID- the database ID of the author- Throws:
IllegalArgumentException- if courseID or authorID are zero or negative
-