@Entity
public class Tag
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Tag() |
Tag(java.lang.String tagname,
long photographId) |
Tag(TagPK tagPK) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
Photograph |
getPhotograph()
Get the photograph associated with this key.
|
TagPK |
getTagPK()
Returns the primary key of a Tag, consisting of a tagname and the photograph id.
|
int |
hashCode() |
void |
setPhotograph(Photograph photograph)
Indicate which photograph matches this tag.
|
void |
setTagPK(TagPK tagPK)
Sets the primary key of a Tag.
|
java.lang.String |
toString() |
protected TagPK tagPK
public Tag()
public Tag(TagPK tagPK)
public Tag(java.lang.String tagname, long photographId)
public TagPK getTagPK()
public void setTagPK(TagPK tagPK)
tagPK
- primary key of a Tagpublic Photograph getPhotograph()
public void setPhotograph(Photograph photograph)
photograph
- the photograph that corresponds to the tagname.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object