public class OrangeUser
extends java.lang.Object
| Constructor and Description |
|---|
OrangeUser(java.lang.String username,
java.lang.String password)
Instantiates an connetion to the database containing user details in order
to allow for personal data retrieval.
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
getMyIDs()
Returns the global_ids of all of the authenticated user's sensors.
|
int[] |
getMyIDs(int[] sensor_ids)
Returns the global_ids of all of the authenticated user's sensors filtered by
a collection of internal IDs.
|
int[] |
getMyIDsWhere(java.lang.String[] cols,
java.lang.String[] args)
Returns the global_ids of all of the authenticated user's sensors
filtered by a set of columns and their respective arguments.
|
int[] |
getMyIDsWhere(java.lang.String col,
java.lang.String arg)
Returns the global_ids of all of the authenticated user's sensors
filtered by a column and its value argument.
|
public OrangeUser(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
username - the company name chosen at user registrationpassword - the password chosen at user registrationjava.sql.SQLException - if a connection to the database couldn't be madepublic int[] getMyIDs()
throws java.sql.SQLException
java.sql.SQLException - if a connection to the database couldn't be madepublic int[] getMyIDs(int[] sensor_ids)
throws java.sql.SQLException
sensor_ids - an array containing a collection of sensor_ids describing sensors registered by the userjava.sql.SQLException - if a connection to the database couldn't be madepublic int[] getMyIDsWhere(java.lang.String col,
java.lang.String arg)
throws java.sql.SQLException
col - the column to filter by. One of 'application', 'measures', or 'unit'arg - the argument to filter byjava.sql.SQLException - if a connection to the database couldn't be made.public int[] getMyIDsWhere(java.lang.String[] cols,
java.lang.String[] args)
throws java.sql.SQLException
cols - the columns to filter byargs - the respective arguments to filter byjava.sql.SQLException - if a connection to the database couldn't be made