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.
| Methods inherited from class com.samskivert.jdbc.JORARepository |
delete, insert, load, load, loadAll, loadAll, loadAllByExample, loadAllByExample, loadByExample, loadByExample, store, update, update, updateField, updateFields |
| Methods inherited from class com.samskivert.jdbc.SimpleRepository |
checkedUpdate, configureDatabaseIdent, execute, execute, executeUpdate, gotConnection, maintenance, setExecutePreCondition, toString, update, warnedUpdate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
_ttable
protected Table<TourneyRepository.TourneyRecord> _ttable
TourneyRepository
@Inject
public TourneyRepository(ConnectionProvider conprov)
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
migrateSchema
protected void migrateSchema(Connection conn,
DatabaseLiaison liaison)
throws SQLException,
PersistenceException
- Overrides:
migrateSchema in class SimpleRepository
- Throws:
SQLException
PersistenceException
createTables
protected void createTables()
- Specified by:
createTables in class JORARepository