Examples of MarginRate


Examples of org.td.common.beans.MarginRate

    public MarginRate getMarginRateByBrokerId(final Integer brokerId) {

        ParameterizedRowMapper<MarginRate> mapper = new ParameterizedRowMapper<MarginRate>() {
            public MarginRate mapRow(ResultSet rs, int rowNum) throws SQLException {
                MarginRate marginRate = new MarginRate();
//                marginRate.setBrokerId(rs.getObject("broker_id") == null ? null
//                        : (Integer) rs.getObject("broker_id"));
//                marginRate.setShortMargin(rs.getObject("short") == null ? null
//                        : (Double) rs.getObject("short"));
//                marginRate.setLongMargin(rs.getObject("long") == null ? null
//                        : (Double) rs.getObject("long"));
               
                marginRate.setBrokerId(brokerId);
                marginRate.setShortRate(rs.getDouble("short_rate"));
                marginRate.setLongRate(rs.getDouble("long_rate"));
                return marginRate;
            }
        };

        return getSimpleJdbcTemplate().queryForObject(MARGIN_RATE_SQL, mapper,
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.