com.threerings.parlor.tourney.server.persist

## Class TourneyRepository

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

    public class TourneyRepository
    extends JORARepository

The persistent store for tourney related information.

### Nested Class Summary

Nested Classes
`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

Fields
`static String` `TOURNEY_DB_IDENT` The database identifier used when establishing a database connection.

### Constructor Summary

Constructors
Constructor and Description
`TourneyRepository(ConnectionProvider conprov)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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`