public class UserQuery extends java.lang.Object implements AmberQuery
Constructor and Description |
---|
UserQuery(AbstractQuery query) |
Modifier and Type | Method and Description |
---|---|
java.sql.ResultSet |
executeQuery()
Executes the query returning a result set.
|
int |
executeUpdate()
Executes the query returning a result set.
|
AmberConnection |
getConnection() |
int |
getMaxResults()
Returns the max results.
|
AbstractQuery |
getQuery()
Returns the compiled query.
|
java.lang.String |
getQueryString()
Returns the query string.
|
AmberConnection |
getSession() |
java.lang.Object |
getSingleResult()
Executes the query returning the single result.
|
void |
init(AmberConnection aConn)
Initialize with the connection.
|
java.util.List<java.lang.Object> |
list()
Executes the query, returning a list.
|
void |
list(java.util.List<java.lang.Object> list)
Executes the query, filling the list.
|
void |
list(java.util.Map<java.lang.Object,java.lang.Object> map,
java.lang.reflect.Method methodGetMapKey)
Executes the query, filling the map.
|
void |
setByte(int index,
byte v)
Sets the argument with a byte
|
void |
setCacheMaxAge(long ms)
Sets the cache max age for the query.
|
void |
setDate(int index,
java.sql.Date v)
Sets the argument with a date
|
void |
setDouble(int index,
double v)
Sets the argument with a double
|
void |
setFirstResult(int index)
Sets the first result.
|
void |
setFloat(int index,
float v)
Sets the argument with a double
|
void |
setInt(int index,
int v)
Sets the argument with an int
|
void |
setLoadOnQuery(boolean loadOnQuery)
Sets true for load-on-query.
|
void |
setLong(int index,
long v)
Sets the argument with a string
|
void |
setMaxResults(int index)
Sets the maximum number of results.
|
void |
setNull(int index,
int v)
Sets the argument with a null
|
void |
setObject(int index,
java.lang.Object v)
Sets the argument with an object.
|
void |
setObject(int index,
java.lang.Object v,
AmberType type)
Sets the argument with an object and its Amber type.
|
void |
setSession(AmberConnection aConn) |
void |
setShort(int index,
short v)
Sets the argument with a short
|
void |
setString(int index,
java.lang.String v)
Sets the argument with a string
|
void |
setTimestamp(int index,
java.sql.Timestamp v)
Sets the argument with a timestamp
|
java.lang.String |
toString() |
public UserQuery(AbstractQuery query)
public java.lang.String getQueryString()
getQueryString
in interface AmberQuery
public void init(AmberConnection aConn)
AmberQuery
init
in interface AmberQuery
public void setSession(AmberConnection aConn)
public AmberConnection getSession()
public AmberConnection getConnection()
public void setLoadOnQuery(boolean loadOnQuery)
setLoadOnQuery
in interface AmberQuery
public AbstractQuery getQuery()
public void setString(int index, java.lang.String v)
setString
in interface AmberQuery
public void setByte(int index, byte v)
setByte
in interface AmberQuery
public void setShort(int index, short v)
setShort
in interface AmberQuery
public void setInt(int index, int v)
setInt
in interface AmberQuery
public void setLong(int index, long v)
setLong
in interface AmberQuery
public void setDouble(int index, double v)
setDouble
in interface AmberQuery
public void setFloat(int index, float v)
setFloat
in interface AmberQuery
public void setTimestamp(int index, java.sql.Timestamp v)
setTimestamp
in interface AmberQuery
public void setDate(int index, java.sql.Date v)
setDate
in interface AmberQuery
public void setObject(int index, java.lang.Object v)
setObject
in interface AmberQuery
public void setObject(int index, java.lang.Object v, AmberType type)
public void setNull(int index, int v)
setNull
in interface AmberQuery
public void setFirstResult(int index)
setFirstResult
in interface AmberQuery
public void setMaxResults(int index)
setMaxResults
in interface AmberQuery
public int getMaxResults()
public java.sql.ResultSet executeQuery() throws java.sql.SQLException
executeQuery
in interface AmberQuery
java.sql.SQLException
public int executeUpdate() throws java.sql.SQLException
executeUpdate
in interface AmberQuery
java.sql.SQLException
public void setCacheMaxAge(long ms)
setCacheMaxAge
in interface AmberQuery
public java.util.List<java.lang.Object> list() throws java.sql.SQLException
list
in interface AmberQuery
java.sql.SQLException
public java.lang.Object getSingleResult() throws java.sql.SQLException
getSingleResult
in interface AmberQuery
java.sql.SQLException
public void list(java.util.List<java.lang.Object> list) throws java.sql.SQLException
list
in interface AmberQuery
java.sql.SQLException
public void list(java.util.Map<java.lang.Object,java.lang.Object> map, java.lang.reflect.Method methodGetMapKey) throws java.sql.SQLException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
list
in interface AmberQuery
java.sql.SQLException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public java.lang.String toString()
toString
in class java.lang.Object