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

com.netflix.spinnaker.keel.persistence.metamodel.tables.ActiveResource 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.keel.persistence.metamodel.Keel;
import com.netflix.spinnaker.keel.persistence.metamodel.tables.records.ActiveResourceRecord;

import javax.annotation.processing.Generated;

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


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

    private static final long serialVersionUID = -1973747120;

    /**
     * The reference instance of keel.active_resource
     */
    public static final ActiveResource ACTIVE_RESOURCE = new ActiveResource();

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

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

    /**
     * The column keel.active_resource.id.
     */
    public final TableField ID = createField(DSL.name("id"), org.jooq.impl.SQLDataType.VARCHAR(255), this, "");

    /**
     * The column keel.active_resource.application.
     */
    public final TableField APPLICATION = createField(DSL.name("application"), org.jooq.impl.SQLDataType.VARCHAR(255).nullable(false), this, "");

    /**
     * The column keel.active_resource.kind.
     */
    public final TableField KIND = createField(DSL.name("kind"), org.jooq.impl.SQLDataType.VARCHAR(255).nullable(false), this, "");

    /**
     * The column keel.active_resource.metadata.
     */
    public final TableField METADATA = createField(DSL.name("metadata"), org.jooq.impl.SQLDataType.LONGVARCHAR, this, "");

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

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

    /**
     * Create an aliased keel.active_resource table reference
     */
    public ActiveResource(String alias) {
        this(DSL.name(alias), ACTIVE_RESOURCE);
    }

    /**
     * Create an aliased keel.active_resource table reference
     */
    public ActiveResource(Name alias) {
        this(alias, ACTIVE_RESOURCE);
    }

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

    private ActiveResource(Name alias, Table aliased, Field[] parameters) {
        super(alias, null, aliased, parameters, DSL.comment("VIEW"), TableOptions.view("create view `active_resource` as select `keel`.`resource`.`uid` AS `uid`,`keel`.`resource`.`id` AS `id`,`keel`.`resource`.`application` AS `application`,`keel`.`resource`.`kind` AS `kind`,json_object('uid',`keel`.`resource`.`uid`,'id',`keel`.`resource`.`id`,'version',`keel`.`resource_version`.`version`,'application',`keel`.`resource`.`application`,'environment',`active_environment`.`uid`,'environmentName',`active_environment`.`name`,'deliveryConfig',`keel`.`delivery_config`.`uid`,'serviceAccount',`keel`.`delivery_config`.`service_account`) AS `metadata`,`keel`.`resource_version`.`spec` AS `spec` from ((((`keel`.`resource` join `keel`.`resource_version` on((`keel`.`resource`.`uid` = `keel`.`resource_version`.`resource_uid`))) join `keel`.`environment_resource` on(((`keel`.`resource`.`uid` = `keel`.`environment_resource`.`resource_uid`) and (`keel`.`resource_version`.`version` = `keel`.`environment_resource`.`resource_version`)))) join `keel`.`active_environment` on(((`active_environment`.`uid` = `keel`.`environment_resource`.`environment_uid`) and (`active_environment`.`version` = `keel`.`environment_resource`.`environment_version`)))) join `keel`.`delivery_config` on((`keel`.`delivery_config`.`uid` = `active_environment`.`delivery_config_uid`)))"));
    }

    public  ActiveResource(Table child, ForeignKey key) {
        super(child, key, ACTIVE_RESOURCE);
    }

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

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

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

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

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

    // -------------------------------------------------------------------------
    // Row6 type methods
    // -------------------------------------------------------------------------

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy