Menu
- General Information
- Architecture :
- Services & Processes
- CookBooks
- Deployment
- Bundled Applications
- Source Code :
- Third-Party Setup :
- Polytech Staff Area :
This library handle the database tehchnical code and allow a more friendly usage of the MySQL database hidden by jSeduite Web Services.
This class allow services to query the database transparently.
void executeVoid(String query):query, and do not handle database response.String extractScalar(String query, String column): column for a queryString[] extractScalarSet(String query, String column):extractScalar, but returns all values from the response.DalResultSet extractDataSet(String query): query.The following example show how to use this library. You can also read the content of some jSeduite Web services which uses the library, the code isn't that complicated to understand !
public boolean isAuthorized(String login, String password) { DataAccessLayer dal = new DataAccessLayer(); String sql = "SELECT `password` FROM `accounts` WHERE `login` = \"" + login + "\";"; try { String data = dal.extractScalar(sql, "password"); return data.equals(password); } catch(Exception e){ return false; }
This class is a data structure to handle complex result set. The results can be accessed in a sequential way. For the current result, you can extract the content of a column.
void next()void pred()int size()String getValue(String name)name, or return ”” if such a column doesn't exists.
You just have to add a dependency to the project libraries/DatabaseConnection for your Web Service.