com.kenshoo.jooq.TuplesTempTable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence-layer Show documentation
Show all versions of persistence-layer Show documentation
A Java persistence layer based on JOOQ for high performance and business flow support.
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.TableImpl;
import java.util.ArrayList;
import java.util.Collection;
public class TuplesTempTable extends TableImpl {
public final Collection> fields = new ArrayList<>();
public TuplesTempTable() {
super("tmp_ids");
}
public TableField addField(String name, DataType dataType) {
TableField field = super.createField(name, dataType);
fields.add(field);
return field;
}
@Override
public UniqueKey getPrimaryKey() {
return new PrimaryKey().getPK();
}
private class PrimaryKey extends AbstractKeys {
@SuppressWarnings("unchecked")
UniqueKey getPK() {
return createUniqueKey(TuplesTempTable.this, fields.toArray(new TableField[fields.size()]));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy