|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SubSyncByAddressDAO
Data access object for use during the syncing of subscriber statuses by address.
This DAO is not to be used as a singleton spring bean as it is not stateless. It maintains state. This DAO should be used with calls of the following form:
SubSyncByAddressDAO subSyncByAddressDAO = createSubSyncByAddressDAO();
try {
subSyncByAddressDAO.prepareFindByAppIdAndStatus(..., ...);
SubscriberPartial subPartial = null;
while((subPartial = subSyncByAddressDAO.getNextResult()) != null) {
// Perform some processing
}
} catch(SQLException e) {
log.error("SQLException caught: ", e);
throw new PushSDKException(e);
} finally {
subSyncByAddressDAO.close();
}
| Method Summary | |
|---|---|
void |
close()
Closes the result set and releases the database connection. |
SubscriberPartial |
getNextResult()
Gets the next result from the result set (after performing a query for subscribers). |
void |
prepareFindByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status)
Deprecated. As of release 1.1, replaced by the prepareFindByAppIdAndStatus(String, SubscriberStatus, int, int)
method instead. |
void |
prepareFindByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status,
int startIndex,
int endIndex)
Performs a query for subscribers based on the given app id, status, and start and end indexes. |
void |
prepareFindByAppIdAndStatusAndType(String pushApplicationId,
SubscriberStatus status,
SubscriberType type)
Deprecated. As of release 1.1, replaced by the prepareFindByAppIdAndStatusAndType(String, SubscriberStatus, SubscriberType, int, int) method instead. |
void |
prepareFindByAppIdAndStatusAndType(String pushApplicationId,
SubscriberStatus status,
SubscriberType type,
int startIndex,
int endIndex)
Performs a query for subscribers based on the given app id, status, type, and start and end indexes. |
| Method Detail |
|---|
void prepareFindByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status,
int startIndex,
int endIndex)
throws SQLException
getNextResult() method. When use of the result set is done, the close()
method should be called.
Note: This method uses the same result set instance variable as the prepareFindByAppIdAndStatusAndType()
method and so, for a given object of this class, only one of the two methods should be called at any given time.
pushApplicationId - the push application idstatus - the status of a subscriberstartIndex - the start index to query fromendIndex - the end index to stop querying at
SQLException - if any errors occur executing the query
void prepareFindByAppIdAndStatusAndType(String pushApplicationId,
SubscriberStatus status,
SubscriberType type,
int startIndex,
int endIndex)
throws SQLException
getNextResult() method. When use of the result set is done, the close()
method should be called.
Note: This method uses the same result set instance variable as the prepareFindByAppIdAndStatus() method and
so, for a given object of this class, only one of the two methods should be called at any given time.
pushApplicationId - the push application idstatus - the status of a subscribertype - the type of a subscriberstartIndex - the start index to query fromendIndex - the end index to stop querying at
SQLException - if any errors occur executing the query
SubscriberPartial getNextResult()
throws SQLException
prepareFindByAppIdAndStatus(appid, status) method or
the prepareFindByAppIdAndStatusAndType(appid, status, type) method.
SQLException - if any errors occur retrieving the next result from the result setvoid close()
prepareFindByAppIdAndStatus(appid, status)
method or the prepareFindByAppIdAndStatusAndType(appid, status, type) method and getting the results of the
query back by repeated calls to the getNextResult() method.
This method should be called in a finally block.
@Deprecated
void prepareFindByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status)
throws SQLException
prepareFindByAppIdAndStatus(String, SubscriberStatus, int, int)
method instead.
getNextResult() method. When use of the result set is done, the close()
method should be called.
Note: This method uses the same result set instance variable as the prepareFindByAppIdAndStatusAndType()
method and so, for a given object of this class, only one of the two methods should be called at any given time.
pushApplicationId - the push application idstatus - the status of a subscriber
SQLException - if any errors occur executing the query
@Deprecated
void prepareFindByAppIdAndStatusAndType(String pushApplicationId,
SubscriberStatus status,
SubscriberType type)
throws SQLException
prepareFindByAppIdAndStatusAndType(String, SubscriberStatus, SubscriberType, int, int) method instead.
getNextResult() method. When use of the result set is done, the close()
method should be called.
Note: This method uses the same result set instance variable as the prepareFindByAppIdAndStatus() method and
so, for a given object of this class, only one of the two methods should be called at any given time.
pushApplicationId - the push application idstatus - the status of a subscribertype - the type of a subscriber
SQLException - if any errors occur executing the query
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||