public class XMLBusinessDAO extends Object implements BusinessDAO
Constructor and Description |
---|
XMLBusinessDAO() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
count(List<Filter> fitlers)
|
void |
delete(Business business)
Remove the specified object from the persistance layer
|
void |
deleteAll()
Remove all objects from the persistance layer
|
boolean |
exist(String hostid)
Verify if an object with the specified id exists in the
persistance layer
|
List<Business> |
find(List<Filter> fitlers)
Retrieve all objects corresponding to the given filters in a List
from the persistance layer
|
List<Business> |
find(List<Filter> filters,
int limit)
Retrieve all objects corresponding to the given filters in a List
from the persistance layer
|
List<Business> |
find(List<Filter> filters,
String field,
boolean asc)
Retrieve all objects corresponding to the given filters in a List
from the persistance layer
|
List<Business> |
find(List<Filter> filters,
String field,
boolean asc,
int limit)
Retrieve all objects corresponding to the given filters in a List
from the persistance layer
|
List<Business> |
find(List<Filter> filters,
String field,
boolean asc,
int limit,
int offset)
Retrieve all objects corresponding to the given filters in a List
from the persistance layer
|
List<Business> |
getAll()
Retrieve all objects in a List from the persistance layer
|
void |
insert(Business business)
Insert the specified object in the persistance layer
|
Business |
select(String hostid)
Retrieve the object with the specified id from the persistance
layer
|
void |
update(Business business)
Update the specified object in the persistance layer
|
void |
update(List<Filter> filters,
String toSet)
Update all objects corresponding to the given filters in a List
from the persistance layer
|
public void close()
close
in interface AbstractDAO<Business>
public void delete(Business business)
AbstractDAO
delete
in interface AbstractDAO<Business>
business
- object to deletepublic void deleteAll()
AbstractDAO
deleteAll
in interface AbstractDAO<Business>
public List<Business> getAll() throws DAOConnectionException
AbstractDAO
getAll
in interface AbstractDAO<Business>
DAOConnectionException
- If data access error occurspublic boolean exist(String hostid) throws DAOConnectionException
AbstractDAO
exist
in interface AbstractDAO<Business>
hostid
- id of the object verifiedDAOConnectionException
- If a data access error occurspublic List<Business> find(List<Filter> fitlers) throws DAOConnectionException
AbstractDAO
find
in interface AbstractDAO<Business>
fitlers
- List of filterDAOConnectionException
- If data access error occurspublic List<Business> find(List<Filter> filters, int limit) throws DAOConnectionException
AbstractDAO
find
in interface AbstractDAO<Business>
filters
- List of filterlimit
- max number of items to getDAOConnectionException
- If data access error occurspublic List<Business> find(List<Filter> filters, String field, boolean asc) throws DAOConnectionException
AbstractDAO
find
in interface AbstractDAO<Business>
filters
- List of filterfield
- field to sort onasc
- True for ascending, False for descending orderDAOConnectionException
- If data access error occurspublic List<Business> find(List<Filter> filters, String field, boolean asc, int limit) throws DAOConnectionException
AbstractDAO
find
in interface AbstractDAO<Business>
filters
- List of filterfield
- field to sort onasc
- True for ascending, False for descending orderlimit
- max number of items to getDAOConnectionException
- If data access error occurspublic List<Business> find(List<Filter> filters, String field, boolean asc, int limit, int offset) throws DAOConnectionException
AbstractDAO
find
in interface AbstractDAO<Business>
filters
- List of filterfield
- field to sort onasc
- True for ascending, False for descending orderlimit
- max number of items to getoffset
- start for items to getDAOConnectionException
- If data access error occurspublic void update(List<Filter> filters, String toSet) throws DAOConnectionException
AbstractDAO
update
in interface AbstractDAO<Business>
filters
- List of filtertoSet
- field to update as "field1 = value1, field2 = value2, ..."DAOConnectionException
- If data access error occurspublic long count(List<Filter> fitlers) throws DAOConnectionException
count
in interface AbstractDAO<Business>
fitlers
- List of filterDAOConnectionException
- If data access error occurspublic void insert(Business business)
AbstractDAO
insert
in interface AbstractDAO<Business>
business
- object to insertpublic Business select(String hostid) throws DAOConnectionException, DAONoDataException
AbstractDAO
select
in interface AbstractDAO<Business>
hostid
- id of the object requestedDAOConnectionException
- If a data access error occursDAONoDataException
- if no data are availablepublic void update(Business business)
AbstractDAO
update
in interface AbstractDAO<Business>
business
- object to updateCopyright © 2009–2022 Waarp. All rights reserved.