HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-05-19 a89989b1fdf06ef4b574863ad3b458a5cd5dab0e
Fehlerkorrektur im CLI-Servlet
1 files modified
12 ■■■■ changed files
hsarback/src/de/hsadmin/cliClientConnector/CLIClientConnectorServlet.java 12 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/cliClientConnector/CLIClientConnectorServlet.java
@@ -123,23 +123,23 @@
                String type = m[j].getParameterTypes()[0].getCanonicalName();
                try {
                    if (type.equals("java.lang.String"))
                        m[j].invoke(o, value);
                        m[j].invoke(realO, value);
                    else if (type.equals("java.lang.Integer") || type.equals("int"))
                        m[j].invoke(o, Integer.parseInt(value));
                        m[j].invoke(realO, Integer.parseInt(value));
                    else if (type.equals("java.lang.Long") || type.equals("long"))
                        m[j].invoke(o, Long.parseLong(value));
                        m[j].invoke(realO, Long.parseLong(value));
                    else if (type.equals("java.lang.Boolean") || type.equals("boolean"))
                        m[j].invoke(o, Boolean.valueOf(value));
                        m[j].invoke(realO, Boolean.valueOf(value));
                    else if (type.equals("java.util.Date")) {
                        DateFormat df = DateFormat.getInstance();
                        m[j].invoke(o, df.parse(value));
                        m[j].invoke(realO, df.parse(value));
                    } else {
                        Method m2 = module.getClass().getMethod(
                                "findByString", Class.class, String.class);
                        Object entity = 
                            m2.invoke(module, m[j].getParameterTypes()[0], value);
                        if (entity != null)
                            m[j].invoke(o, entity);
                            m[j].invoke(realO, entity);
                        else
                            throw new BusinessException(
                                    "not object found for '" + value + "'");