Class IpBanStorage
java.lang.Object
me.confuser.banmanager.common.ormlite.dao.BaseDaoImpl<IpBanData,Integer>
me.confuser.banmanager.common.storage.BaseStorage<IpBanData,Integer>
me.confuser.banmanager.common.storage.IpBanStorage
- All Implemented Interfaces:
Iterable<IpBanData>,me.confuser.banmanager.common.ormlite.dao.CloseableIterable<IpBanData>,me.confuser.banmanager.common.ormlite.dao.Dao<IpBanData,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
ConstructorsConstructorDescriptionIpBanStorage(BanManagerPlugin plugin) IpBanStorage(BanManagerPlugin plugin, me.confuser.banmanager.common.ormlite.support.ConnectionSource connection, me.confuser.banmanager.common.ormlite.table.DatabaseTableConfig<?> table) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanme.confuser.banmanager.common.ormlite.dao.CloseableIterator<IpBanData> findBans(long fromTime) getBan(InetAddress address) getBan(me.confuser.banmanager.common.ipaddr.IPAddress ip) booleanisBanned(InetAddress address) booleanisBanned(me.confuser.banmanager.common.ipaddr.IPAddress ip) booleanisRecentlyBanned(me.confuser.banmanager.common.ipaddr.IPAddress ip, long cooldown) voidvoidremoveBan(me.confuser.banmanager.common.ipaddr.IPAddress ip) retrieveBan(me.confuser.banmanager.common.ipaddr.IPAddress ip) booleanunban(IpBanData ban, PlayerData actor) booleanunban(IpBanData ban, PlayerData actor, String reason) booleanunban(IpBanData ban, PlayerData actor, String reason, boolean delete) booleanunban(IpBanData ban, PlayerData actor, String reason, boolean delete, boolean silent) Methods inherited from class me.confuser.banmanager.common.storage.BaseStorage
create, createPreservingTimestamps, getBmTableName, getDatabaseConfig, hasUpdatedColumn, 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
-
IpBanStorage
- Throws:
SQLException
-
IpBanStorage
public IpBanStorage(BanManagerPlugin plugin, me.confuser.banmanager.common.ormlite.support.ConnectionSource connection, me.confuser.banmanager.common.ormlite.table.DatabaseTableConfig<?> table) throws SQLException - Throws:
SQLException
-
-
Method Details
-
isBanned
public boolean isBanned(me.confuser.banmanager.common.ipaddr.IPAddress ip) -
isBanned
-
retrieveBan
- Throws:
SQLException
-
getBan
-
getBan
-
addBan
-
removeBan
-
removeBan
public void removeBan(me.confuser.banmanager.common.ipaddr.IPAddress ip) -
ban
- Throws:
SQLException
-
ban
- Throws:
SQLException
-
unban
- Throws:
SQLException
-
unban
- Throws:
SQLException
-
unban
public boolean unban(IpBanData ban, PlayerData actor, String reason, boolean delete) throws SQLException - Throws:
SQLException
-
unban
public boolean unban(IpBanData ban, PlayerData actor, String reason, boolean delete, boolean silent) throws SQLException - Throws:
SQLException
-
findBans
public me.confuser.banmanager.common.ormlite.dao.CloseableIterator<IpBanData> findBans(long fromTime) throws SQLException - Throws:
SQLException
-
isRecentlyBanned
public boolean isRecentlyBanned(me.confuser.banmanager.common.ipaddr.IPAddress ip, long cooldown) throws SQLException - Throws:
SQLException
-