com.phideltcmu.recruiter.server.dao.mapper.StatZeroSetExtractor.java Source code

Java tutorial

Introduction

Here is the source code for com.phideltcmu.recruiter.server.dao.mapper.StatZeroSetExtractor.java

Source

/*
 * Copyright (c) 2013 Mathew Gray.
 * This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
 */

package com.phideltcmu.recruiter.server.dao.mapper;

import com.phideltcmu.recruiter.shared.model.InternalUserStat;
import org.springframework.jdbc.core.ResultSetExtractor;

import java.sql.ResultSet;
import java.sql.SQLException;

public class StatZeroSetExtractor implements ResultSetExtractor {

    @Override
    public Object extractData(ResultSet rs) throws SQLException {
        InternalUserStat internalUserStat = new InternalUserStat();
        internalUserStat.setInternalID(rs.getInt("id"));
        internalUserStat.setUniqueAdditions(0);
        return internalUserStat;
    }
}