|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.jdbc.core.support.JdbcDaoSupport
net.rim.pushsdk.commons.PushSDKBaseDAO
net.rim.pushsdk.subscription.SubRDBMSDAOImpl
public class SubRDBMSDAOImpl
RDBMS implementation of the SubscriptionDAO interface.
| Field Summary | |
|---|---|
protected SQLProperties |
sqlProperties
The SQL properties to use for querying the database. |
| Fields inherited from class net.rim.pushsdk.commons.PushSDKBaseDAO |
|---|
DATABASE_TZ |
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
SubRDBMSDAOImpl()
|
|
| Method Summary | |
|---|---|
void |
batchIncrementConsecutiveFailedPushCount(List<SubscriberPartial> subscribers)
Deprecated. |
void |
batchResetConsecutiveFailedPushCount(List<SubscriberPartial> subscribers)
Deprecated. |
void |
deleteInactiveSubscription(String pushApplicationId,
String subscriberId)
Deletes an inactive (unsubscribed) subscription from persistent storage. |
void |
deleteSubscriptions(String pushApplicationId)
Deletes all the subscriptions from storage (and potentially the cache) for a push application. |
List<SubscriberPartial> |
findByAddressAndIdAndNotStatus(String address,
String subscriberId,
SubscriberStatus status)
Finds a list of subscribers with the specified address and the specified subscriber id and NOT the specified status. |
List<SubscriberPartial> |
findByAddressAndNotIdAndNotStatus(String address,
String subscriberId,
SubscriberStatus status)
Finds a list of subscribers with the specified address and NOT the specified subscriber id and NOT the specified status. |
List<SubscriberPartial> |
findByAppId(String pushApplicationId,
int startIndex,
int endIndex)
Finds a list of subscribers with the specified push application id. |
List<SubscriberPartial> |
findByAppIdAndAddress(String pushApplicationId,
String address)
Finds a list of subscribers with the specified address and push application id. |
Subscriber |
findByAppIdAndId(String pushApplicationId,
String subscriberId)
Finds the subscriber with the specified id and push application id. |
SubscriberPartial |
findByAppIdAndIdPartial(String pushApplicationId,
String subscriberId)
Similar to the findByAppIdAndId method, but only finds a subscriber with partial information. |
List<SubscriberPartial> |
findByAppIdAndIdsAndStatus(String pushApplicationId,
List<String> subscriberIds,
SubscriberStatus status)
Finds a list of subscribers for the given push application id that are in the specified subscriber id list with the specified status. |
List<SubscriberPartial> |
findByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status,
int startIndex,
int endIndex)
Finds a list of subscribers with the specified push application id and status. |
List<SubscriberPartial> |
findByAppIdAndType(String pushApplicationId,
SubscriberType type,
int startIndex,
int endIndex)
Finds a list of subscribers with the specified push application id and type. |
List<SubscriberPartial> |
findByAppIdAndTypeAndStatus(String pushApplicationId,
SubscriberType type,
SubscriberStatus status,
int startIndex,
int endIndex)
Finds a list of subscribers with the specified push application id, type, and status. |
List<SubscriberPartial> |
findById(String subscriberId)
Finds a list of subscribers with the specified id. |
List<SubscriberPartial> |
findByIdAndNotStatus(String subscriberId,
SubscriberStatus status)
Finds a list of subscribers with the specified id and NOT the specified status. |
List<SubscriberPartial> |
findByIdAndStatus(String subscriberId,
SubscriberStatus status)
Finds a list of subscribers with the specified id and status. |
List<SubscriberPartial> |
findByIdPattern(String subscriberIdPattern,
int startIndex,
int endIndex)
Finds a list of subscribers whose id contains the given subscriberIdPattern. |
int |
getConsecutiveFailedPushCount(SubscriberPartial subscriber)
Deprecated. |
List<DeviceModelCount> |
getDeviceModelCount(String pushApplicationId)
Gets a count of the number of users of a push application (regardless of status) for each BlackBerry device model. |
List<DeviceModelCount> |
getDeviceModelCount(String pushApplicationId,
SubscriberStatus status)
Gets a count of the number of users of a push application with a given status for each BlackBerry device model. |
List<OsVersionCount> |
getOsVersionCount(String pushApplicationId)
Gets a count of the number of users of a push application (regardless of status) for each OS version running on a BlackBerry device. |
List<OsVersionCount> |
getOsVersionCount(String pushApplicationId,
SubscriberStatus status)
Gets a count of the number of users of a push application with a given status for each OS version running on a BlackBerry device. |
int |
getResumeCount(String pushApplicationId,
Date fromDate,
Date toDate)
Gets a count of the number of users that had their subscriptions resumed for an application between the given date range. |
int |
getSizeByAppId(String pushApplicationId)
Gets a count of all the subscribers in storage with the specified push application id. |
int |
getSizeByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status)
Gets a count of all the subscribers in storage with the specified push application id and status. |
int |
getSizeByAppIdAndType(String pushApplicationId,
SubscriberType type)
Gets a count of all the subscribers in storage with the specified push application id and type. |
int |
getSizeByAppIdAndTypeAndStatus(String pushApplicationId,
SubscriberType type,
SubscriberStatus status)
Gets a count of all the subscribers in storage with the specified push application id, type, and status. |
int |
getSizeByIdPattern(String subscriberIdPattern)
Gets a count of all the subscribers in storage whose id contains the given subscriberIdPattern. |
int |
getSubscribeCount(String pushApplicationId,
Date fromDate,
Date toDate)
Gets a count of the number of new subscribers for a given date range. |
int |
getSuspendCount(String pushApplicationId,
Date fromDate,
Date toDate)
Gets a count of the number of users that had their subscriptions suspended for an application between the given date range. |
int |
getUnsubscribeCount(String pushApplicationId,
Date fromDate,
Date toDate)
Gets a count of the number of users that unsubscribed between the given date range. |
void |
incrementConsecutiveFailedPushCount(String pushApplicationId,
String subscriberId)
Deprecated. |
SubscriberPartial |
loadFromCache(String pushApplicationId,
String subscriberId)
Attempts to load a partial subscriber from the cache or from memory (for in-memory implementations). |
void |
removeAllFromCache()
Removes all objects from the cache. |
void |
resetConsecutiveFailedPushCount(String pushApplicationId,
String subscriberId)
Deprecated. |
void |
resubscribe(SubscribeRequest subRequest)
Adds a subscriber's resubscription details to persistent storage. |
void |
resume(ResumeRequest resumeRequest)
Adds a subscriber's resume subscription details to persistent storage. |
void |
setCache(net.sf.ehcache.Cache cache)
Sets a cache to use to cache subscribers. |
void |
setPushSDKProperties(PushSDKProperties pushSDKProperties)
Support for dependency injection. |
void |
setSqlProperties(SQLProperties sqlProperties)
Sets the SQL properties to use for querying the database. |
void |
subscribe(SubscribeRequest subRequest)
Adds a subscriber's subscription details to persistent storage. |
void |
suspend(SuspendRequest suspRequest)
Adds a subscriber's suspended subscription details to persistent storage. |
void |
unsubscribe(UnsubscribeRequest unsubRequest)
Adds a subscriber's unsubscription details to persistent storage. |
| Methods inherited from class net.rim.pushsdk.commons.PushSDKBaseDAO |
|---|
encodeSQLText, encodeSQLText, encodeSQLText, getSimpleJdbcTemplate |
| Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport |
|---|
checkDaoConfig, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, initTemplateConfig, releaseConnection, setDataSource, setJdbcTemplate |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SQLProperties sqlProperties
| Constructor Detail |
|---|
public SubRDBMSDAOImpl()
| Method Detail |
|---|
public void setSqlProperties(SQLProperties sqlProperties)
sqlProperties - the SQL propertiespublic void setPushSDKProperties(PushSDKProperties pushSDKProperties)
PushSDKProperties implementation.
pushSDKProperties - an instance of PushSDKPropertiespublic void setCache(net.sf.ehcache.Cache cache)
cache - an instance of a cache
public Subscriber findByAppIdAndId(String pushApplicationId,
String subscriberId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAppIdAndId in interface SubscriptionDAOpushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByAppIdAndAddress(String pushApplicationId,
String address)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAppIdAndAddress in interface SubscriptionDAOpushApplicationId - the id of the push applicationaddress - the address of the subscriber (case insensitive)
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByAddressAndNotIdAndNotStatus(String address,
String subscriberId,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAddressAndNotIdAndNotStatus in interface SubscriptionDAOaddress - the address of the subscriber (case insensitive)subscriberId - the id of the subscriberstatus - a subscriber status
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByAddressAndIdAndNotStatus(String address,
String subscriberId,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAddressAndIdAndNotStatus in interface SubscriptionDAOaddress - the address of the subscriber (case insensitive)subscriberId - the id of the subscriberstatus - a subscriber status
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status,
int startIndex,
int endIndex)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAppIdAndStatus in interface SubscriptionDAOpushApplicationId - the id of the push applicationstatus - a subscriber statusstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByAppIdAndType(String pushApplicationId,
SubscriberType type,
int startIndex,
int endIndex)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAppIdAndType in interface SubscriptionDAOpushApplicationId - the id of the push applicationtype - the type of a subscriberstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByAppIdAndTypeAndStatus(String pushApplicationId,
SubscriberType type,
SubscriberStatus status,
int startIndex,
int endIndex)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAppIdAndTypeAndStatus in interface SubscriptionDAOpushApplicationId - the id of the push applicationtype - the type of a subscriberstatus - the status of a subscriberstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByIdAndStatus(String subscriberId,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByIdAndStatus in interface SubscriptionDAOsubscriberId - the id of the subscriberstatus - a subscriber status
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByIdAndNotStatus(String subscriberId,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByIdAndNotStatus in interface SubscriptionDAOsubscriberId - the id of the subscriberstatus - a subscriber status
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByAppId(String pushApplicationId,
int startIndex,
int endIndex)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAppId in interface SubscriptionDAOpushApplicationId - the id of the push applicationstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findById(String subscriberId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findById in interface SubscriptionDAOsubscriberId - the id of the subscriber
org.springframework.dao.DataAccessException - if any errors occur
public void suspend(SuspendRequest suspRequest)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
suspend in interface SubscriptionDAOsuspRequest - object containing all the information required for a suspend
org.springframework.dao.DataAccessException - if any errors occur
public void resume(ResumeRequest resumeRequest)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
resume in interface SubscriptionDAOresumeRequest - object containing all the information required for a resume
org.springframework.dao.DataAccessException - if any errors occur
public void resubscribe(SubscribeRequest subRequest)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
resubscribe in interface SubscriptionDAOsubRequest - object containing all the information required for a resubscribe
org.springframework.dao.DataAccessException - if any errors occur
public void subscribe(SubscribeRequest subRequest)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
subscribe in interface SubscriptionDAOsubRequest - object containing all the information required for a subscribe
org.springframework.dao.DataAccessException - if any errors occur
public void unsubscribe(UnsubscribeRequest unsubRequest)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
unsubscribe in interface SubscriptionDAOunsubRequest - object containing all the information required for an unsubscribe
org.springframework.dao.DataAccessException - if any errors occur
public int getSizeByAppId(String pushApplicationId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getSizeByAppId in interface SubscriptionDAOpushApplicationId - the id of the push application
org.springframework.dao.DataAccessException - if any errors occur
public int getSizeByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getSizeByAppIdAndStatus in interface SubscriptionDAOpushApplicationId - the id of the push applicationstatus - a subscriber status
org.springframework.dao.DataAccessException - if any errors occur
public int getSizeByAppIdAndType(String pushApplicationId,
SubscriberType type)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getSizeByAppIdAndType in interface SubscriptionDAOpushApplicationId - the id of the push applicationtype - the type of a subscriber
org.springframework.dao.DataAccessException - if any errors occur
public int getSizeByAppIdAndTypeAndStatus(String pushApplicationId,
SubscriberType type,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getSizeByAppIdAndTypeAndStatus in interface SubscriptionDAOpushApplicationId - the id of the push applicationtype - the type of a subscriberstatus - the status of a subscriber
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByAppIdAndIdsAndStatus(String pushApplicationId,
List<String> subscriberIds,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAppIdAndIdsAndStatus in interface SubscriptionDAOpushApplicationId - the id of the push applicationsubscriberIds - only subscribers with one of these ids will be returnedstatus - only subscribers that match this status will be returned
org.springframework.dao.DataAccessException - if any errors occur
@Deprecated
public void incrementConsecutiveFailedPushCount(String pushApplicationId,
String subscriberId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
incrementConsecutiveFailedPushCount in interface SubscriptionDAOpushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
org.springframework.dao.DataAccessException - if any errors occur
@Deprecated
public void resetConsecutiveFailedPushCount(String pushApplicationId,
String subscriberId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
resetConsecutiveFailedPushCount in interface SubscriptionDAOpushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
org.springframework.dao.DataAccessException - if any errors occur
@Deprecated
public void batchIncrementConsecutiveFailedPushCount(List<SubscriberPartial> subscribers)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
batchIncrementConsecutiveFailedPushCount in interface SubscriptionDAOsubscribers - list of subscribers to increment count
org.springframework.dao.DataAccessException - if any errors occur
@Deprecated
public void batchResetConsecutiveFailedPushCount(List<SubscriberPartial> subscribers)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
batchResetConsecutiveFailedPushCount in interface SubscriptionDAOsubscribers - list of subscribers to reset count
org.springframework.dao.DataAccessException - if any errors occur
@Deprecated
public int getConsecutiveFailedPushCount(SubscriberPartial subscriber)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getConsecutiveFailedPushCount in interface SubscriptionDAOsubscriber - SubscriberPartial object with push application id and subscriber id set
org.springframework.dao.DataAccessException - if any errors occur
public void deleteInactiveSubscription(String pushApplicationId,
String subscriberId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
deleteInactiveSubscription in interface SubscriptionDAOpushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
org.springframework.dao.DataAccessException - if any errors occur
public void deleteSubscriptions(String pushApplicationId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
deleteSubscriptions in interface SubscriptionDAOpushApplicationId - the id of the push application
org.springframework.dao.DataAccessException - if any errors occur
public List<SubscriberPartial> findByIdPattern(String subscriberIdPattern,
int startIndex,
int endIndex)
throws org.springframework.dao.DataAccessException
SubscriptionDAOsubscriberIdPattern.
Note: Index arguments are present to address memory concerns, since if we retrieve a full list it might be quite large.
Indexes are inclusive and start at 0.
findByIdPattern in interface SubscriptionDAOsubscriberIdPattern - a whole or partial subscriberId to matchstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
org.springframework.dao.DataAccessException - if any errors occur
public int getSizeByIdPattern(String subscriberIdPattern)
throws org.springframework.dao.DataAccessException
SubscriptionDAOsubscriberIdPattern.
getSizeByIdPattern in interface SubscriptionDAOsubscriberIdPattern - a whole or partial subscriberId to match
org.springframework.dao.DataAccessException - if any errors occur
public SubscriberPartial findByAppIdAndIdPartial(String pushApplicationId,
String subscriberId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
findByAppIdAndIdPartial in interface SubscriptionDAOpushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
org.springframework.dao.DataAccessException - if any errors occur
public SubscriberPartial loadFromCache(String pushApplicationId,
String subscriberId)
SubscriptionDAO
loadFromCache in interface SubscriptionDAOpushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
public int getSubscribeCount(String pushApplicationId,
Date fromDate,
Date toDate)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getSubscribeCount in interface SubscriptionDAOpushApplicationId - the id of the push applicationfromDate - inclusive from date parameter of the rangetoDate - inclusive to date parameter of the range
org.springframework.dao.DataAccessException - if any errors occur
public int getUnsubscribeCount(String pushApplicationId,
Date fromDate,
Date toDate)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getUnsubscribeCount in interface SubscriptionDAOpushApplicationId - the id of the push applicationfromDate - inclusive from date parameter of the rangetoDate - inclusive to date parameter of the range
org.springframework.dao.DataAccessException - if any errors occur
public int getResumeCount(String pushApplicationId,
Date fromDate,
Date toDate)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getResumeCount in interface SubscriptionDAOpushApplicationId - the id of the push applicationfromDate - inclusive from date parameter of the rangetoDate - inclusive to date parameter of the range
org.springframework.dao.DataAccessException - if any errors occur
public int getSuspendCount(String pushApplicationId,
Date fromDate,
Date toDate)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getSuspendCount in interface SubscriptionDAOpushApplicationId - the id of the push applicationfromDate - inclusive from date parameter of the rangetoDate - inclusive to date parameter of the range
org.springframework.dao.DataAccessException - if any errors occur
public List<DeviceModelCount> getDeviceModelCount(String pushApplicationId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getDeviceModelCount in interface SubscriptionDAOpushApplicationId - the id of the push application
org.springframework.dao.DataAccessException - if any errors occur
public List<DeviceModelCount> getDeviceModelCount(String pushApplicationId,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getDeviceModelCount in interface SubscriptionDAOpushApplicationId - the id of the push applicationstatus - the status of a subscriber
org.springframework.dao.DataAccessException - if any errors occur
public List<OsVersionCount> getOsVersionCount(String pushApplicationId)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getOsVersionCount in interface SubscriptionDAOpushApplicationId - the id of the push application
org.springframework.dao.DataAccessException - if any errors occur
public List<OsVersionCount> getOsVersionCount(String pushApplicationId,
SubscriberStatus status)
throws org.springframework.dao.DataAccessException
SubscriptionDAO
getOsVersionCount in interface SubscriptionDAOpushApplicationId - the id of the push applicationstatus - the status of a subscriber
org.springframework.dao.DataAccessException - if any errors occurpublic void removeAllFromCache()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||