/**
 * This class is generated by jOOQ
 */
package org.ongawa.peru.chlorination.persistence.db.jooq.tables;


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.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;
import org.ongawa.peru.chlorination.persistence.db.jooq.Keys;
import org.ongawa.peru.chlorination.persistence.db.jooq.Public;
import org.ongawa.peru.chlorination.persistence.db.jooq.tables.records.MeasuringpointRecord;


/**
 * This class is generated by jOOQ.
 */
@Generated(
	value = {
		"http://www.jooq.org",
		"jOOQ version:3.7.2"
	},
	comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Measuringpoint extends TableImpl<MeasuringpointRecord> {

	private static final long serialVersionUID = -248602412;

	/**
	 * The reference instance of <code>PUBLIC.MEASURINGPOINT</code>
	 */
	public static final Measuringpoint MEASURINGPOINT = new Measuringpoint();

	/**
	 * The class holding records for this type
	 */
	@Override
	public Class<MeasuringpointRecord> getRecordType() {
		return MeasuringpointRecord.class;
	}

	/**
	 * The column <code>PUBLIC.MEASURINGPOINT.IDMEASURINGPOINT</code>.
	 */
	public final TableField<MeasuringpointRecord, Integer> IDMEASURINGPOINT = createField("IDMEASURINGPOINT", org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaulted(true), this, "");

	/**
	 * The column <code>PUBLIC.MEASURINGPOINT.WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_IDWATERSYSTEM</code>.
	 */
	public final TableField<MeasuringpointRecord, Integer> WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_IDWATERSYSTEM = createField("WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_IDWATERSYSTEM", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");

	/**
	 * The column <code>PUBLIC.MEASURINGPOINT.WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_COMMUNITY_IDCOMMUNITY</code>.
	 */
	public final TableField<MeasuringpointRecord, Integer> WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_COMMUNITY_IDCOMMUNITY = createField("WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_COMMUNITY_IDCOMMUNITY", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");

	/**
	 * The column <code>PUBLIC.MEASURINGPOINT.WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_COMMUNITY_SUBBASIN_IDSUBBASIN</code>.
	 */
	public final TableField<MeasuringpointRecord, Integer> WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_COMMUNITY_SUBBASIN_IDSUBBASIN = createField("WATERSYSTEM_HAS_WATERSPRING_WATERSYSTEM_COMMUNITY_SUBBASIN_IDSUBBASIN", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");

	/**
	 * The column <code>PUBLIC.MEASURINGPOINT.WATERSYSTEM_HAS_WATERSPRING_WATERSPRING_IDWATERSPRING</code>.
	 */
	public final TableField<MeasuringpointRecord, Integer> WATERSYSTEM_HAS_WATERSPRING_WATERSPRING_IDWATERSPRING = createField("WATERSYSTEM_HAS_WATERSPRING_WATERSPRING_IDWATERSPRING", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");

	/**
	 * The column <code>PUBLIC.MEASURINGPOINT.NAME</code>.
	 */
	public final TableField<MeasuringpointRecord, String> NAME = createField("NAME", org.jooq.impl.SQLDataType.VARCHAR.length(100).nullable(false), this, "");

	/**
	 * Create a <code>PUBLIC.MEASURINGPOINT</code> table reference
	 */
	public Measuringpoint() {
		this("MEASURINGPOINT", null);
	}

	/**
	 * Create an aliased <code>PUBLIC.MEASURINGPOINT</code> table reference
	 */
	public Measuringpoint(String alias) {
		this(alias, MEASURINGPOINT);
	}

	private Measuringpoint(String alias, Table<MeasuringpointRecord> aliased) {
		this(alias, aliased, null);
	}

	private Measuringpoint(String alias, Table<MeasuringpointRecord> aliased, Field<?>[] parameters) {
		super(alias, Public.PUBLIC, aliased, parameters, "");
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Identity<MeasuringpointRecord, Integer> getIdentity() {
		return Keys.IDENTITY_MEASURINGPOINT;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public UniqueKey<MeasuringpointRecord> getPrimaryKey() {
		return Keys.CONSTRAINT_48;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public List<UniqueKey<MeasuringpointRecord>> getKeys() {
		return Arrays.<UniqueKey<MeasuringpointRecord>>asList(Keys.CONSTRAINT_48);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public List<ForeignKey<MeasuringpointRecord, ?>> getReferences() {
		return Arrays.<ForeignKey<MeasuringpointRecord, ?>>asList(Keys.FK_MEASURINGPOINT_WATERSYSTEM_HAS_WATERSPRING1);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Measuringpoint as(String alias) {
		return new Measuringpoint(alias, this);
	}

	/**
	 * Rename this table
	 */
	public Measuringpoint rename(String name) {
		return new Measuringpoint(name, null);
	}
}
