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 AmberQuerypublic void init(AmberConnection aConn)
AmberQueryinit in interface AmberQuerypublic void setSession(AmberConnection aConn)
public AmberConnection getSession()
public AmberConnection getConnection()
public void setLoadOnQuery(boolean loadOnQuery)
setLoadOnQuery in interface AmberQuerypublic AbstractQuery getQuery()
public void setString(int index,
java.lang.String v)
setString in interface AmberQuerypublic void setByte(int index,
byte v)
setByte in interface AmberQuerypublic void setShort(int index,
short v)
setShort in interface AmberQuerypublic void setInt(int index,
int v)
setInt in interface AmberQuerypublic void setLong(int index,
long v)
setLong in interface AmberQuerypublic void setDouble(int index,
double v)
setDouble in interface AmberQuerypublic void setFloat(int index,
float v)
setFloat in interface AmberQuerypublic void setTimestamp(int index,
java.sql.Timestamp v)
setTimestamp in interface AmberQuerypublic void setDate(int index,
java.sql.Date v)
setDate in interface AmberQuerypublic void setObject(int index,
java.lang.Object v)
setObject in interface AmberQuerypublic void setObject(int index,
java.lang.Object v,
AmberType type)
public void setNull(int index,
int v)
setNull in interface AmberQuerypublic void setFirstResult(int index)
setFirstResult in interface AmberQuerypublic void setMaxResults(int index)
setMaxResults in interface AmberQuerypublic int getMaxResults()
public java.sql.ResultSet executeQuery()
throws java.sql.SQLException
executeQuery in interface AmberQueryjava.sql.SQLExceptionpublic int executeUpdate()
throws java.sql.SQLException
executeUpdate in interface AmberQueryjava.sql.SQLExceptionpublic void setCacheMaxAge(long ms)
setCacheMaxAge in interface AmberQuerypublic java.util.List<java.lang.Object> list()
throws java.sql.SQLException
list in interface AmberQueryjava.sql.SQLExceptionpublic java.lang.Object getSingleResult()
throws java.sql.SQLException
getSingleResult in interface AmberQueryjava.sql.SQLExceptionpublic void list(java.util.List<java.lang.Object> list)
throws java.sql.SQLException
list in interface AmberQueryjava.sql.SQLExceptionpublic 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 AmberQueryjava.sql.SQLExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetExceptionpublic java.lang.String toString()
toString in class java.lang.Object