public class XMLBusinessDAO extends Object implements BusinessDAO
Modifier and Type | Field and Description |
---|---|
static String |
HOSTID_FIELD |
Constructor and Description |
---|
XMLBusinessDAO(String filePath) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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 lsayer
|
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
|
public static final String HOSTID_FIELD
public XMLBusinessDAO(String filePath) throws DAOConnectionException
DAOConnectionException
public void close()
close
in interface AbstractDAO<Business>
public void delete(Business business) throws DAOConnectionException
AbstractDAO
delete
in interface AbstractDAO<Business>
business
- object to deleteDAOConnectionException
- If a data access error occurspublic void deleteAll() throws DAOConnectionException
AbstractDAO
deleteAll
in interface AbstractDAO<Business>
DAOConnectionException
- If a data access error occurspublic 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 void insert(Business business) throws DAOConnectionException
AbstractDAO
insert
in interface AbstractDAO<Business>
business
- object to insertDAOConnectionException
- If a data access error occurspublic 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) throws DAOConnectionException
AbstractDAO
update
in interface AbstractDAO<Business>
business
- object to updateDAOConnectionException
- If a data access error occursCopyright © 2009–2020 Waarp. All rights reserved.