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 StringgetCaption()Gets the caption of a Photo.EventgetEvent()Gets the Event associated with the Photo.LonggetId()Gets the Photo idDoublegetLatitude()Gets the latitude of a photo.DoublegetLongitude()Gets the longitude of a photo.DategetUploaded()Gets the time stamp of when a photo is uploaded.UsergetUser()Gets the user that that is associated with a Photo.voidsetCaption(String caption)Sets the caption of a Photo.voidsetEvent(Event event)Sets the Event that is associated with a Photo.voidsetLatitude(Double latitude)Sets the latitude where a photo was taken.voidsetLongitude(Double longitude)Sets the longitude where a photo was taken.voidsetUser(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.
-
-