public abstract class DBTransferDAO extends StatementExecutor<Transfer> implements TransferDAO
connection
Modifier | Constructor and Description |
---|---|
protected |
DBTransferDAO(Connection con) |
Modifier and Type | Method and Description |
---|---|
void |
delete(Transfer transfer)
Remove the specified object from the persistance layer
|
boolean |
exist(long id,
String requester,
String requested,
String owner)
Verify if a Transfer object with the specified Special ID exists in the
persistance layer
|
boolean |
exist(String id)
|
List<Transfer> |
find(List<Filter> filters,
int limit)
Retrieve all Transfer objects to the given filters in a List from the
persistance layer
|
List<Transfer> |
find(List<Filter> filters,
int limit,
int offset)
Retrieve all Transfer objects to the given filters in a List from the
persistance layer
|
List<Transfer> |
find(List<Filter> filters,
String column,
boolean ascend)
Retrieve all Transfer objects to the given filters in a List from the
persistance layer
|
List<Transfer> |
find(List<Filter> filters,
String column,
boolean ascend,
int limit)
Retrieve all Transfer objects to the given filters in a List from the
persistance layer
|
List<Transfer> |
find(List<Filter> filters,
String column,
boolean ascend,
int limit,
int offset)
Retrieve all Transfer objects to the given filters in a List from the
persistance layer
|
protected String |
getDeleteAllRequest() |
protected String |
getDeleteRequest() |
protected String |
getExistRequest() |
Transfer |
getFromResultSet(ResultSet set) |
protected String |
getGetAllRequest() |
protected String |
getId(Transfer e1)
|
protected String |
getInsertRequest() |
protected Object[] |
getInsertValues(Transfer transfer) |
protected abstract long |
getNextId() |
protected String |
getSelectRequest() |
protected String |
getUpdateRequest() |
protected Object[] |
getUpdateValues(Transfer transfer) |
void |
insert(Transfer transfer)
Insert the specified object in the persistance layer
|
Transfer |
select(long id,
String requester,
String requested,
String owner)
Retrieve the Transfer object with the specified Special ID from the
persistance layer
|
Transfer |
select(String id)
|
close, closeResultSet, closeStatement, deleteAll, executeAction, executeQuery, executeUpdate, find, getAll, setParameters, update
protected static final String TABLE
public static final String ID_FIELD
public static final String GLOBAL_STEP_FIELD
public static final String GLOBAL_LAST_STEP_FIELD
public static final String STEP_FIELD
public static final String RANK_FIELD
public static final String STEP_STATUS_FIELD
public static final String RETRIEVE_MODE_FIELD
public static final String FILENAME_FIELD
public static final String IS_MOVED_FIELD
public static final String ID_RULE_FIELD
public static final String BLOCK_SIZE_FIELD
public static final String ORIGINAL_NAME_FIELD
public static final String FILE_INFO_FIELD
public static final String TRANSFER_INFO_FIELD
public static final String TRANSFER_MODE_FIELD
public static final String TRANSFER_START_FIELD
public static final String TRANSFER_STOP_FIELD
public static final String INFO_STATUS_FIELD
public static final String OWNER_REQUEST_FIELD
public static final String REQUESTED_FIELD
public static final String REQUESTER_FIELD
public static final String UPDATED_INFO_FIELD
protected static final String SQL_DELETE
protected static final String SQL_DELETE_ALL
protected static final String SQL_EXIST
protected static final String SQL_GET_ALL
protected static final String SQL_INSERT
protected static final String SQL_SELECT
protected static final String SQL_UPDATE
protected DBTransferDAO(Connection con)
protected String getDeleteRequest()
getDeleteRequest
in class StatementExecutor<Transfer>
protected String getDeleteAllRequest()
getDeleteAllRequest
in class StatementExecutor<Transfer>
protected String getExistRequest()
getExistRequest
in class StatementExecutor<Transfer>
protected String getGetAllRequest()
getGetAllRequest
in class StatementExecutor<Transfer>
protected String getInsertRequest()
getInsertRequest
in class StatementExecutor<Transfer>
protected String getSelectRequest()
getSelectRequest
in class StatementExecutor<Transfer>
protected String getUpdateRequest()
getUpdateRequest
in class StatementExecutor<Transfer>
protected Object[] getInsertValues(Transfer transfer)
getInsertValues
in class StatementExecutor<Transfer>
protected Object[] getUpdateValues(Transfer transfer)
getUpdateValues
in class StatementExecutor<Transfer>
public void delete(Transfer transfer) throws DAOConnectionException, DAONoDataException
AbstractDAO
delete
in interface AbstractDAO<Transfer>
delete
in class StatementExecutor<Transfer>
transfer
- object to deleteDAOConnectionException
- If a data access error occursDAONoDataException
- if no data are availablepublic List<Transfer> find(List<Filter> filters, int limit) throws DAOConnectionException
TransferDAO
find
in interface TransferDAO
filters
- List of filterDAOConnectionException
- If data access error occurspublic List<Transfer> find(List<Filter> filters, int limit, int offset) throws DAOConnectionException
TransferDAO
find
in interface TransferDAO
filters
- List of filterDAOConnectionException
- If data access error occurspublic List<Transfer> find(List<Filter> filters, String column, boolean ascend) throws DAOConnectionException
TransferDAO
find
in interface TransferDAO
filters
- List of filterDAOConnectionException
- If data access error occurspublic List<Transfer> find(List<Filter> filters, String column, boolean ascend, int limit) throws DAOConnectionException
TransferDAO
find
in interface TransferDAO
filters
- List of filterDAOConnectionException
- If data access error occurspublic List<Transfer> find(List<Filter> filters, String column, boolean ascend, int limit, int offset) throws DAOConnectionException
TransferDAO
find
in interface TransferDAO
filters
- List of filterDAOConnectionException
- If data access error occurspublic boolean exist(long id, String requester, String requested, String owner) throws DAOConnectionException
TransferDAO
exist
in interface TransferDAO
id
- special ID of the Transfer object verifiedDAOConnectionException
- If a data access error occurspublic Transfer select(long id, String requester, String requested, String owner) throws DAOConnectionException, DAONoDataException
TransferDAO
select
in interface TransferDAO
id
- special ID of the Transfer object requestedDAOConnectionException
- If a data access error occursDAONoDataException
- if no data are availableprotected abstract long getNextId() throws DAOConnectionException
DAOConnectionException
public void insert(Transfer transfer) throws DAOConnectionException
AbstractDAO
insert
in interface AbstractDAO<Transfer>
insert
in class StatementExecutor<Transfer>
transfer
- object to insertDAOConnectionException
- If a data access error occurspublic Transfer getFromResultSet(ResultSet set) throws SQLException
getFromResultSet
in class StatementExecutor<Transfer>
SQLException
public Transfer select(String id)
select
in interface AbstractDAO<Transfer>
select
in class StatementExecutor<Transfer>
id
- id of the object requestedpublic boolean exist(String id)
exist
in interface AbstractDAO<Transfer>
exist
in class StatementExecutor<Transfer>
id
- id of the object requestedprotected String getId(Transfer e1)
getId
in class StatementExecutor<Transfer>
e1
- as TransferCopyright © 2009–2020 Waarp. All rights reserved.