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

com.netflix.spinnaker.keel.persistence.metamodel.tables.ResourceVersion Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
/*
 * This file is generated by jOOQ.
 */
package com.netflix.spinnaker.keel.persistence.metamodel.tables;


import com.netflix.spinnaker.jooq.LocalDateTimeToInstantConverter;
import com.netflix.spinnaker.keel.persistence.metamodel.Keel;
import com.netflix.spinnaker.keel.persistence.metamodel.Keys;
import com.netflix.spinnaker.keel.persistence.metamodel.tables.records.ResourceVersionRecord;

import java.time.Instant;
import java.util.Arrays;
import java.util.List;

import javax.annotation.processing.Generated;

import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Row4;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.TableImpl;


/**
 * This class is generated by jOOQ.
 */
@Generated(
    value = {
        "https://www.jooq.org",
        "jOOQ version:3.13.6"
    },
    comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ResourceVersion extends TableImpl {

    private static final long serialVersionUID = 1725158520;

    /**
     * The reference instance of keel.resource_version
     */
    public static final ResourceVersion RESOURCE_VERSION = new ResourceVersion();

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

    /**
     * The column keel.resource_version.resource_uid.
     */
    public final TableField RESOURCE_UID = createField(DSL.name("resource_uid"), org.jooq.impl.SQLDataType.CHAR(26).nullable(false), this, "");

    /**
     * The column keel.resource_version.version.
     */
    public final TableField VERSION = createField(DSL.name("version"), org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1", org.jooq.impl.SQLDataType.INTEGER)), this, "");

    /**
     * The column keel.resource_version.created_at.
     */
    public final TableField CREATED_AT = createField(DSL.name("created_at"), org.jooq.impl.SQLDataType.LOCALDATETIME, this, "", new LocalDateTimeToInstantConverter());

    /**
     * The column keel.resource_version.spec.
     */
    public final TableField SPEC = createField(DSL.name("spec"), org.jooq.impl.SQLDataType.LONGVARCHAR.nullable(false), this, "");

    /**
     * Create a keel.resource_version table reference
     */
    public ResourceVersion() {
        this(DSL.name("resource_version"), null);
    }

    /**
     * Create an aliased keel.resource_version table reference
     */
    public ResourceVersion(String alias) {
        this(DSL.name(alias), RESOURCE_VERSION);
    }

    /**
     * Create an aliased keel.resource_version table reference
     */
    public ResourceVersion(Name alias) {
        this(alias, RESOURCE_VERSION);
    }

    private ResourceVersion(Name alias, Table aliased) {
        this(alias, aliased, null);
    }

    private ResourceVersion(Name alias, Table aliased, Field[] parameters) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
    }

    public  ResourceVersion(Table child, ForeignKey key) {
        super(child, key, RESOURCE_VERSION);
    }

    @Override
    public Schema getSchema() {
        return Keel.KEEL;
    }

    @Override
    public UniqueKey getPrimaryKey() {
        return Keys.KEY_RESOURCE_VERSION_PRIMARY;
    }

    @Override
    public List> getKeys() {
        return Arrays.>asList(Keys.KEY_RESOURCE_VERSION_PRIMARY);
    }

    @Override
    public List> getReferences() {
        return Arrays.>asList(Keys.FK_RESOURCE_VERSION_RESOURCE);
    }

    public Resource resource() {
        return new Resource(this, Keys.FK_RESOURCE_VERSION_RESOURCE);
    }

    @Override
    public ResourceVersion as(String alias) {
        return new ResourceVersion(DSL.name(alias), this);
    }

    @Override
    public ResourceVersion as(Name alias) {
        return new ResourceVersion(alias, this);
    }

    /**
     * Rename this table
     */
    @Override
    public ResourceVersion rename(String name) {
        return new ResourceVersion(DSL.name(name), null);
    }

    /**
     * Rename this table
     */
    @Override
    public ResourceVersion rename(Name name) {
        return new ResourceVersion(name, null);
    }

    // -------------------------------------------------------------------------
    // Row4 type methods
    // -------------------------------------------------------------------------

    @Override
    public Row4 fieldsRow() {
        return (Row4) super.fieldsRow();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy