Package com.example.qrgo.models
Class Comment
- java.lang.Object
-
- com.example.qrgo.models.Comment
-
public class Comment extends java.lang.Object
The Comment class represents a comment that a player leaves on a QR code. It contains information such as the comment ID, comment text, QR code ID, player username, date, and player first and last name.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
commentId
protected java.lang.String
commentString
protected java.util.Date
date
protected java.lang.String
datetime
protected java.lang.String
playerFirstName
protected java.lang.String
playerLastName
protected java.lang.String
playerUsername
protected java.lang.String
qrCodeId
-
Constructor Summary
Constructors Constructor Description Comment(java.lang.String commentId, java.lang.String commentString, java.lang.String qrCodeId, java.lang.String playerUsername, java.lang.String playerFirstName, java.lang.String playerLastName, java.util.Date date)
Constructs a Comment object with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCommentId()
Returns the ID of the comment.java.lang.String
getCommentString()
Returns the text of the comment.java.util.Date
getDate()
Returns the date when the comment was made.java.lang.String
getPlayerFirstName()
Returns the first name of the player.java.lang.String
getPlayerLastName()
Returns the last name of the player.java.lang.String
getPlayerUsername()
Returns the username of the player who made the comment.java.lang.String
getQrCodeId()
Returns the ID of the QR code that the comment belongs to.void
setCommentId(java.lang.String commentId)
Sets the ID of the comment.void
setCommentString(java.lang.String commentString)
Sets the text of the comment.void
setDate(java.util.Date date)
Sets the date when the comment was made.void
setPlayerFirstName(java.lang.String playerFirstName)
Sets the first name of the player.void
setPlayerLastName(java.lang.String playerLastName)
Sets the last name of the player.void
setPlayerUsername(java.lang.String playerUsername)
Sets the username of the player who made the comment.void
setQrCodeId(java.lang.String qrCodeId)
Sets the ID of the QR code that the comment belongs to.
-
-
-
Field Detail
-
commentId
protected java.lang.String commentId
-
commentString
protected java.lang.String commentString
-
qrCodeId
protected java.lang.String qrCodeId
-
playerUsername
protected java.lang.String playerUsername
-
datetime
protected java.lang.String datetime
-
playerFirstName
protected java.lang.String playerFirstName
-
playerLastName
protected java.lang.String playerLastName
-
date
protected java.util.Date date
-
-
Constructor Detail
-
Comment
public Comment(java.lang.String commentId, java.lang.String commentString, java.lang.String qrCodeId, java.lang.String playerUsername, java.lang.String playerFirstName, java.lang.String playerLastName, java.util.Date date)
Constructs a Comment object with the specified parameters.- Parameters:
commentId
- the ID of the commentcommentString
- the text of the commentqrCodeId
- the ID of the QR code that the comment belongs toplayerUsername
- the username of the player who made the commentplayerFirstName
- the first name of the player who made the commentplayerLastName
- the last name of the player who made the commentdate
- the date when the comment was made
-
-
Method Detail
-
getCommentId
public java.lang.String getCommentId()
Returns the ID of the comment.- Returns:
- the ID of the comment
-
setCommentId
public void setCommentId(java.lang.String commentId)
Sets the ID of the comment.- Parameters:
commentId
- the ID of the comment
-
getCommentString
public java.lang.String getCommentString()
Returns the text of the comment.- Returns:
- the text of the comment
-
setCommentString
public void setCommentString(java.lang.String commentString)
Sets the text of the comment.- Parameters:
commentString
- the text of the comment
-
getPlayerFirstName
public java.lang.String getPlayerFirstName()
Returns the first name of the player.- Returns:
- the first name of the player.
-
setPlayerFirstName
public void setPlayerFirstName(java.lang.String playerFirstName)
Sets the first name of the player.- Parameters:
playerFirstName
- the first name of the player.
-
getPlayerLastName
public java.lang.String getPlayerLastName()
Returns the last name of the player.- Returns:
- the last name of the player.
-
setPlayerLastName
public void setPlayerLastName(java.lang.String playerLastName)
Sets the last name of the player.- Parameters:
playerLastName
- the last name of the player.
-
getQrCodeId
public java.lang.String getQrCodeId()
Returns the ID of the QR code that the comment belongs to.- Returns:
- the ID of the QR code that the comment belongs to
-
setQrCodeId
public void setQrCodeId(java.lang.String qrCodeId)
Sets the ID of the QR code that the comment belongs to.- Parameters:
qrCodeId
- the ID of the QR code that the comment belongs to
-
getPlayerUsername
public java.lang.String getPlayerUsername()
Returns the username of the player who made the comment.- Returns:
- the username of the player who made the comment
-
setPlayerUsername
public void setPlayerUsername(java.lang.String playerUsername)
Sets the username of the player who made the comment.- Parameters:
playerUsername
- the username of the player who made the comment
-
getDate
public java.util.Date getDate()
Returns the date when the comment was made.- Returns:
- the date when the comment was made
-
setDate
public void setDate(java.util.Date date)
Sets the date when the comment was made.- Parameters:
date
- the date of the comment
-
-