de.hattrickorganizer.database
Class DBAdapter

java.lang.Object
  extended by de.hattrickorganizer.database.DBAdapter
All Implemented Interfaces:
IDBAdapter

public class DBAdapter
extends java.lang.Object
implements IDBAdapter

Adapter to make some basic DBZugriff functions accessible for plugins.

Author:
aik

Constructor Summary
DBAdapter()
           
 
Method Summary
 int getHrfIDSameTraining(java.sql.Timestamp time)
          Returns an HRF before the matchData and after previous TrainingTime.
 ITeam getTeam(int hrfID)
          Returns the Team object for the given hrf dataset.
 int getTrainerType(int hrfID)
          Returns the trainer code for the specified hrf.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBAdapter

public DBAdapter()
Method Detail

getHrfIDSameTraining

public int getHrfIDSameTraining(java.sql.Timestamp time)
Returns an HRF before the matchData and after previous TrainingTime.

Specified by:
getHrfIDSameTraining in interface IDBAdapter
Parameters:
timestamp - matchData
Returns:
the ID of the HRF dataset

getTeam

public ITeam getTeam(int hrfID)
Returns the Team object for the given hrf dataset.

Specified by:
getTeam in interface IDBAdapter
Parameters:
hrfID - HRF for which to load Team
Returns:
the team information for to the given hrf id

getTrainerType

public int getTrainerType(int hrfID)
Returns the trainer code for the specified hrf. -99 if error.

Specified by:
getTrainerType in interface IDBAdapter
Parameters:
hrfID - HRF for which to load TrainerType
Returns:
constant for the trainer type