Class PlayerWarnStorage
java.lang.Object
me.confuser.banmanager.common.ormlite.dao.BaseDaoImpl<PlayerWarnData,Integer>
me.confuser.banmanager.common.storage.BaseStorage<PlayerWarnData,Integer>
me.confuser.banmanager.common.storage.PlayerWarnStorage
- All Implemented Interfaces:
Iterable<PlayerWarnData>,me.confuser.banmanager.common.ormlite.dao.CloseableIterable<PlayerWarnData>,me.confuser.banmanager.common.ormlite.dao.Dao<PlayerWarnData,Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.confuser.banmanager.common.ormlite.dao.Dao
me.confuser.banmanager.common.ormlite.dao.Dao.CreateOrUpdateStatus, me.confuser.banmanager.common.ormlite.dao.Dao.DaoObserver -
Field Summary
Fields inherited from class me.confuser.banmanager.common.storage.BaseStorage
pluginFields inherited from class me.confuser.banmanager.common.ormlite.dao.BaseDaoImpl
connectionSource, databaseType, dataClass, lastIterator, objectFactory, statementExecutor, tableConfig, tableInfo -
Constructor Summary
ConstructorsConstructorDescriptionPlayerWarnStorage(BanManagerPlugin plugin) PlayerWarnStorage(BanManagerPlugin plugin, me.confuser.banmanager.common.ormlite.support.ConnectionSource connection, me.confuser.banmanager.common.ormlite.table.DatabaseTableConfig<?> table) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddWarning(PlayerWarnData data, boolean silent) intdeleteAll(PlayerData player) intdeleteRecent(PlayerData player) me.confuser.banmanager.common.ormlite.dao.CloseableIterator<PlayerWarnData> findWarnings(long fromTime) longgetCount(PlayerData player) doublegetPointsCount(PlayerData player) doublegetPointsCount(PlayerData player, long timeframe) me.confuser.banmanager.common.ormlite.dao.CloseableIterator<PlayerWarnData> getUnreadWarnings(UUID uniqueId) me.confuser.banmanager.common.ormlite.dao.CloseableIterator<PlayerWarnData> getWarnings(PlayerData player) protected booleanbooleanbooleanisRecentlyWarned(PlayerData player, long cooldown) voidremoveMute(UUID uuid) Methods inherited from class me.confuser.banmanager.common.storage.BaseStorage
create, createPreservingTimestamps, getBmTableName, getDatabaseConfig, update, updatePreservingTimestampsMethods inherited from class me.confuser.banmanager.common.ormlite.dao.BaseDaoImpl
assignEmptyForeignCollection, callBatchTasks, checkForInitialized, clearAllInternalObjectCaches, clearObjectCache, closeableIterator, closeLastIterator, commit, countOf, countOf, create, createIfNotExists, createOrUpdate, delete, delete, delete, deleteBuilder, deleteById, deleteIds, endThreadConnection, executeRaw, executeRawNoArgs, extractId, findForeignFieldType, getConnectionSource, getDataClass, getEmptyForeignCollection, getObjectCache, getObjectFactory, getRawRowMapper, getSelectStarRowMapper, getTableConfig, getTableInfo, getTableName, getWrappedIterable, getWrappedIterable, idExists, initialize, isAutoCommit, isTableExists, isUpdatable, iterator, iterator, iterator, iterator, mapSelectStarRow, notifyChanges, objectsEqual, objectToString, query, queryBuilder, queryForAll, queryForEq, queryForFieldValues, queryForFieldValuesArgs, queryForFirst, queryForId, queryForMatching, queryForMatchingArgs, queryForSameId, queryRaw, queryRaw, queryRaw, queryRaw, queryRaw, queryRawValue, refresh, registerObserver, rollBack, setAutoCommit, setConnectionSource, setObjectCache, setObjectCache, setObjectFactory, setTableConfig, startThreadConnection, unregisterObserver, update, updateBuilder, updateId, updateRawMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PlayerWarnStorage
- Throws:
SQLException
-
PlayerWarnStorage
public PlayerWarnStorage(BanManagerPlugin plugin, me.confuser.banmanager.common.ormlite.support.ConnectionSource connection, me.confuser.banmanager.common.ormlite.table.DatabaseTableConfig<?> table) throws SQLException - Throws:
SQLException
-
-
Method Details
-
hasUpdatedColumn
protected boolean hasUpdatedColumn()- Overrides:
hasUpdatedColumnin classBaseStorage<PlayerWarnData,Integer> - Returns:
- true if this entity has an 'updated' column, false if only 'created' Defaults to true; override and return false for entities with only 'created'
-
isMuted
-
getMute
-
removeMute
-
addWarning
- Throws:
SQLException
-
getUnreadWarnings
public me.confuser.banmanager.common.ormlite.dao.CloseableIterator<PlayerWarnData> getUnreadWarnings(UUID uniqueId) throws SQLException - Throws:
SQLException
-
getWarnings
public me.confuser.banmanager.common.ormlite.dao.CloseableIterator<PlayerWarnData> getWarnings(PlayerData player) throws SQLException - Throws:
SQLException
-
getCount
- Throws:
SQLException
-
getPointsCount
- Throws:
SQLException
-
getPointsCount
- Throws:
SQLException
-
isRecentlyWarned
- Throws:
SQLException
-
deleteRecent
- Throws:
SQLException
-
purge
- Throws:
SQLException
-
findWarnings
public me.confuser.banmanager.common.ormlite.dao.CloseableIterator<PlayerWarnData> findWarnings(long fromTime) throws SQLException - Throws:
SQLException
-
deleteAll
- Throws:
SQLException
-