|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SqlRow
Used to return raw SQL query results.
Refer to SqlQuery
for examples.
There are convenience methods such as getInteger(), getBigDecimal() etc. The reason for these methods is that the values put into this map often come straight from the JDBC resultSet. Depending on the JDBC driver it may put a different type into a given property. For example an Integer, BigDecimal, Double could all be put into a property depending on the JDBC driver used. These convenience methods automatically convert the value as required returning the type you expect.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Method Summary | |
---|---|
void |
clear()
Clear the map. |
boolean |
containsKey(Object key)
Returns true if the map contains the property. |
boolean |
containsValue(Object value)
Returns true if the map contains the value. |
Set<Map.Entry<String,Object>> |
entrySet()
Returns the entrySet of the map. |
Object |
get(Object name)
Return a property value by its name. |
BigDecimal |
getBigDecimal(String name)
Return a property value as a BigDecimal. |
Boolean |
getBoolean(String name)
Return a property as a Boolean. |
Date |
getDate(String name)
Return the property as a sql date. |
Double |
getDouble(String name)
Return the property value as a Double. |
Float |
getFloat(String name)
Return the property value as a Float. |
Integer |
getInteger(String name)
Return a property as an Integer. |
Long |
getLong(String name)
Return a property value as a Long. |
String |
getString(String name)
Return a property as a String. |
Timestamp |
getTimestamp(String name)
Return the property as a sql timestamp. |
Date |
getUtilDate(String name)
Return the property as a java.util.Date. |
UUID |
getUUID(String name)
Return a property as a UUID. |
boolean |
isEmpty()
Returns true if the map is empty. |
Iterator<String> |
keys()
Return the property names (String). |
Set<String> |
keySet()
Returns the key set of the map. |
Object |
put(String name,
Object value)
Set a value to a property. |
void |
putAll(Map<? extends String,? extends Object> t)
Put all the values from t into this map. |
Object |
remove(Object name)
Remove a property from the map. |
Object |
set(String name,
Object value)
Exactly the same as the put method. |
int |
size()
Return the size of the map. |
String |
toString()
String description of the underlying map. |
Collection<Object> |
values()
Return the values from this map. |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Method Detail |
---|
Iterator<String> keys()
Internally this uses LinkedHashMap and so the order of the property names should be predictable and ordered by the use of LinkedHashMap.
Object remove(Object name)
remove
in interface Map<String,Object>
Object get(Object name)
get
in interface Map<String,Object>
Object put(String name, Object value)
put
in interface Map<String,Object>
Object set(String name, Object value)
I added this method because it seems more bean like to have get and set methods.
Boolean getBoolean(String name)
UUID getUUID(String name)
Integer getInteger(String name)
BigDecimal getBigDecimal(String name)
Long getLong(String name)
Double getDouble(String name)
Float getFloat(String name)
String getString(String name)
Date getUtilDate(String name)
Date getDate(String name)
Timestamp getTimestamp(String name)
String toString()
toString
in class Object
void clear()
clear
in interface Map<String,Object>
boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
Set<Map.Entry<String,Object>> entrySet()
entrySet
in interface Map<String,Object>
boolean isEmpty()
isEmpty
in interface Map<String,Object>
Set<String> keySet()
keySet
in interface Map<String,Object>
void putAll(Map<? extends String,? extends Object> t)
putAll
in interface Map<String,Object>
int size()
size
in interface Map<String,Object>
Collection<Object> values()
values
in interface Map<String,Object>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |