// Path: src/main/java/com/github/mjdbc/DbMapper.java
// public interface DbMapper<T> {
// 
//     /**
//      * Maps a single row or all rows to the corresponding Java object.
//      * May return null for nullable primitive type fields (like nullable varchar field).
//      * Must never return null for complex java property objects (beans).
//      *
//      * @param r - open result set.
//      * @return Java object.
//      * @throws SQLException if SQLException occurs during the mapping process
//      */
//     T map(@NotNull ResultSet r) throws SQLException;
// }


import com.github.mjdbc.DbMapper;
import com.github.mjdbc.Mapper;
import java.sql.Timestamp;
import java.util.Objects;
package com.github.mjdbc.test.asset.model;




/**
 * Sample class for user record in DB.
 * Fields are public because it's hard to find a reason to write both getters and setters.
 * Note: 'mjdbc' will work with getters too.
 */
public final class User {
    /**
     * It is recommended to have type safe IDs.
     */
    public UserId id;
    public String login;
    public String firstName;
    public String lastName;
    public Gender gender;
    public long score;
    public Timestamp registrationDate;

    /**
     * Class to create User object from result set.
     */
    @Mapper
// Path: src/main/java/com/github/mjdbc/DbMapper.java
// public interface DbMapper<T> {
// 
//     /**
//      * Maps a single row or all rows to the corresponding Java object.
//      * May return null for nullable primitive type fields (like nullable varchar field).
//      * Must never return null for complex java property objects (beans).
//      *
//      * @param r - open result set.
//      * @return Java object.
//      * @throws SQLException if SQLException occurs during the mapping process
//      */
//     T map(@NotNull ResultSet r) throws SQLException;
// }


// Path: src/test/java/com/github/mjdbc/test/asset/model/User.java
import com.github.mjdbc.DbMapper;
import com.github.mjdbc.Mapper;
import java.sql.Timestamp;
import java.util.Objects;

package com.github.mjdbc.test.asset.model;




/**
 * Sample class for user record in DB.
 * Fields are public because it's hard to find a reason to write both getters and setters.
 * Note: 'mjdbc' will work with getters too.
 */
public final class User {
    /**
     * It is recommended to have type safe IDs.
     */
    public UserId id;
    public String login;
    public String firstName;
    public String lastName;
    public Gender gender;
    public long score;
    public Timestamp registrationDate;

    /**
     * Class to create User object from result set.
     */
    @Mapper
    public static final DbMapper<User> MAPPER = (r) -> {