Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.robrua.orianna.type.dto.matchhistory;
  
  import java.util.HashSet;
  import java.util.List;
  import java.util.Set;
  
 
 
 @Table(name = "playerhistory")
 public class PlayerHistory extends OriannaDto {
     private static final long serialVersionUID = 6788206005416074179L;
 
     @Id
     @GeneratedValue(strategy = .)
     private long dbId;
 
     @OneToMany(cascade = .)
     private List<MatchSummarymatches;
 
     /*
      * (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 PlayerHistory)) {
             return false;
         }
         final PlayerHistory other = (PlayerHistory)obj;
         if( == null) {
             if(other.matches != null) {
                 return false;
             }
         }
         else if(!.equals(other.matches)) {
             return false;
         }
         return true;
     }

    
Gets all stored champion IDs for batch lookup

Returns:
the champion IDs
 
     public Set<LonggetChampionIDs() {
         final Set<Longset = new HashSet<>();
         for(final MatchSummary match : ) {
             set.addAll(match.getChampionIDs());
         }
 
         return set;
     }
 
     @Override
     public String getDataStoreIndexField(final Class<?> keyType) {
         if(keyType.equals(Long.class)) {
             return "dbId";
         }
         return null;
     }

    
Gets all stored item IDs for batch lookup

Returns:
the item IDs
 
     public Set<LonggetItemIDs() {
         final Set<Longset = new HashSet<>();
         for(final MatchSummary match : ) {
             set.addAll(match.getItemIDs());
         }
 
         return set;
     }

    
Gets all stored mastery IDs for batch lookup

Returns:
the mastery IDs
 
     public Set<LonggetMasteryIDs() {
         final Set<Longset = new HashSet<>();
         for(final MatchSummary match : ) {
            set.addAll(match.getMasteryIDs());
        }
        return set;
    }

    

Returns:
the matches
    public List<MatchSummarygetMatches() {
        return ;
    }

    
Gets all stored rune IDs for batch lookup

Returns:
the rune IDs
    public Set<LonggetRuneIDs() {
        final Set<Longset = new HashSet<>();
        for(final MatchSummary match : ) {
            set.addAll(match.getRuneIDs());
        }
        return set;
    }

    
Gets all stored summoner IDs for batch lookup

Returns:
the summoner IDs
    public Set<LonggetSummonerIDs() {
        final Set<Longset = new HashSet<>();
        for(final MatchSummary match : ) {
            set.addAll(match.getSummonerIDs());
        }
        return set;
    }

    
Gets all stored summoner spell IDs for batch lookup

Returns:
the summoner spell IDs
    public Set<LonggetSummonerSpellIDs() {
        final Set<Longset = new HashSet<>();
        for(final MatchSummary match : ) {
            set.addAll(match.getSummonerSpellIDs());
        }
        return set;
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ( == null ? 0 : .hashCode());
        return result;
    }

    

Parameters:
matches the matches to set
    public void setMatches(final List<MatchSummarymatches) {
        this. = matches;
    }
    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "PlayerHistory [matches=" +  + "]";
    }
New to GrepCode? Check out our FAQ X