Package com.activequant.domainmodel

Examples of com.activequant.domainmodel.GenericRow


        List<String> iids = mapper.loadKeyList(tableName);
        return iids.toArray(new String[] {});
    }

    private GenericRow genRow(long createdTimeStamp, String id, String key, Object value) {
        GenericRow gr = null;
        if (value instanceof Double) {
            gr = new GenericRow(createdTimeStamp, id, key, null, (Double) value, null);
        } else if (value instanceof String) {
            gr = new GenericRow(createdTimeStamp, id, key, null, null, (String) value);
        } else if (value instanceof Integer) {
            gr = new GenericRow(createdTimeStamp, id, key, (Long) value, null, null);
        } else if (value instanceof Long) {
            gr = new GenericRow(createdTimeStamp, id, key, (Long) value, null, null);
        }
        return gr;
    }
View Full Code Here


            boolean added = false;
            String key = it.next();
            Object value = map.get(key);
            if (value == null)
                continue;
            GenericRow gr = null;
            long createdTimeStamp = System.currentTimeMillis();
            if (value instanceof Object[]) {
                // generate individual generic rows for all entries of this
                // array.
                Object[] array = (Object[]) value;
                int totalLength = array.length;
                for (int i = 0; i < totalLength; i++) {
                    String fieldName = "[" + key + ";" + i + ";" + totalLength;
                    GenericRow temp = genRow(createdTimeStamp, t.getId(), fieldName, array[i]);
                    ret.add(temp);
                    added = true;
                }
            } else
                gr = genRow(createdTimeStamp, t.getId(), key, value);
View Full Code Here

TOP

Related Classes of com.activequant.domainmodel.GenericRow

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.