PlaceDAO - ShutUpPaulo/TecProg_2016-01 GitHub Wiki
Class PlaceDAO
Class Attributes
No attributes
Methods
PlaceDAO
Return type: Constructor
Arguments: Activity currentActivity - Current activity to show message of connection problem
Description: Constructor to instantiate a PlaceDAO object
searchPlaceByPartName
Return type: JSONObject - Data of the places found
Arguments: String name - Part of the name to be searched on places name
Description: Method that searches places by part of name
searchPlaceByPartName attributes
Name | Type | Description | Default Value |
---|---|---|---|
QUERY | String | Stores the query to search places with the given part of name | "SELECT * FROM vw_place WHERE namePlace LIKE '%" + name + "%'" |
placeByPartNameQueryResult | JSONObject | Stores the result of the search that contains the data of the places which the name contains the given part of name |
searchAllPlaces
Return type: JSONObject - Data of the places found
Arguments: No arguments
Description: Method that searches all places available in database
searchAllPlaces attributes
Name | Type | Description | Default Value |
---|---|---|---|
QUERY | String | Stores the query to search all places available in database ordered by evaluation in descending order | "SELECT * FROM vw_place ORDER BY evaluate DESC" |
searchAllPlacesQueryResult | JSONObject | Stores the result of the search that contains the data of all places available in database ordered by evaluation in descending order |
searchTop5Places
Return type: JSONObject - Data of the five events found
Arguments: No arguments
Description: Method that searches the five events with better evaluation
searchTop5Places attributes
Name | Type | Description | Default Value |
---|---|---|---|
QUERY | String | Stores the query to search the five places in database with better evaluation ordered in descending order | "SELECT * FROM vw_place ORDER BY evaluate DESC LIMIT 5 |
searchTop5PlacesQueryResult | JSONObject | Stores the result of the search that contains the data of athe five places in database with better evaluation ordered in descending order |