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.SerializableHibernate database class for the table TAGS- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intidprivate intphotoIdprivate static longserialVersionUIDprivate java.lang.Stringtag
-
Method Summary
Modifier and Type Method Description booleanequals(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)intgetId()intgetPhotoId()java.lang.StringgetTag()inthashCode()Generates hashcode for the tag, based on the attributes used in the equals methodvoidsetId(int id)voidsetPhotoId(int photoId)voidsetTag(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:
equalsin 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:
hashCodein classjava.lang.Object- Returns:
- the hashcode for the tag
-
-