/**
* 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.enums.MpaaRating;
import org.jooq.example.chart.db.tables.records.FilmRecord;
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 Film extends TableImpl<FilmRecord> {
private static final long serialVersionUID = 719968935;
/**
* The reference instance of <code>public.film</code>
*/
public static final Film FILM = new Film();
/**
* The class holding records for this type
*/
@Override
public Class<FilmRecord> getRecordType() {
return FilmRecord.class;
}
/**
* The column <code>public.film.film_id</code>.
*/
public final TableField<FilmRecord, Integer> FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaultValue(org.jooq.impl.DSL.field("nextval('film_film_id_seq'::regclass)", org.jooq.impl.SQLDataType.INTEGER)), this, "");
/**
* The column <code>public.film.title</code>.
*/
public final TableField<FilmRecord, String> TITLE = createField("title", org.jooq.impl.SQLDataType.VARCHAR.length(255).nullable(false), this, "");
/**
* The column <code>public.film.description</code>.
*/
public final TableField<FilmRecord, String> DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.CLOB, this, "");
/**
* The column <code>public.film.release_year</code>.
*/
public final TableField<FilmRecord, Integer> RELEASE_YEAR = createField("release_year", org.jooq.impl.SQLDataType.INTEGER, this, "");
/**
* The column <code>public.film.language_id</code>.
*/
public final TableField<FilmRecord, Integer> LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>public.film.original_language_id</code>.
*/
public final TableField<FilmRecord, Integer> ORIGINAL_LANGUAGE_ID = createField("original_language_id", org.jooq.impl.SQLDataType.INTEGER, this, "");
/**
* The column <code>public.film.rental_duration</code>.
*/
public final TableField<FilmRecord, Integer> RENTAL_DURATION = createField("rental_duration", org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaultValue(org.jooq.impl.DSL.field("3", org.jooq.impl.SQLDataType.INTEGER)), this, "");
/**
* The column <code>public.film.rental_rate</code>.
*/
public final TableField<FilmRecord, BigDecimal> RENTAL_RATE = createField("rental_rate", org.jooq.impl.SQLDataType.NUMERIC.precision(4, 2).nullable(false).defaultValue(org.jooq.impl.DSL.field("4.99", org.jooq.impl.SQLDataType.NUMERIC)), this, "");
/**
* The column <code>public.film.length</code>.
*/
public final TableField<FilmRecord, Integer> LENGTH = createField("length", org.jooq.impl.SQLDataType.INTEGER, this, "");
/**
* The column <code>public.film.replacement_cost</code>.
*/
public final TableField<FilmRecord, BigDecimal> REPLACEMENT_COST = createField("replacement_cost", org.jooq.impl.SQLDataType.NUMERIC.precision(5, 2).nullable(false).defaultValue(org.jooq.impl.DSL.field("19.99", org.jooq.impl.SQLDataType.NUMERIC)), this, "");
/**
* The column <code>public.film.rating</code>.
*/
public final TableField<FilmRecord, MpaaRating> RATING = createField("rating", org.jooq.util.postgres.PostgresDataType.VARCHAR.asEnumDataType(org.jooq.example.chart.db.enums.MpaaRating.class), this, "");
/**
* The column <code>public.film.last_update</code>.
*/
public final TableField<FilmRecord, Timestamp> LAST_UPDATE = createField("last_update", org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, "");
/**
* The column <code>public.film.special_features</code>.
*/
public final TableField<FilmRecord, String[]> SPECIAL_FEATURES = createField("special_features", org.jooq.impl.SQLDataType.CLOB.getArrayDataType(), this, "");
/**
* The column <code>public.film.fulltext</code>.
*/
public final TableField<FilmRecord, Object> FULLTEXT = createField("fulltext", org.jooq.impl.DefaultDataType.getDefaultDataType("tsvector"), this, "");
/**
* Create a <code>public.film</code> table reference
*/
public Film() {
this("film", null);
}
/**
* Create an aliased <code>public.film</code> table reference
*/
public Film(String alias) {
this(alias, FILM);
}
private Film(String alias, Table<FilmRecord> aliased) {
this(alias, aliased, null);
}
private Film(String alias, Table<FilmRecord> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public Schema getSchema() {
return Public.PUBLIC;
}
/**
* {@inheritDoc}
*/
@Override
public Identity<FilmRecord, Integer> getIdentity() {
return Keys.IDENTITY_FILM;
}
/**
* {@inheritDoc}
*/
@Override
public UniqueKey<FilmRecord> getPrimaryKey() {
return Keys.FILM_PKEY;
}
/**
* {@inheritDoc}
*/
@Override
public List<UniqueKey<FilmRecord>> getKeys() {
return Arrays.<UniqueKey<FilmRecord>>asList(Keys.FILM_PKEY);
}
/**
* {@inheritDoc}
*/
@Override
public List<ForeignKey<FilmRecord, ?>> getReferences() {
return Arrays.<ForeignKey<FilmRecord, ?>>asList(Keys.FILM__FILM_LANGUAGE_ID_FKEY, Keys.FILM__FILM_ORIGINAL_LANGUAGE_ID_FKEY);
}
/**
* {@inheritDoc}
*/
@Override
public Film as(String alias) {
return new Film(alias, this);
}
/**
* Rename this table
*/
public Film rename(String name) {
return new Film(name, null);
}
}