All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sjr.sql.rsloader.Java8RsLoader Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package net.sjr.sql.rsloader;

import net.sjr.converterutils.Java8ConverterUtils;
import net.sjr.sql.DAOBase;
import net.sjr.sql.DBColumn;
import net.sjr.sql.DBEnum;
import net.sjr.sql.DBObject;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.ResultSet;
import java.sql.Time;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.function.Consumer;
import java.util.function.Supplier;

/**
 * Created by Jan Reichl on 18.08.17.
 */
@SuppressWarnings({"unused", "WeakerAccess"})
public class Java8RsLoader extends RsLoader {

	@Override
	public Java8RsLoader skip() {
		return (Java8RsLoader) super.skip();
	}

	@Override
	public Java8RsLoader skip(final int steps) {
		return (Java8RsLoader) super.skip(steps);
	}

	public  Java8RsLoader skip(Supplier getter, Consumer setter) {
		setter.accept(getter.get());
		return skip();
	}

	public  Java8RsLoader skip(Supplier getter, Consumer setter, final int steps) {
		setter.accept(getter.get());
		return skip(steps);
	}

	public Java8RsLoader(final ResultSet rs, final DBObject... loadedObjects) {
		super(rs, loadedObjects);
	}

	public Java8RsLoader nextString(Consumer setter) {
		setter.accept(nextString());
		return this;
	}

	public Java8RsLoader nextBoolean(Consumer setter) {
		setter.accept(nextBoolean());
		return this;
	}

	public Java8RsLoader nextNullBoolean(Consumer setter) {
		setter.accept(nextBoolean());
		return this;
	}

	public Java8RsLoader nextByte(Consumer setter) {
		setter.accept(nextByte());
		return this;
	}

	public Java8RsLoader nextNullByte(Consumer setter) {
		setter.accept(nextByte());
		return this;
	}

	public Java8RsLoader nextShort(Consumer setter) {
		setter.accept(nextShort());
		return this;
	}

	public Java8RsLoader nextNullShort(Consumer setter) {
		setter.accept(nextShort());
		return this;
	}

	public Java8RsLoader nextInt(Consumer setter) {
		setter.accept(nextInt());
		return this;
	}

	public Java8RsLoader nextNullInt(Consumer setter) {
		setter.accept(nextInt());
		return this;
	}

	public Java8RsLoader nextLong(Consumer setter) {
		setter.accept(nextLong());
		return this;
	}

	public Java8RsLoader nextNullLong(Consumer setter) {
		setter.accept(nextLong());
		return this;
	}

	public Java8RsLoader nextFloat(Consumer setter) {
		setter.accept(nextFloat());
		return this;
	}

	public Java8RsLoader nextNullFloat(Consumer setter) {
		setter.accept(nextFloat());
		return this;
	}

	public Java8RsLoader nextDouble(Consumer setter) {
		setter.accept(nextDouble());
		return this;
	}

	public Java8RsLoader nextNullDouble(Consumer setter) {
		setter.accept(nextDouble());
		return this;
	}

	public Java8RsLoader nextBigDecimal(Consumer setter) {
		setter.accept(nextBigDecimal());
		return this;
	}

	public Java8RsLoader nextDate(Consumer setter) {
		setter.accept(nextDate());
		return this;
	}

	public Java8RsLoader nextTime(Consumer




© 2015 - 2024 Weber Informatics LLC | Privacy Policy