Package eu.getmangos.controllers
Class AccountBannedController
java.lang.Object
eu.getmangos.controllers.AccountBannedController
@RequestScoped public class AccountBannedController extends Object
-
Constructor Summary
Constructors Constructor Description AccountBannedController() -
Method Summary
Modifier and Type Method Description intcleanupDeadLinks()Delete all bans logs from the database which have dead links.voidcreate(AccountBanned accountBanned)voiddelete(AccountBannedId id)voiddeleteForAccount(Integer accountId)Delete all ban records for a given account.AccountBannedfind(AccountBannedId id)Retrieves a ban by its ID.List<AccountBanned>findAll()Retrieves all bans from the database.List<AccountBannedId>findDeadLinks()Retrieves all bans from the database which are not linked to an account.AccountBannedsearch(Integer id)Search all bans for an account.voidupdate(AccountBanned accountBanned)
-
Constructor Details
-
AccountBannedController
public AccountBannedController()
-
-
Method Details
-
create
- Throws:
DAOException
-
update
- Throws:
DAOException
-
delete
- Throws:
DAOException
-
find
Retrieves a ban by its ID.- Parameters:
id- The ID of the ban- Returns:
- The ban if found, null otherwise.
-
deleteForAccount
Delete all ban records for a given account.- Parameters:
accountId- The ID of the account for which the ban records needs to be deleted.
-
search
Search all bans for an account.- Parameters:
id- The id of the account.- Returns:
- The matching bans for the given id.
-
cleanupDeadLinks
public int cleanupDeadLinks()Delete all bans logs from the database which have dead links.- Returns:
- An int indicating the amount of records impacted by this operation.
-
findDeadLinks
Retrieves all bans from the database which are not linked to an account.- Returns:
- A list of Bans IDS.
-
findAll
Retrieves all bans from the database.- Returns:
- A list of Bans.
-