burferd Posted April 2, 2007 Share Posted April 2, 2007 All the examples I have seen so far pass parameters as strings using something like: HashMap hmap = new HashMap();hmap.put( "ParamName", "value" ); How do you handle non-string parameters (int, double)?Are they passed as strings as well like:hmap.put( "ID", "13" ); or do they have to be passed as some other object type? Link to comment Share on other sites More sharing options...
3rwin Posted April 3, 2007 Share Posted April 3, 2007 Parameters are passed as an object. java.lang.Stringjava.lang.Objectjava.lang.Booleanjava.lang.Bytejava.util.Datejava.sql.Timestampjava.sql.Timejava.lang.Doublejava.lang.Floatjava.lang.Integerjava.io.InputStreamjava.lang.Longjava.lang.Shortjava.math.BigDecimal so ... for exampleCode:hmap.put( "ID", new Integer(13) ); 3rwinPost edited by: 3rwin, at: 2007/04/03 08:32 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now