public class SubscriberDAO extends AbstractMyBatisDAO
| Modifier and Type | Field and Description |
|---|---|
static String |
ROLE
The Avalon role
|
_manager| Constructor and Description |
|---|
SubscriberDAO() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
createSubscriber(String listId,
String phoneNumber)
Creates a SMS subscriber.
|
void |
deleteAllNumbers(String list)
Delete every phone number of a list
|
void |
deleteNumber(String phoneNumber,
String list)
Delete the phoneNumber in the database
|
Map<String,Object> |
deleteSubscribers(String listId,
ArrayList<String> phoneNumbers)
Deletes the given subscribers.
|
Map<String,Number> |
getNbUserFromList()
Get the number of user in a list
|
Map<String,Date> |
getPhoneNumbersFromList(String list)
Get all the phone numbers in the database form the list
|
void |
insertNumber(String phoneNumber,
String list)
Insert the phoneNumber in the database
|
boolean |
numberAlreadyExists(String phoneNumber,
String list)
Check if the phoneNumber exists in the database
|
_configureDatasource, _getDataSourceId, _getMyBatisConfiguration, configure, contextualize, getSession, getSession, reload, service, setPluginInfogetLogger, setLoggerpublic SubscriberDAO()
public Map<String,Date> getPhoneNumbersFromList(String list)
list - the id of the phone number listpublic void insertNumber(String phoneNumber, String list)
phoneNumber - the phone numberlist - the id of the phone number listpublic boolean numberAlreadyExists(String phoneNumber, String list)
phoneNumber - the phone numberlist - the id of the listpublic Map<String,String> createSubscriber(String listId, String phoneNumber)
listId - The id of the SMS list to subscribe to.phoneNumber - The phone number to addpublic void deleteNumber(String phoneNumber, String list)
phoneNumber - the phone numberlist - the id of the phone number listpublic void deleteAllNumbers(String list)
list - the id of the phone number listpublic Map<String,Object> deleteSubscribers(String listId, ArrayList<String> phoneNumbers)
listId - The The id of the SMS list.phoneNumbers - The phone numbers to deletepublic Map<String,Number> getNbUserFromList()