// Path: src/test/java/com/github/arteam/jdit/domain/entity/Player.java
// public class Player {
// 
//     public final Optional<Long> id;
//     public final String firstName;
//     public final String lastName;
//     public final Date birthDate;
//     public final Optional<Integer> height;
//     public final Optional<Integer> weight;
// 
//     public Player(Optional<Long> id, String firstName, String lastName, Date birthDate,
//                   Optional<Integer> height, Optional<Integer> weight) {
//         this.id = id;
//         this.firstName = firstName;
//         this.lastName = lastName;
//         this.birthDate = birthDate;
//         this.height = height;
//         this.weight = weight;
//     }
// 
//     public Player(String firstName, String lastName, Date birthDate, int height, int weight) {
//         this(Optional.<Long>empty(), firstName, lastName, birthDate, Optional.of(height), Optional.of(weight));
//     }
// 
//     @Override
//     public String toString() {
//         return MoreObjects.toStringHelper(this)
//                 .omitNullValues()
//                 .add("id", id.orElse(null))
//                 .add("firstName", firstName)
//                 .add("lastName", lastName)
//                 .add("birthDate", birthDate)
//                 .add("height", height.orElse(null))
//                 .add("weight", weight.orElse(null))
//                 .toString();
//     }
// }


import com.github.arteam.jdit.domain.entity.Player;
import org.jdbi.v3.core.mapper.RowMapper;
import org.jdbi.v3.core.statement.StatementContext;
import org.jdbi.v3.sqlobject.config.RegisterRowMapper;
import org.jdbi.v3.sqlobject.customizer.Bind;
import org.jdbi.v3.sqlobject.customizer.Define;
import org.jdbi.v3.sqlobject.statement.SqlQuery;
import org.jdbi.v3.stringtemplate4.UseStringTemplateSqlLocator;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Optional;
package com.github.arteam.jdit.domain;



/**
 * Date: 1/25/15
 * Time: 11:26 PM
 *
 * @author Artem Prigoda
 */
@RegisterRowMapper(AdvancedPlayerSqlObject.PlayerMapper.class)
@UseStringTemplateSqlLocator
public interface AdvancedPlayerSqlObject {

    @SqlQuery
// Path: src/test/java/com/github/arteam/jdit/domain/entity/Player.java
// public class Player {
// 
//     public final Optional<Long> id;
//     public final String firstName;
//     public final String lastName;
//     public final Date birthDate;
//     public final Optional<Integer> height;
//     public final Optional<Integer> weight;
// 
//     public Player(Optional<Long> id, String firstName, String lastName, Date birthDate,
//                   Optional<Integer> height, Optional<Integer> weight) {
//         this.id = id;
//         this.firstName = firstName;
//         this.lastName = lastName;
//         this.birthDate = birthDate;
//         this.height = height;
//         this.weight = weight;
//     }
// 
//     public Player(String firstName, String lastName, Date birthDate, int height, int weight) {
//         this(Optional.<Long>empty(), firstName, lastName, birthDate, Optional.of(height), Optional.of(weight));
//     }
// 
//     @Override
//     public String toString() {
//         return MoreObjects.toStringHelper(this)
//                 .omitNullValues()
//                 .add("id", id.orElse(null))
//                 .add("firstName", firstName)
//                 .add("lastName", lastName)
//                 .add("birthDate", birthDate)
//                 .add("height", height.orElse(null))
//                 .add("weight", weight.orElse(null))
//                 .toString();
//     }
// }


// Path: src/test/java/com/github/arteam/jdit/domain/AdvancedPlayerSqlObject.java
import com.github.arteam.jdit.domain.entity.Player;
import org.jdbi.v3.core.mapper.RowMapper;
import org.jdbi.v3.core.statement.StatementContext;
import org.jdbi.v3.sqlobject.config.RegisterRowMapper;
import org.jdbi.v3.sqlobject.customizer.Bind;
import org.jdbi.v3.sqlobject.customizer.Define;
import org.jdbi.v3.sqlobject.statement.SqlQuery;
import org.jdbi.v3.stringtemplate4.UseStringTemplateSqlLocator;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Optional;

package com.github.arteam.jdit.domain;



/**
 * Date: 1/25/15
 * Time: 11:26 PM
 *
 * @author Artem Prigoda
 */
@RegisterRowMapper(AdvancedPlayerSqlObject.PlayerMapper.class)
@UseStringTemplateSqlLocator
public interface AdvancedPlayerSqlObject {

    @SqlQuery
    List<Player> getPlayers(@Define("isFirstName") boolean isFirstName, @Bind("firstName") String firstName,