Package com.mysema.util

Examples of com.mysema.util.BeanMap.entrySet()


    @Override
    public Map<Path<?>, Object> createMap(RelationalPath<?> entity, Object bean) {
        Map<Path<?>, Object> values = new HashMap<Path<?>, Object>();
        Map<String, Object> map = new BeanMap(bean);
        Map<String, Path<?>> columns = getColumns(entity);
        for (Map.Entry entry : map.entrySet()) {
            String property = entry.getKey().toString();
            if (!property.equals("class") && columns.containsKey(property)) {
                Path path = columns.get(property);
                if (entry.getValue() != null) {
                    values.put(path, entry.getValue());
View Full Code Here


    @SuppressWarnings("unchecked")
    private <T> BooleanBuilder getByExample(T entity) {
        PathBuilder<T> entityPath = new PathBuilder<T>((Class<T>)entity.getClass(), "entity");
        BooleanBuilder conditions = new BooleanBuilder();
        Map<String, Object> beanMap = new BeanMap(entity);
        for (Map.Entry<String,Object> entry : beanMap.entrySet()) {
            if (!entry.getKey().equals("class")) {
                if (entry.getValue() != null) {
                    conditions.and(entityPath.get(entry.getKey()).eq(entry.getValue()));
                }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.