Class Photo
- java.lang.Object
-
- edu.cnm.deepdive.picmegallery.model.entity.Photo
-
@Entity public class Photo extends Object
Photo is a @Entity class with the following fields id, event, uploaded, longitude, latitude, uploaded, and caption. All of the fields in this class are attributes of Photo and help form the structure of the PicMe Gallery database.
-
-
Constructor Summary
Constructors Constructor Description Photo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCaption()
Gets the caption of a Photo.Event
getEvent()
Gets the Event associated with the Photo.Long
getId()
Gets the Photo idDouble
getLatitude()
Gets the latitude of a photo.Double
getLongitude()
Gets the longitude of a photo.Date
getUploaded()
Gets the time stamp of when a photo is uploaded.User
getUser()
Gets the user that that is associated with a Photo.void
setCaption(String caption)
Sets the caption of a Photo.void
setEvent(Event event)
Sets the Event that is associated with a Photo.void
setLatitude(Double latitude)
Sets the latitude where a photo was taken.void
setLongitude(Double longitude)
Sets the longitude where a photo was taken.void
setUser(User user)
Sets the user that is associated with a Photo.
-
-
-
Method Detail
-
getId
public Long getId()
Gets the Photo id- Returns:
- the photo id.
-
getLatitude
@Nullable public Double getLatitude()
Gets the latitude of a photo.- Returns:
- the latitude of a photo.
-
setLatitude
public void setLatitude(@Nullable Double latitude)
Sets the latitude where a photo was taken.
-
getLongitude
@Nullable public Double getLongitude()
Gets the longitude of a photo.- Returns:
- the longitude of a photo.
-
setLongitude
public void setLongitude(@Nullable Double longitude)
Sets the longitude where a photo was taken.
-
getEvent
public Event getEvent()
Gets the Event associated with the Photo.- Returns:
- the Event associated with the Photo.
-
setEvent
public void setEvent(Event event)
Sets the Event that is associated with a Photo.
-
getUser
public User getUser()
Gets the user that that is associated with a Photo.- Returns:
- the user that is associated with a Photo.
-
setUser
public void setUser(User user)
Sets the user that is associated with a Photo.
-
getCaption
@Nullable public String getCaption()
Gets the caption of a Photo.- Returns:
- the caption of a Photo.
-
setCaption
public void setCaption(@Nullable String caption)
Sets the caption of a Photo.
-
getUploaded
@NonNull public Date getUploaded()
Gets the time stamp of when a photo is uploaded.- Returns:
- the time stamp of when a photo is uploaded.
-
-