Hi Marius,

thanks I found it. I used now 

      public String create(String className, String... values) {
                String select = new String();
                String from = new String();
                String where = new String();

                for (int i = 0; i < values.length; i++) {
                        String prop = "prop" + i;
                        String v = values[i];
                        select += prop + ".value";
                        from += "StringProperty as " + prop;
                        where += "and obj.id=" + prop + ".id.id and " + prop + 
".id.name='" + v +
"'";
                        if (i + 1 < values.length) {
                                select += ", ";
                                from += ", ";
                        }
                }

                return "select " + select + " from BaseObject as obj, " + from 
+ " where
obj.className='" + className + "' " + where;
        }

to get whatever i need.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Query-for-self-defined-objects-tp7587586p7587655.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to