Class BookmarkEntityPK

java.lang.Object
org.glassfish.jersey.examples.bookmark_em.entity.BookmarkEntityPK
All Implemented Interfaces:
Serializable

@Embeddable public class BookmarkEntityPK extends Object implements Serializable
Primary Key class BookmarkEntityPK for entity class BookmarkEntity.
Author:
Jakub Podlesak
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of BookmarkEntityPK
    Creates a new instance of BookmarkEntityPK with the specified values.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
    Determines whether another object is equal to this BookmarkEntityPK.
    Gets the bmid of this BookmarkEntityPK.
    Gets the userid of this BookmarkEntityPK.
    int
    Returns a hash code value for the object.
    void
    Sets the bmid of this BookmarkEntityPK to the specified value.
    void
    setUserid(String userid)
    Sets the userid of this BookmarkEntityPK to the specified value.
    Returns a string representation of the object.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BookmarkEntityPK

      public BookmarkEntityPK()
      Creates a new instance of BookmarkEntityPK
    • BookmarkEntityPK

      public BookmarkEntityPK(String bmid, String userid)
      Creates a new instance of BookmarkEntityPK with the specified values.
      Parameters:
      bmid - the bmid of the BookmarkEntityPK
      userid - the userid of the BookmarkEntityPK
  • Method Details

    • getUserid

      public String getUserid()
      Gets the userid of this BookmarkEntityPK.
      Returns:
      the userid
    • setUserid

      public void setUserid(String userid)
      Sets the userid of this BookmarkEntityPK to the specified value.
      Parameters:
      userid - the new userid
    • getBmid

      public String getBmid()
      Gets the bmid of this BookmarkEntityPK.
      Returns:
      the bmid
    • setBmid

      public void setBmid(String bmid)
      Sets the bmid of this BookmarkEntityPK to the specified value.
      Parameters:
      bmid - the new bmid
    • hashCode

      public int hashCode()
      Returns a hash code value for the object. This implementation computes a hash code value based on the id fields in this object.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
    • equals

      public boolean equals(Object object)
      Determines whether another object is equal to this BookmarkEntityPK. The result is true if and only if the argument is not null and is a BookmarkEntityPK object that has the same id field values as this object.
      Overrides:
      equals in class Object
      Parameters:
      object - the reference object with which to compare
      Returns:
      true if this object is the same as the argument; false otherwise.
    • toString

      public String toString()
      Returns a string representation of the object. This implementation constructs that representation based on the id fields.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.