|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Persistence
Interface for the data persistency layer.
Method Summary | |
---|---|
int |
authUser(String username,
String password)
Authenticate user by checking the username and password. |
List<Coordinate> |
getCoordinates(int routeID)
Returns the coordinates of a route for a specific user and route. |
Route |
getRoute(int routeId)
Returns spesific route with routeId |
List<Route> |
getRoutes(String username)
Returns routes from specific user. |
User |
getUser(int userId)
Returns user asked for |
int |
getUserId(String username)
Returns userId of given username. |
List<User> |
getUserList()
Returns list of users to get routes from |
void |
lockRoute(int routeID,
boolean lock)
Lock the route for further logging or unlock it to continue logging. |
Route |
makeRoute(int userID,
String description,
boolean visibility)
Generates a new route to the user with description. |
void |
setVisible(int routeID,
boolean visible)
Changes the visibility of a route. |
void |
storeCoordinate(int routeID,
Coordinate coord)
Stores coordinates from the GPS in the database. |
void |
storeCoordinate(int routeID,
List<Coordinate> coords)
Stores buffered coordinates from the GPS in the database. |
Method Detail |
---|
int getUserId(String username)
int authUser(String username, String password)
username
- password
-
void storeCoordinate(int routeID, Coordinate coord)
routeID
- route identification of the coordinatecoord
- coordinate to storevoid storeCoordinate(int routeID, List<Coordinate> coords)
routeID
- route identification of the coordinatecoords
- List of coordinates to storeRoute makeRoute(int userID, String description, boolean visibility)
userID
- user ID of the route ownerdescription
- text describing the routevisibility
- true for public, false for private
List<Route> getRoutes(String username)
username
- name of user to get routes from
username
Route getRoute(int routeId)
routeId
-
List<Coordinate> getCoordinates(int routeID)
routeID
-
routeID
List<User> getUserList()
User getUser(int userId)
userId
- = ID of user to get
void lockRoute(int routeID, boolean lock)
routeID
- route to lock/unlocklock
- true to lock, false to unlockvoid setVisible(int routeID, boolean visible)
routeID
- route to change visibilityvisible
- true to show route to all clients, false to show only to
owner
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |