Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.robrua.orianna.type.dto.match;
  
 
 
 @Table(name = "participantidentity")
 public class ParticipantIdentity extends OriannaDto {
     private static final long serialVersionUID = 7691992421814077470L;
     @Id
     @GeneratedValue(strategy = .)
     private long dbId;
 
     private Integer participantId;
 
     @OneToOne(cascade = .)
     private Player player;
 
     /*
      * (non-Javadoc)
      * @see java.lang.Object#equals(java.lang.Object)
      */
     @Override
     public boolean equals(final Object obj) {
         if(this == obj) {
             return true;
         }
         if(obj == null) {
             return false;
         }
         if(!(obj instanceof ParticipantIdentity)) {
             return false;
         }
         final ParticipantIdentity other = (ParticipantIdentity)obj;
         if( == null) {
             if(other.participantId != null) {
                 return false;
             }
         }
         else if(!.equals(other.participantId)) {
             return false;
         }
         if( == null) {
             if(other.player != null) {
                 return false;
             }
         }
         else if(!.equals(other.player)) {
             return false;
         }
         return true;
     }
 
     @Override
     public String getDataStoreIndexField(final Class<?> keyType) {
         if(keyType.equals(Long.class)) {
             return "dbId";
         }
         return null;
     }

    

Returns:
the participantId
 
     public Integer getParticipantId() {
         return ;
     }

    

Returns:
the player
 
     public Player getPlayer() {
         return ;
     }
 
     /*
      * (non-Javadoc)
      * @see java.lang.Object#hashCode()
      */
     @Override
     public int hashCode() {
         final int prime = 31;
         int result = 1;
         result = prime * result + ( == null ? 0 : .hashCode());
         result = prime * result + ( == null ? 0 : .hashCode());
         return result;
     }

    

Parameters:
participantId the participantId to set
 
    public void setParticipantId(final Integer participantId) {
        this. = participantId;
    }

    

Parameters:
player the player to set
    public void setPlayer(final Player player) {
        this. = player;
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "ParticipantIdentity [participantId=" +  + ", player=" +  + "]";
    }
New to GrepCode? Check out our FAQ X