public class Query extends SqlUpdate
java.sql.Statement
from the ResourceManager
and executes the SQL query.Constructor and Description |
---|
Query(java.lang.String sql)
Construct a Query object
|
Query(java.lang.String sql,
java.lang.Object[] par)
Construct a Query object with bind parameters
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the query and result-set objects
|
void |
executeQuery(java.lang.Object[] par)
Execute the Query with new bind parameters.
|
void |
executeQuery(java.lang.String sql)
Execute a SQL query.
|
int |
executeUpdate(java.lang.String sql)
Execute a non-query SQL statement
|
Address |
getAddress(Device dev)
Create a
oracle.lite.resource.Address object from
the query result. |
Application |
getApplication()
Create a
oracle.lite.resource.Application object from
the query result. |
java.sql.Blob |
getBlob(int idx)
Retrieve the blob value from the query result.
|
Device |
getDevice(User usr)
Create a
oracle.lite.resource.Device object from
the query result. |
DeviceCommand |
getDeviceCommand(Device dev)
Create a
oracle.lite.resource.dm.DeviceCommand object from
the query result. |
Group |
getGroup()
Create a
oracle.lite.resource.Group object from
the query result. |
java.io.InputStream |
getInputStream(int idx)
Retrieve the
java.io.InputStream value from the query result. |
int |
getInt(int idx)
Retrieve the 'int' value from the query result.
|
Language |
getLanguage()
Create a
oracle.lite.resource.Language object from
the query result. |
Log |
getLog()
Create a
oracle.lite.resource.Log object from
the query result. |
long |
getLong(int idx)
Retrieve the 'long' value from the query result.
|
Platform |
getPlatform()
Create a
oracle.lite.resource.Platform object from
the query result. |
Provider |
getProvider()
Create a
oracle.lite.resource.Provider object from
the query result. |
QueueData |
getQueueData(Device dev)
Create a
oracle.lite.resource.dm.QueueData object from
the query result. |
Role |
getRole()
Create a
oracle.lite.resource.Role object from
the query result. |
java.lang.String |
getString(int idx)
Retrieve the string value from the query result.
|
java.sql.Timestamp |
getTimestamp(int idx)
Retrieve the
java.sql.Timestamp value from the query result. |
User |
getUser()
Create a
oracle.lite.resource.User object from
the query result. |
boolean |
next()
Move to the next cursor
|
bind, close, executeUpdate, executeUpdate, executeUpdate
public Query(java.lang.String sql) throws java.sql.SQLException
sql
- SQL statement to be executed (optional)lava.sql.SQLException
java.sql.SQLException
public Query(java.lang.String sql, java.lang.Object[] par) throws java.sql.SQLException
sql
- SQL statement to be executedpar
- SQL statement bind parameterslava.sql.SQLException
java.sql.SQLException
public void close()
public void executeQuery(java.lang.Object[] par) throws java.sql.SQLException
par
- Bind parameterslava.sql.SQLException
java.sql.SQLException
public void executeQuery(java.lang.String sql) throws java.sql.SQLException
sql
- SQL statement to be executedlava.sql.SQLException
java.sql.SQLException
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
sql
- SQL statement to be executedlava.sql.SQLException
java.sql.SQLException
public Address getAddress(Device dev) throws java.sql.SQLException
oracle.lite.resource.Address
object from
the query result.oracle.lite.resource.Address
objectlava.sql.SQLException
java.sql.SQLException
public Application getApplication() throws java.sql.SQLException
oracle.lite.resource.Application
object from
the query result.oracle.lite.resource.Application
objectlava.sql.SQLException
java.sql.SQLException
public java.sql.Blob getBlob(int idx) throws java.sql.SQLException
idx
- Column indexjava.sql.SQLException
public Device getDevice(User usr) throws java.sql.SQLException
oracle.lite.resource.Device
object from
the query result.usr
- Owner of the deviceoracle.lite.resource.Device
objectlava.sql.SQLException
java.sql.SQLException
public DeviceCommand getDeviceCommand(Device dev) throws java.sql.SQLException
oracle.lite.resource.dm.DeviceCommand
object from
the query result.oracle.lite.resource.dm.DeviceCommand
objectlava.sql.SQLException
java.sql.SQLException
public Group getGroup() throws java.sql.SQLException
oracle.lite.resource.Group
object from
the query result.oracle.lite.resource.Group
objectlava.sql.SQLException
java.sql.SQLException
public java.io.InputStream getInputStream(int idx) throws java.sql.SQLException
java.io.InputStream
value from the query result.idx
- Column indexlava.sql.SQLException
java.sql.SQLException
public int getInt(int idx) throws java.sql.SQLException
idx
- Column indexlava.sql.SQLException
java.sql.SQLException
public Language getLanguage() throws java.sql.SQLException
oracle.lite.resource.Language
object from
the query result.oracle.lite.resource.Language
objectlava.sql.SQLException
java.sql.SQLException
public Log getLog() throws java.sql.SQLException
oracle.lite.resource.Log
object from
the query result.oracle.lite.resource.QueueData
objectlava.sql.SQLException
java.sql.SQLException
public long getLong(int idx) throws java.sql.SQLException
idx
- Column indexlava.sql.SQLException
java.sql.SQLException
public Platform getPlatform() throws java.sql.SQLException
oracle.lite.resource.Platform
object from
the query result.oracle.lite.resource.Platform
objectlava.sql.SQLException
java.sql.SQLException
public Provider getProvider() throws java.sql.SQLException
oracle.lite.resource.Provider
object from
the query result.oracle.lite.resource.Provider
objectlava.sql.SQLException
java.sql.SQLException
public QueueData getQueueData(Device dev) throws java.sql.SQLException
oracle.lite.resource.dm.QueueData
object from
the query result.oracle.lite.resource.dm.QueueData
objectlava.sql.SQLException
java.sql.SQLException
public Role getRole() throws java.sql.SQLException
oracle.lite.resource.Role
object from
the query result.oracle.lite.resource.Role
objectlava.sql.SQLException
java.sql.SQLException
public java.lang.String getString(int idx) throws java.sql.SQLException
idx
- Column indexlava.sql.SQLException
java.sql.SQLException
public java.sql.Timestamp getTimestamp(int idx) throws java.sql.SQLException
java.sql.Timestamp
value from the query result.idx
- Column indexlava.sql.SQLException
java.sql.SQLException
public User getUser() throws java.sql.SQLException
oracle.lite.resource.User
object from
the query result.oracle.lite.resource.User
objectlava.sql.SQLException
java.sql.SQLException
public boolean next() throws java.sql.SQLException
lava.sql.SQLException
java.sql.SQLException