JdbcMapper/test/src/main/java/com/moparisthebest/jdbc/codegen/QmDao.java

94 lines
3.8 KiB
Java

package com.moparisthebest.jdbc.codegen;
import com.moparisthebest.jdbc.dto.*;
import java.sql.SQLException;
@JdbcMapper.Mapper(
cachePreparedStatements = JdbcMapper.OptionalBool.FALSE
, allowReflection = JdbcMapper.OptionalBool.TRUE
)
public interface QmDao extends JdbcMapper {
public static final String personRegular = "SELECT person_no, first_name, last_name, birth_date FROM person WHERE person_no = {personNo}";
public static final String bossRegularAndUnderscore = "SELECT p.person_no, p.first_name AS firstName, p.last_name, p.birth_date, b.department, p.first_name " +
"FROM person p " +
"JOIN boss b ON p.person_no = b.person_no " +
"WHERE p.person_no = {personNo}";
public static final String bossRegularAndUnderscoreReverse = "SELECT p.person_no, p.first_name, p.last_name, p.birth_date, b.department, p.first_name AS firstName " +
"FROM person p " +
"JOIN boss b ON p.person_no = b.person_no " +
"WHERE p.person_no = {personNo}";
public static final String bossRegular = "SELECT p.person_no, p.first_name AS firstName, p.last_name, p.birth_date, b.department " +
"FROM person p " +
"JOIN boss b ON p.person_no = b.person_no " +
"WHERE p.person_no = {personNo}";
public static final String bossUnderscore = "SELECT p.person_no, p.first_name, p.last_name, p.birth_date, b.department " +
"FROM person p " +
"JOIN boss b ON p.person_no = b.person_no " +
"WHERE p.person_no = {personNo}";
@JdbcMapper.SQL(personRegular)
FieldPerson getFieldRegularPerson(long personNo) throws SQLException;
@JdbcMapper.SQL(personRegular)
BuilderPerson getBuilderPerson(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegularAndUnderscore)
FieldBoss getFieldRegularAndUnderscore(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegularAndUnderscoreReverse)
FieldBoss getFieldRegularAndUnderscoreReverse(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegular)
FieldBoss getFieldRegular(long personNo) throws SQLException;
@JdbcMapper.SQL(bossUnderscore)
FieldBoss getFieldUnderscore(long personNo) throws SQLException;
@JdbcMapper.SQL(personRegular)
SetPerson getSetRegularPerson(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegularAndUnderscore)
SetBoss getSetRegularAndUnderscore(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegularAndUnderscoreReverse)
SetBoss getSetRegularAndUnderscoreReverse(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegular)
SetBoss getSetRegular(long personNo) throws SQLException;
@JdbcMapper.SQL(bossUnderscore)
SetBoss getSetUnderscore(long personNo) throws SQLException;
@JdbcMapper.SQL(personRegular)
ReverseFieldPerson getReverseFieldRegularPerson(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegularAndUnderscore)
ReverseFieldBoss getReverseFieldRegularAndUnderscore(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegularAndUnderscoreReverse)
ReverseFieldBoss getReverseFieldRegularAndUnderscoreReverse(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegular)
ReverseFieldBoss getReverseFieldRegular(long personNo) throws SQLException;
@JdbcMapper.SQL(bossUnderscore)
ReverseFieldBoss getReverseFieldUnderscore(long personNo) throws SQLException;
@JdbcMapper.SQL(personRegular)
ReverseSetPerson getReverseSetRegularPerson(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegularAndUnderscore)
ReverseSetBoss getReverseSetRegularAndUnderscore(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegularAndUnderscoreReverse)
ReverseSetBoss getReverseSetRegularAndUnderscoreReverse(long personNo) throws SQLException;
@JdbcMapper.SQL(bossRegular)
ReverseSetBoss getReverseSetRegular(long personNo) throws SQLException;
@JdbcMapper.SQL(bossUnderscore)
ReverseSetBoss getReverseSetUnderscore(long personNo) throws SQLException;
}