de.hattrickorganizer.model.matches
Class MatchHelper

java.lang.Object
  extended by de.hattrickorganizer.model.matches.MatchHelper
All Implemented Interfaces:
IMatchHelper

public class MatchHelper
extends java.lang.Object
implements IMatchHelper

Helper class to retrieve match related information.

Author:
aik

Field Summary
 
Fields inherited from interface plugins.IMatchHelper
AWAY_DERBY, AWAY_MATCH, FOREIGN_MATCH, HOME_MATCH, NEUTRAL_GROUND, UNKNOWN
 
Constructor Summary
MatchHelper()
           
 
Method Summary
 short getLocation(IMatchKurzInfo match)
          Get the match location.
 short getLocation(int matchId)
          Get the match location.
 short getLocation(int homeTeamId, int awayTeamId, int matchId, int matchType)
          Get the match location.
static IMatchHelper instance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatchHelper

public MatchHelper()
Method Detail

instance

public static IMatchHelper instance()

getLocation

public short getLocation(IMatchKurzInfo match)
Get the match location. (using constants from IMatchHelper)

Specified by:
getLocation in interface IMatchHelper
Parameters:
match - match short info

getLocation

public short getLocation(int matchId)
Get the match location. (using constants from IMatchHelper)

Specified by:
getLocation in interface IMatchHelper
Parameters:
matchId - match Id

getLocation

public short getLocation(int homeTeamId,
                         int awayTeamId,
                         int matchId,
                         int matchType)
Get the match location. (using constants from IMatchHelper)

Specified by:
getLocation in interface IMatchHelper
Parameters:
homeTeamId - home team Id
awayTeamId - away team Id
matchId - match Id
matchType - match Type (league, cup, friendly...) from IMatchLineup