Add template for assignment 1
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GenericDAO<T> {
|
||||
T findById(Long id);
|
||||
|
||||
List<T> findAll();
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
public interface IDAOFactory {
|
||||
|
||||
IDriverDAO createDriverDAO();
|
||||
|
||||
IEmploymentDAO createEmploymentDAO();
|
||||
|
||||
ILocationDAO createLocationDAO();
|
||||
|
||||
IMatchDAO createMatchDAO();
|
||||
|
||||
IOrganizationDAO createOrganizationDAO();
|
||||
|
||||
IRiderDAO createRiderDAO();
|
||||
|
||||
ITripDAO createTripDAO();
|
||||
|
||||
ITripInfoDAO createTripInfoDAO();
|
||||
|
||||
IVehicleDAO createVehicleDAO();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.IDriver;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface IDriverDAO extends GenericDAO<IDriver> {
|
||||
|
||||
|
||||
/**
|
||||
* Find all drivers that have active employments (active at least one month) in more than the given number
|
||||
* of organizations
|
||||
*
|
||||
* @param numberOfOrganizations number of organizations
|
||||
* @return a collection containing drivers
|
||||
*/
|
||||
Collection<IDriver> findActiveInMultipleOrganizationsDrivers(Long numberOfOrganizations);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.IEmployment;
|
||||
|
||||
public interface IEmploymentDAO extends GenericDAO<IEmployment> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.ILocation;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface ILocationDAO extends GenericDAO<ILocation> {
|
||||
|
||||
/**
|
||||
* Finds all distinct Location.locationId that have been reached as a Trip destination or additional
|
||||
* stops. Only takes completed trips in account.
|
||||
*
|
||||
* @return a list containing Location.locationIds
|
||||
*/
|
||||
Collection<Long> findReachedLocationIds();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.IMatch;
|
||||
|
||||
public interface IMatchDAO extends GenericDAO<IMatch> {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.IOrganization;
|
||||
|
||||
public interface IOrganizationDAO extends GenericDAO<IOrganization> {
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.IMoney;
|
||||
import dst.ass1.jpa.model.IRider;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface IRiderDAO extends GenericDAO<IRider> {
|
||||
|
||||
|
||||
/**
|
||||
* Returns the rider associated with the given email. Returns null if the email does not exist.
|
||||
*
|
||||
* @param email the email address
|
||||
* @return the rider or null
|
||||
*/
|
||||
IRider findByEmail(String email);
|
||||
|
||||
/**
|
||||
* Gets the total travel distance of the rider with the most recently completed trip
|
||||
*
|
||||
* @return the total distance the rider has travelled
|
||||
*/
|
||||
Double getTotalDistanceOfMostRecentRider();
|
||||
|
||||
/**
|
||||
* Finds for each Rider, who has completed at least one trip in the past 30 days, the sum of their total
|
||||
* spendings of the past 30 days.
|
||||
*
|
||||
* @return a map containing each rider, and the money grouped by their currency.
|
||||
*/
|
||||
Map<IRider, Map<String, IMoney>> getRecentSpending();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.ITrip;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
public interface ITripDAO extends GenericDAO<ITrip> {
|
||||
|
||||
/**
|
||||
* Find all canceled trips that were created in the given date range.
|
||||
*
|
||||
* @param start start of the date range
|
||||
* @param end end of the date range
|
||||
* @return the cancelled trips
|
||||
*/
|
||||
Collection<ITrip> findCancelledTrips(Date start, Date end);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.ITripInfo;
|
||||
|
||||
public interface ITripInfoDAO extends GenericDAO<ITripInfo> {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package dst.ass1.jpa.dao;
|
||||
|
||||
import dst.ass1.jpa.model.IVehicle;
|
||||
|
||||
public interface IVehicleDAO extends GenericDAO<IVehicle> {
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package dst.ass1.jpa.dao.impl;
|
||||
|
||||
import dst.ass1.jpa.dao.*;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
|
||||
public class DAOFactory implements IDAOFactory {
|
||||
|
||||
/*
|
||||
* HINT: When using the org.hibernate.Session in your DAOs you can extract it from the EntityManager reference with
|
||||
* e.g., em.unwrap(org.hibernate.Session.class). Do not store this org.hibernate.Session in your DAOs, but unwrap it
|
||||
* every time you actually need it.
|
||||
*/
|
||||
|
||||
private EntityManager em;
|
||||
|
||||
public DAOFactory(EntityManager em) {
|
||||
this.em = em;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDriverDAO createDriverDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEmploymentDAO createEmploymentDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILocationDAO createLocationDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMatchDAO createMatchDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOrganizationDAO createOrganizationDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRiderDAO createRiderDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITripDAO createTripDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITripInfoDAO createTripInfoDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVehicleDAO createVehicleDAO() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package dst.ass1.jpa.interceptor;
|
||||
|
||||
import org.hibernate.EmptyInterceptor;
|
||||
|
||||
public class SQLInterceptor extends EmptyInterceptor {
|
||||
|
||||
private static final long serialVersionUID = -3082243834965597947L;
|
||||
|
||||
public static void resetCounter() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
public static int getSelectCount() {
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the verbose argument is set, the interceptor prints the intercepted SQL statements to System.out.
|
||||
*
|
||||
* @param verbose whether or not to be verbose
|
||||
*/
|
||||
public static void setVerbose(boolean verbose) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onPrepareStatement(String sql) {
|
||||
// TODO
|
||||
return sql;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package dst.ass1.jpa.listener;
|
||||
|
||||
|
||||
public class DefaultListener {
|
||||
|
||||
// TODO
|
||||
|
||||
public static int getLoadOperations() {
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int getUpdateOperations() {
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int getRemoveOperations() {
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int getPersistOperations() {
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static long getOverallTimeToPersist() {
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static double getAverageTimeToPersist() {
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the internal data structures that are used for storing the operations.
|
||||
*/
|
||||
public static void clear() {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface IDriver extends IPlatformUser {
|
||||
|
||||
Collection<IEmployment> getEmployments();
|
||||
|
||||
void setEmployments(Collection<IEmployment> employments);
|
||||
|
||||
void addEmployment(IEmployment employment);
|
||||
|
||||
IVehicle getVehicle();
|
||||
|
||||
void setVehicle(IVehicle vehicle);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface IEmployment {
|
||||
|
||||
IEmploymentKey getId();
|
||||
|
||||
void setId(IEmploymentKey employmentKey);
|
||||
|
||||
Date getSince();
|
||||
|
||||
void setSince(Date since);
|
||||
|
||||
Boolean isActive();
|
||||
|
||||
void setActive(Boolean active);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
public interface IEmploymentKey {
|
||||
|
||||
IDriver getDriver();
|
||||
|
||||
void setDriver(IDriver driver);
|
||||
|
||||
IOrganization getOrganization();
|
||||
|
||||
void setOrganization(IOrganization organization);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
public interface ILocation {
|
||||
|
||||
Long getId();
|
||||
|
||||
void setId(Long id);
|
||||
|
||||
String getName();
|
||||
|
||||
void setName(String name);
|
||||
|
||||
Long getLocationId();
|
||||
|
||||
void setLocationId(Long locationId);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface IMatch {
|
||||
|
||||
Long getId();
|
||||
|
||||
void setId(Long id);
|
||||
|
||||
Date getDate();
|
||||
|
||||
void setDate(Date date);
|
||||
|
||||
IMoney getFare();
|
||||
|
||||
void setFare(IMoney money);
|
||||
|
||||
ITrip getTrip();
|
||||
|
||||
void setTrip(ITrip trip);
|
||||
|
||||
IVehicle getVehicle();
|
||||
|
||||
void setVehicle(IVehicle vehicle);
|
||||
|
||||
IDriver getDriver();
|
||||
|
||||
void setDriver(IDriver driver);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
public interface IModelFactory {
|
||||
|
||||
IModelFactory createModelFactory();
|
||||
|
||||
IDriver createDriver();
|
||||
|
||||
IEmployment createEmployment();
|
||||
|
||||
IEmploymentKey createEmploymentKey();
|
||||
|
||||
ILocation createLocation();
|
||||
|
||||
IMatch createMatch();
|
||||
|
||||
IMoney createMoney();
|
||||
|
||||
IOrganization createOrganization();
|
||||
|
||||
IRider createRider();
|
||||
|
||||
IPreferences createPreferences();
|
||||
|
||||
ITrip createTrip();
|
||||
|
||||
ITripInfo createTripInfo();
|
||||
|
||||
IVehicle createVehicle();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public interface IMoney {
|
||||
|
||||
String getCurrency();
|
||||
|
||||
void setCurrency(String currency);
|
||||
|
||||
BigDecimal getValue();
|
||||
|
||||
void setValue(BigDecimal value);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface IOrganization {
|
||||
|
||||
Long getId();
|
||||
|
||||
void setId(Long id);
|
||||
|
||||
String getName();
|
||||
|
||||
void setName(String name);
|
||||
|
||||
Collection<IOrganization> getParts();
|
||||
|
||||
void setParts(Collection<IOrganization> parts);
|
||||
|
||||
void addPart(IOrganization part);
|
||||
|
||||
Collection<IOrganization> getPartOf();
|
||||
|
||||
void setPartOf(Collection<IOrganization> partOf);
|
||||
|
||||
void addPartOf(IOrganization partOf);
|
||||
|
||||
Collection<IEmployment> getEmployments();
|
||||
|
||||
void setEmployments(Collection<IEmployment> employments);
|
||||
|
||||
void addEmployment(IEmployment employment);
|
||||
|
||||
Collection<IVehicle> getVehicles();
|
||||
|
||||
void setVehicles(Collection<IVehicle> vehicles);
|
||||
|
||||
void addVehicle(IVehicle vehicle);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
public interface IPlatformUser {
|
||||
|
||||
Long getId();
|
||||
|
||||
void setId(Long id);
|
||||
|
||||
String getName();
|
||||
|
||||
void setName(String name);
|
||||
|
||||
String getTel();
|
||||
|
||||
void setTel(String tel);
|
||||
|
||||
Double getAvgRating();
|
||||
|
||||
void setAvgRating(Double avgRating);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface IPreferences {
|
||||
|
||||
Long getId();
|
||||
|
||||
void setId(Long id);
|
||||
|
||||
Map<String, String> getData();
|
||||
|
||||
void setData(Map<String, String> data);
|
||||
|
||||
void putData(String key, String value);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface IRider extends IPlatformUser {
|
||||
|
||||
String getEmail();
|
||||
|
||||
void setEmail(String email);
|
||||
|
||||
byte[] getPassword();
|
||||
|
||||
void setPassword(byte[] password);
|
||||
|
||||
String getAccountNo();
|
||||
|
||||
void setAccountNo(String accountNo);
|
||||
|
||||
String getBankCode();
|
||||
|
||||
void setBankCode(String bankCode);
|
||||
|
||||
IPreferences getPreferences();
|
||||
|
||||
void setPreferences(IPreferences preferences);
|
||||
|
||||
Collection<ITrip> getTrips();
|
||||
|
||||
void setTrips(Collection<ITrip> trips);
|
||||
|
||||
void addTrip(ITrip trip);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
public interface ITrip {
|
||||
|
||||
Long getId();
|
||||
|
||||
void setId(Long id);
|
||||
|
||||
Date getCreated();
|
||||
|
||||
void setCreated(Date created);
|
||||
|
||||
Date getUpdated();
|
||||
|
||||
void setUpdated(Date updated);
|
||||
|
||||
TripState getState();
|
||||
|
||||
void setState(TripState state);
|
||||
|
||||
ILocation getPickup();
|
||||
|
||||
void setPickup(ILocation pickup);
|
||||
|
||||
ILocation getDestination();
|
||||
|
||||
void setDestination(ILocation destination);
|
||||
|
||||
Collection<ILocation> getStops();
|
||||
|
||||
void setStops(Collection<ILocation> stops);
|
||||
|
||||
void addStop(ILocation stop);
|
||||
|
||||
ITripInfo getTripInfo();
|
||||
|
||||
void setTripInfo(ITripInfo tripInfo);
|
||||
|
||||
IMatch getMatch();
|
||||
|
||||
void setMatch(IMatch match);
|
||||
|
||||
IRider getRider();
|
||||
|
||||
void setRider(IRider rider);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface ITripInfo {
|
||||
|
||||
Long getId();
|
||||
|
||||
void setId(Long id);
|
||||
|
||||
Date getCompleted();
|
||||
|
||||
void setCompleted(Date date);
|
||||
|
||||
Double getDistance();
|
||||
|
||||
void setDistance(Double distance);
|
||||
|
||||
IMoney getTotal();
|
||||
|
||||
void setTotal(IMoney money);
|
||||
|
||||
Integer getDriverRating();
|
||||
|
||||
void setDriverRating(Integer driverRating);
|
||||
|
||||
Integer getRiderRating();
|
||||
|
||||
void setRiderRating(Integer riderRating);
|
||||
|
||||
ITrip getTrip();
|
||||
|
||||
void setTrip(ITrip trip);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
public interface IVehicle {
|
||||
|
||||
Long getId();
|
||||
|
||||
void setId(Long id);
|
||||
|
||||
String getLicense();
|
||||
|
||||
void setLicense(String license);
|
||||
|
||||
String getColor();
|
||||
|
||||
void setColor(String color);
|
||||
|
||||
String getType();
|
||||
|
||||
void setType(String type);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package dst.ass1.jpa.model;
|
||||
|
||||
public enum TripState {
|
||||
CREATED, QUEUED, MATCHED, APPROACHING, IN_PROGRESS, CANCELLED, COMPLETED
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package dst.ass1.jpa.model.impl;
|
||||
|
||||
import dst.ass1.jpa.model.*;
|
||||
|
||||
/**
|
||||
* Creates new instances of your model implementations.
|
||||
*/
|
||||
public class ModelFactory implements IModelFactory {
|
||||
|
||||
@Override
|
||||
public IModelFactory createModelFactory() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDriver createDriver() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEmployment createEmployment() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEmploymentKey createEmploymentKey() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILocation createLocation() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMatch createMatch() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMoney createMoney() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOrganization createOrganization() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRider createRider() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPreferences createPreferences() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITrip createTrip() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITripInfo createTripInfo() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVehicle createVehicle() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package dst.ass1.jpa.util;
|
||||
|
||||
public final class Constants {
|
||||
|
||||
public static final String JPA_PERSISTENCE_UNIT = "dst_pu";
|
||||
|
||||
/* TYPES (CLASSES) */
|
||||
public static final String T_DRIVER = "Driver";
|
||||
public static final String T_EMPLOYMENT = "Employment";
|
||||
public static final String T_LOCATION = "Location";
|
||||
public static final String T_MATCH = "Match";
|
||||
public static final String T_ORGANIZATION = "Organization";
|
||||
public static final String T_PREFERENCES = "Preferences";
|
||||
public static final String T_RIDER = "Rider";
|
||||
public static final String T_TRIP = "Trip";
|
||||
public static final String T_TRIP_INFO = "TripInfo";
|
||||
public static final String T_VEHICLE = "Vehicle";
|
||||
|
||||
/* IDs (FOREIGN KEYS) */
|
||||
public static final String I_DRIVER = "driver_id";
|
||||
public static final String I_EMPLOYMENT = "employment_id";
|
||||
public static final String I_LOCATION = "location_id";
|
||||
public static final String I_MATCH = "match_id";
|
||||
public static final String I_ORGANIZATION = "organization_id";
|
||||
public static final String I_ORGANIZATION_PART_OF = "partOfOrganization_id";
|
||||
public static final String I_ORGANIZATION_PARTS = "partsOrganization_id";
|
||||
public static final String I_PREFERENCES = "preferences_id";
|
||||
public static final String I_RIDER = "rider_id";
|
||||
public static final String I_TRIP = "trip_id";
|
||||
public static final String I_TRIP_INFO = "tripInfo_id";
|
||||
public static final String I_VEHICLE = "vehicle_id";
|
||||
public static final String I_VEHICLES = "vehicles_id";
|
||||
|
||||
public static final String I_DESTINATION = "destination_id";
|
||||
public static final String I_PICKUP = "pickup_id";
|
||||
public static final String I_STOPS = "stops_id";
|
||||
|
||||
|
||||
/* MEMBER ATTRIBUTES */
|
||||
|
||||
|
||||
public static final String M_DRIVER_TEL = "tel";
|
||||
public static final String M_DRIVER_ORGANIZATIONS = "organizations";
|
||||
public static final String M_DRIVER_EMPLOYMENTS = "employments";
|
||||
public static final String M_DRIVER_VEHICLE = "vehicle";
|
||||
public static final String M_DRIVER_NAME = "name";
|
||||
public static final String M_DRIVER_AVG_RATING = "avgRating";
|
||||
public static final String M_EMPLOYMENT_SINCE = "since";
|
||||
public static final String M_EMPLOYMENT_ACTIVE = "active";
|
||||
public static final String M_LOCATION_LOCATION_ID = "locationId";
|
||||
public static final String M_LOCATION_GEO = "geo";
|
||||
public static final String M_LOCATION_NAME = "name";
|
||||
public static final String M_MATCH_DATE = "date";
|
||||
public static final String M_MATCH_FARE = "fare";
|
||||
public static final String M_MATCH_TRIP = "trip";
|
||||
public static final String M_MATCH_VEHICLE = "vehicle";
|
||||
public static final String M_MATCH_DRIVER = "driver";
|
||||
public static final String M_ORGANIZATION_NAME = "name";
|
||||
public static final String M_ORGANIZATION_EMPLOYMENTS = "employments";
|
||||
public static final String M_ORGANIZATION_PARTS = "parts";
|
||||
public static final String M_ORGANIZATION_DRIVERS = "drivers";
|
||||
public static final String M_PREFERENCES_DATA = "data";
|
||||
public static final String M_RIDER_BANK_CODE = "bankCode";
|
||||
public static final String M_RIDER_EMAIL = "email";
|
||||
public static final String M_RIDER_PASSWORD = "password";
|
||||
public static final String M_RIDER_TEL = "tel";
|
||||
public static final String M_RIDER_ACCOUNT = "accountNo";
|
||||
public static final String M_RIDER_PREFERENCES = "preferences";
|
||||
public static final String M_RIDER_TRIPS = "trips";
|
||||
public static final String M_RIDER_NAME = "name";
|
||||
public static final String M_RIDER_AVG_RATING = "avgRating";
|
||||
public static final String M_TRIP_STOPS = "stops";
|
||||
public static final String M_TRIP_STATE = "state";
|
||||
public static final String M_TRIP_CREATED = "created";
|
||||
public static final String M_TRIP_UPDATED = "updated";
|
||||
public static final String M_TRIP_PICKUP = "pickup";
|
||||
public static final String M_TRIP_DESTINATION = "destination";
|
||||
public static final String M_TRIP_TRIP_INFO = "tripInfo";
|
||||
public static final String M_TRIP_MATCH = "match";
|
||||
public static final String M_TRIP_RIDER = "rider";
|
||||
public static final String M_TRIP_INFO_COMPLETED = "completed";
|
||||
public static final String M_TRIP_INFO_TOTAL = "total";
|
||||
public static final String M_TRIP_INFO_DISTANCE = "distance";
|
||||
public static final String M_TRIP_INFO_TRIP = "trip";
|
||||
public static final String M_TRIP_INFO_DRIVER_RATING = "driverRating";
|
||||
public static final String M_TRIP_INFO_RIDER_RATING = "riderRating";
|
||||
public static final String M_VEHICLE_LICENSE = "license";
|
||||
public static final String M_VEHICLE_COLOR = "color";
|
||||
public static final String M_VEHICLE_TYPE = "type";
|
||||
|
||||
|
||||
/* ASSOCIATION NAMES (FOR QUERIES) */
|
||||
public static final String A_TRIP_INFO = "tripInfo";
|
||||
public static final String A_TRIP = "trip";
|
||||
public static final String A_RIDER = "rider";
|
||||
|
||||
/* NAMED QUERIES */
|
||||
public static final String Q_RIDER_BY_EMAIL = "riderByEmail";
|
||||
public static final String Q_ACTIVE_IN_MULITIPLE_ORGANIZATIONS_DRIVERS = "activeInMultipleOrganizationsDrivers";
|
||||
public static final String Q_REACHED_LOCATIONS = "reachedLocations";
|
||||
public static final String Q_SUM_DISTANCE_MOST_RECENT_TRIP = "sumDistanceOfRiderWithMostRecentTrip";
|
||||
|
||||
/* JOIN TABLES */
|
||||
public static final String J_ORGANIZATION_VEHICLE = "organization_vehicle";
|
||||
public static final String J_ORGANIZATION_PARTS = "organization_parts";
|
||||
public static final String J_DRIVER_ORGANIZATION = "driver_organization";
|
||||
public static final String J_PREFERENCES_DATA = "preferences_data";
|
||||
public static final String J_DRIVER_EMPLOYMENT = "driver_employment";
|
||||
public static final String J_ORGANIZATION_EMPLOYMENT = "organization_employment";
|
||||
public static final String J_TRIP_LOCATION = "trip_location";
|
||||
public static final String J_DRIVER_VEHICLE = "driver_vehicle";
|
||||
|
||||
/* MONGODB */
|
||||
public static final String MONGO_DB_NAME = "dst";
|
||||
public static final String COLL_LOCATION_DATA = "LocationData";
|
||||
|
||||
|
||||
private Constants() {
|
||||
// final
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user