I have a model with some properties e.g.
public class Example
{
long id;
String a, b;
int c, d;
boolean e;
}
Now I want to create a method like this
public void update(long id, Map<String, Object> properties)
{
....
}
in this properties map I want to have sth like
properties.put("a","Test"); properties.put("c", 8);
I'm not exactly sure on how to achieve this.
at the end I want to do sth like this:
Example e = new Example(....);
.....
e.update(5L,properties);
can some1 point me to the correct path? I cant figure out a searchterm that doesnt lead me to the Properties or HashMap entries.
thanks in advance