Package org.internna.iwebmvc.model

Examples of org.internna.iwebmvc.model.Selectable


    @RemoteMethod
    @SuppressWarnings("unchecked")
    public List<ValuePair<String, String>> fetchReferences(Class<?> clazz, String path, String query, int count, int number) throws Exception {
        Assert.isEncrypted(decipherer, path);
        DomainEntity parent = (DomainEntity) ClassUtils.instantiateClass(clazz);
        Selectable entity = (Selectable) ClassUtils.instantiateClass(new BeanWrapperImpl(parent).getPropertyType(decipherer.decrypt(path)));
        if (entity == null) entity = (Selectable) parent;
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("query", query + "%");
        List<ValuePair<String, String>> result = new ArrayList<ValuePair<String, String>>(number);
        for (Object[] o : dao.executeQuery(entity.selectableQuery(), count, number, parameters))
            result.add(new ValuePair<String, String>(o[0].toString(), translator.translate(o[1].toString())));
        return result;
    }
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.model.Selectable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.