# ProcessSpecItemHistoryRowMapper.java

    package com.mycim.server.spec.dao.mapper;

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.framework.utils.lang.StringUtils;
    import com.mycim.valueobject.prp.ProcessSpecItemHistory;

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

    public class ProcessSpecItemHistoryRowMapper implements RowMapper<ProcessSpecItemHistory> {

        private ProcessSpecItemHistory processSpecItemHistory;

        @Override
        public ProcessSpecItemHistory mapRow(ResultSet rs, int rowNum) throws SQLException {
            processSpecItemHistory = new ProcessSpecItemHistory();

            processSpecItemHistory.setTransRrn(rs.getLong("TRANS_RRN"));
            processSpecItemHistory.setTransId(rs.getString("TRANS_ID"));
            processSpecItemHistory.setTransSequence(rs.getInt("TRANS_SEQUENCE"));
            processSpecItemHistory.setSubTransId(rs.getString("SUB_TRANS_ID"));
            processSpecItemHistory.setTransTimestamp(rs.getTimestamp("TRANS_TIMESTAMP"));
            processSpecItemHistory.setTransPerformedBy(rs.getString("TRANS_PERFORMED_BY"));

            processSpecItemHistory.setProcessRrn(rs.getLong("PROCESS_RRN"));
            processSpecItemHistory.setProcessId(rs.getString("PROCESS_ID"));
            processSpecItemHistory.setProcessVersion(rs.getInt("PROCESS_VERSION"));

            processSpecItemHistory.setRouteRrn(rs.getLong("ROUTE_RRN"));
            processSpecItemHistory.setRouteId(rs.getString("ROUTE_ID"));
            processSpecItemHistory.setRouteVersion(rs.getInt("ROUTE_VERSION"));
            processSpecItemHistory.setRouteSeq(rs.getString("ROUTE_SEQ"));

            processSpecItemHistory.setOperationRrn(rs.getLong("OPERATION_RRN"));
            processSpecItemHistory.setOperationId(rs.getString("OPERATION_ID"));
            processSpecItemHistory.setOperationDesc(rs.getString("OPERATION_DESC"));
            processSpecItemHistory.setOperationType(rs.getString("OPERATION_TYPE"));
            processSpecItemHistory.setOperationSeq(rs.getString("OPERATION_SEQ"));

            processSpecItemHistory.setFlowSeq(rs.getString("FLOW_SEQ"));

            processSpecItemHistory.setWorkArea(rs.getString("WORK_AREA"));
            processSpecItemHistory.setStageId(rs.getString("STAGE_ID"));

            processSpecItemHistory.setRecipeRrn(rs.getLong("RECIPE_RRN"));
            processSpecItemHistory.setRecipeId(rs.getString("RECIPE_ID"));

            processSpecItemHistory.setReticleFamilyRrn(rs.getLong("RETICLE_FAMILY_RRN"));
            processSpecItemHistory.setReticleFamilyId(rs.getString("RETICLE_FAMILY_ID"));

            processSpecItemHistory.setParameterSetRrn(rs.getLong("PARAMETER_SET_RRN"));
            processSpecItemHistory.setParameterSetId(rs.getString("PARAMETER_SET_ID"));

            processSpecItemHistory.setEquipmentGroupRrn(rs.getLong("EQUIPMENT_GROUP_RRN"));
            processSpecItemHistory.setEquipmentGroupId(rs.getString("EQUIPMENT_GROUP_ID"));

            processSpecItemHistory.setPollutionLevel(rs.getString("POLLUTION_LEVEL"));
            processSpecItemHistory.setProcessLocation(rs.getString("PROCESS_LOCATION"));
            processSpecItemHistory.setBankFlag(rs.getString("BANK_FLAG"));
            processSpecItemHistory.setFlipType(rs.getString("FLIP_TYPE"));
            processSpecItemHistory.setCpDefine(rs.getString("CP_DEFINE"));

            processSpecItemHistory.setEcnRrn(rs.getLong("ECN_RRN"));
            processSpecItemHistory.setStatus(rs.getString("STATUS"));
            processSpecItemHistory.setEffectiveTime(rs.getTimestamp("EFFECTIVE_TIME"));
            processSpecItemHistory.setTerminatedTime(rs.getTimestamp("TERMINATED_TIME"));
            processSpecItemHistory.setCreatedUser(rs.getString("CREATED_USER"));
            processSpecItemHistory.setCreatedTime(rs.getTimestamp("CREATED_TIME"));
            processSpecItemHistory.setUpdatedUser(rs.getString("UPDATED_USER"));
            processSpecItemHistory.setUpdatedTime(rs.getTimestamp("UPDATED_TIME"));
            processSpecItemHistory.setIsUpdateFlag(StringUtils.split(rs.getString("IS_UPDATE_FLAGS"), ";"));
            return processSpecItemHistory;
        }

    }