T - public abstract class AbstractCall<T extends AbstractDataType<?>> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCall(ClearCheckBookConnection connection,
Class<T> dataTypeClass) |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
bulkProcess(List<T> dataTypeList)
Helper wrapper function to iterate over a list of items to
insert/edit/delete calling the relevant method on each.
|
protected boolean |
delete(ParsedNameValuePair id) |
protected boolean |
edit(T input) |
protected T |
get() |
protected T |
get(ParsedNameValuePair id)
Calls the "get" method from the API that brings back the item by id
|
protected List<T> |
getAll()
Calls the "get" method from the API that brings back all the values
|
protected List<T> |
getAll(ParsedNameValuePair... parameters)
Calls the "get" method from the API that brings back all the values
|
ClearCheckBookConnection |
getConnection() |
protected String |
getPluralUrl() |
protected abstract String |
getUrlSuffix() |
protected String |
insert(T input) |
protected String |
process(T dataType) |
protected AbstractCall(ClearCheckBookConnection connection, Class<T> dataTypeClass)
protected abstract String getUrlSuffix()
protected String getPluralUrl()
protected T get(ParsedNameValuePair id) throws ClearcheckbookException
id - extends AbstractDataTypeIOExceptionClearcheckbookExceptionprotected T get() throws ClearcheckbookException
extends AbstractDataTypeClearcheckbookExceptionprotected List<T> getAll() throws ClearcheckbookException
parameters - List<extends AbstractDataType>ClearcheckbookExceptionprotected List<T> getAll(ParsedNameValuePair... parameters) throws ClearcheckbookException
parameters - List<extends AbstractDataType>ClearcheckbookExceptionprotected List<String> bulkProcess(List<T> dataTypeList) throws ClearcheckbookException
List<String>ClearcheckbookExceptionprotected String process(T dataType) throws ClearcheckbookException
ClearcheckbookExceptionprotected String insert(T input) throws ClearcheckbookException
input - ClearcheckbookExceptionprotected boolean edit(T input) throws ClearcheckbookException
input - ClearcheckbookExceptionprotected boolean delete(ParsedNameValuePair id) throws ClearcheckbookException
input - ClearcheckbookExceptionpublic ClearCheckBookConnection getConnection()
Copyright © 2014 Leonard UK Ltd. All rights reserved.