Class Tags

  • All Implemented Interfaces:
    java.io.Serializable

    @Entity
    public class Tags
    extends java.lang.Object
    implements java.io.Serializable
    Hibernate database class for the table TAGS
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int id  
      private int photoId  
      private static long serialVersionUID  
      private java.lang.String tag  
    • Constructor Summary

      Constructors 
      Constructor Description
      Tags()  
      Tags​(java.lang.String tag, int photoId)  
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Equals method for tags Tags are equal if they have the same String tag (the text in the tag) and int photo_id (the id of the photo it belong to)
      int getId()  
      int getPhotoId()  
      java.lang.String getTag()  
      int hashCode()
      Generates hashcode for the tag, based on the attributes used in the equals method
      void setId​(int id)  
      void setPhotoId​(int photoId)  
      void setTag​(java.lang.String tag)  
      • Methods inherited from class java.lang.Object

        clone, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • id

        private int id
      • tag

        private java.lang.String tag
      • photoId

        private int photoId
    • Constructor Detail

      • Tags

        public Tags()
      • Tags

        public Tags​(java.lang.String tag,
                    int photoId)
    • Method Detail

      • getId

        public int getId()
      • setId

        public void setId​(int id)
      • getTag

        public java.lang.String getTag()
      • setTag

        public void setTag​(java.lang.String tag)
      • getPhotoId

        public int getPhotoId()
      • setPhotoId

        public void setPhotoId​(int photoId)
      • equals

        public boolean equals​(java.lang.Object o)
        Equals method for tags Tags are equal if they have the same String tag (the text in the tag) and int photo_id (the id of the photo it belong to)
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - an object o
        Returns:
        boolean true/false, depending on if the object is equal to the tag or not.
      • hashCode

        public int hashCode()
        Generates hashcode for the tag, based on the attributes used in the equals method
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashcode for the tag