/**
* This class is generated by jOOQ
*/
package org.jooq.example.chart.db.tables;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.example.chart.db.Keys;
import org.jooq.example.chart.db.Public;
import org.jooq.example.chart.db.tables.records.PaymentRecord;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.0",
"schema version:public_2",
},
date = "2016-06-30T15:44:15.143Z",
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Payment extends TableImpl<PaymentRecord> {
private static final long serialVersionUID = 3649842;
/**
* The reference instance of <code>public.payment</code>
*/
public static final Payment PAYMENT = new Payment();
/**
* The class holding records for this type
*/
@Override
public Class<PaymentRecord> getRecordType() {
return PaymentRecord.class;
}
/**
* The column <code>public.payment.payment_id</code>.
*/
public final TableField<PaymentRecord, Integer> PAYMENT_ID = createField("payment_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaultValue(org.jooq.impl.DSL.field("nextval('payment_payment_id_seq'::regclass)", org.jooq.impl.SQLDataType.INTEGER)), this, "");
/**
* The column <code>public.payment.customer_id</code>.
*/
public final TableField<PaymentRecord, Integer> CUSTOMER_ID = createField("customer_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>public.payment.staff_id</code>.
*/
public final TableField<PaymentRecord, Integer> STAFF_ID = createField("staff_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>public.payment.rental_id</code>.
*/
public final TableField<PaymentRecord, Integer> RENTAL_ID = createField("rental_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>public.payment.amount</code>.
*/
public final TableField<PaymentRecord, BigDecimal> AMOUNT = createField("amount", org.jooq.impl.SQLDataType.NUMERIC.precision(5, 2).nullable(false), this, "");
/**
* The column <code>public.payment.payment_date</code>.
*/
public final TableField<PaymentRecord, Timestamp> PAYMENT_DATE = createField("payment_date", org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false), this, "");
/**
* Create a <code>public.payment</code> table reference
*/
public Payment() {
this("payment", null);
}
/**
* Create an aliased <code>public.payment</code> table reference
*/
public Payment(String alias) {
this(alias, PAYMENT);
}
private Payment(String alias, Table<PaymentRecord> aliased) {
this(alias, aliased, null);
}
private Payment(String alias, Table<PaymentRecord> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public Schema getSchema() {
return Public.PUBLIC;
}
/**
* {@inheritDoc}
*/
@Override
public Identity<PaymentRecord, Integer> getIdentity() {
return Keys.IDENTITY_PAYMENT;
}
/**
* {@inheritDoc}
*/
@Override
public UniqueKey<PaymentRecord> getPrimaryKey() {
return Keys.PAYMENT_PKEY;
}
/**
* {@inheritDoc}
*/
@Override
public List<UniqueKey<PaymentRecord>> getKeys() {
return Arrays.<UniqueKey<PaymentRecord>>asList(Keys.PAYMENT_PKEY);
}
/**
* {@inheritDoc}
*/
@Override
public List<ForeignKey<PaymentRecord, ?>> getReferences() {
return Arrays.<ForeignKey<PaymentRecord, ?>>asList(Keys.PAYMENT__PAYMENT_CUSTOMER_ID_FKEY, Keys.PAYMENT__PAYMENT_STAFF_ID_FKEY, Keys.PAYMENT__PAYMENT_RENTAL_ID_FKEY);
}
/**
* {@inheritDoc}
*/
@Override
public Payment as(String alias) {
return new Payment(alias, this);
}
/**
* Rename this table
*/
public Payment rename(String name) {
return new Payment(name, null);
}
}