net.freechoice.model.orm.IMapper.java Source code

Java tutorial

Introduction

Here is the source code for net.freechoice.model.orm.IMapper.java

Source

/*******************************************************************************
 * Copyright (c) 2013 BowenCai.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     BowenCai - initial API and implementation
 ******************************************************************************/
package net.freechoice.model.orm;

import net.freechoice.model.FC_Model;

import org.springframework.jdbc.core.PreparedStatementCreator;
import org.springframework.jdbc.core.RowMapper;

/**
 * Base class of all mappers
 * 
 * @author BowenCai
 *
 * @param <T>
 */
public interface IMapper<T extends FC_Model> extends RowMapper<T> {

    public static final String[] RET_ID = { "id" };

    public PreparedStatementCreator createUpdate(final T entity);

    public PreparedStatementCreator createInsert(final T entity);
}