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 AbstractDataType
IOException
ClearcheckbookException
protected T get() throws ClearcheckbookException
extends AbstractDataType
ClearcheckbookException
protected List<T> getAll() throws ClearcheckbookException
parameters
- List
<extends AbstractDataType
>ClearcheckbookException
protected List<T> getAll(ParsedNameValuePair... parameters) throws ClearcheckbookException
parameters
- List
<extends AbstractDataType
>ClearcheckbookException
protected List<String> bulkProcess(List<T> dataTypeList) throws ClearcheckbookException
List
<String
>ClearcheckbookException
protected String process(T dataType) throws ClearcheckbookException
ClearcheckbookException
protected String insert(T input) throws ClearcheckbookException
input
- ClearcheckbookException
protected boolean edit(T input) throws ClearcheckbookException
input
- ClearcheckbookException
protected boolean delete(ParsedNameValuePair id) throws ClearcheckbookException
input
- ClearcheckbookException
public ClearCheckBookConnection getConnection()
Copyright © 2014 Leonard UK Ltd. All rights reserved.