src/com/vehiclerental/dataLayer/sqliteImplementation/VehicleDaoSqliteImpl.java
/**
     * Returns all the vehicles matching a type in the specified branch in the SQLite database
     *
     * @param vehicleTypeId the type ID
     * @param nodeBranch the branch
     * @return a list of the matched vehicles
     */
Returns all the vehicles matching a type in the specified branch in the SQLite database
@param vehicleTypeId the type ID
@param nodeBranch the branch
@return a list of the matched vehicles
Returns all the vehicles matching a type in the specified branch in the SQLite database @param vehicleTypeId the type ID @param nodeBranch the branch @return a list of the matched vehicles
@Override
    public List<Vehicle> searchBranchVehiclesByType(int vehicleTypeId, Branch nodeBranch) {
        try {
            QueryBuilder<Vehicle, Integer> statementBuilder = dao.queryBuilder();
            Where whereClause = statementBuilder.where();
            whereClause
                    .eq(Vehicle.TYPE_FIELD_NAME, vehicleTypeId)
                    .and()
                    .eq(Vehicle.BRANCH_FIELD_NAME, nodeBranch);
            return dao.query(statementBuilder.prepare());
        } catch (SQLException e) {
            return null;
        }
    }
@ Override public List < Vehicle > searchBranchVehiclesByType ( int vehicleTypeId , Branch nodeBranch ) { try { QueryBuilder < Vehicle , Integer > statementBuilder = dao . queryBuilder ( ) ; Where whereClause = statementBuilder . where ( ) ; whereClause . eq ( Vehicle . TYPE_FIELD_NAME , vehicleTypeId ) . and ( ) . eq ( Vehicle . BRANCH_FIELD_NAME , nodeBranch ) ; return dao . query ( statementBuilder . prepare ( ) ) ; } catch ( SQLException e ) { return null ; } }
Returns all the vehicles matching a type in the specified branch in the SQLite database
 @param vehicleTypeId the type ID
 @param nodeBranch the branch
 @return a list of the matched vehicles
Returns all the vehicles matching a type in the specified branch in the SQLite database @param vehicleTypeId the type ID @param nodeBranch the branch @return a list of the matched vehicles