public class SubscriberDAO extends AbstractMyBatisDAO
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
|
configure, contextualize, getSession, getSession, reload, service, setPluginInfo
getLogger, setLogger
public 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()