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

com.kenshoo.jooq.IdsTempTable Maven / Gradle / Ivy

Go to download

A Java persistence layer based on JOOQ for high performance and business flow support.

There is a newer version: 0.1.121-jooq-3.16.3
Show newest version
package com.kenshoo.jooq;

import org.jooq.DataType;
import org.jooq.Record;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.AbstractKeys;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;

public class IdsTempTable extends TableImpl {
    public static final IdsTempTable INT_TABLE = new IdsTempTable<>(SQLDataType.INTEGER);
    public static final IdsTempTable LONG_TABLE = new IdsTempTable<>(SQLDataType.BIGINT);
    public static final IdsTempTable STRING_TABLE = new IdsTempTable<>(SQLDataType.VARCHAR.length(255));

    public final TableField id;

    public IdsTempTable(DataType idType) {
        super("tmp_ids");
        id = createField("id", idType, this);
    }

    public IdsTempTable(String alias, IdsTempTable aliased) {
        super(alias, null, aliased);
        id = createField("id", aliased.id.getDataType(), this);
    }

    public IdsTempTable as(String alias) {
        return new IdsTempTable<>(alias, this);
    }

    @Override
    public UniqueKey getPrimaryKey() {
        return new PrimaryKey().getPK();
    }

    private class PrimaryKey extends AbstractKeys {
        @SuppressWarnings("unchecked")
        UniqueKey getPK() {
            return createUniqueKey(IdsTempTable.this, id);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy