com.threerings.parlor.tourney.server.persist
Class TourneyRepository

java.lang.Object
  extended by com.samskivert.jdbc.Repository
      extended by com.samskivert.jdbc.SimpleRepository
          extended by com.samskivert.jdbc.JORARepository
              extended by com.threerings.parlor.tourney.server.persist.TourneyRepository

public class TourneyRepository
extends JORARepository

The persistent store for tourney related information.


Nested Class Summary
static class TourneyRepository.TourneyRecord
          Contains tourney information loaded from the database.
 
Nested classes/interfaces inherited from class com.samskivert.jdbc.SimpleRepository
SimpleRepository.PreCondition
 
Nested classes/interfaces inherited from class com.samskivert.jdbc.Repository
Repository.Operation<V>
 
Field Summary
static String TOURNEY_DB_IDENT
          The database identifier used when establishing a database connection.
 
Constructor Summary
TourneyRepository(ConnectionProvider conprov)
           
 
Method Summary
 void deleteTourney(int tourneyId)
          Deletes a tourney from the repository.
 void insertTourney(TourneyConfig tourney)
          Inserts a new tourney into the repository, assigning a unique id to the tourney.
 ArrayList<TourneyConfig> loadTournies()
          Loads all the tourney configs from the repository.
 void updateTourney(TourneyConfig tourney)
          Updates the tourney in the repository.
 
Methods inherited from class com.samskivert.jdbc.SimpleRepository
setExecutePreCondition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOURNEY_DB_IDENT

public static final String TOURNEY_DB_IDENT
The database identifier used when establishing a database connection. This value being tourneydb.

See Also:
Constant Field Values
Constructor Detail

TourneyRepository

@Inject
public TourneyRepository(ConnectionProvider conprov)
Method Detail

insertTourney

public void insertTourney(TourneyConfig tourney)
                   throws PersistenceException
Inserts a new tourney into the repository, assigning a unique id to the tourney.

Throws:
PersistenceException

updateTourney

public void updateTourney(TourneyConfig tourney)
                   throws PersistenceException
Updates the tourney in the repository.

Throws:
PersistenceException

deleteTourney

public void deleteTourney(int tourneyId)
                   throws PersistenceException
Deletes a tourney from the repository.

Throws:
PersistenceException

loadTournies

public ArrayList<TourneyConfig> loadTournies()
                                      throws PersistenceException
Loads all the tourney configs from the repository.

Throws:
PersistenceException


Copyright © 2011. All Rights Reserved.