Package Database.HibernateClasses
Class Tags
- java.lang.Object
-
- Database.HibernateClasses.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
-
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 methodvoid
setId(int id)
void
setPhotoId(int photoId)
void
setTag(java.lang.String tag)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
id
private int id
-
tag
private java.lang.String tag
-
photoId
private 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 classjava.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 classjava.lang.Object
- Returns:
- the hashcode for the tag
-
-