com.yourrents.services.geodata.jooq.tables.Address Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of your-rents-services-geodata Show documentation
Show all versions of your-rents-services-geodata Show documentation
Geographical Data services for the YourRents applications
The newest version!
/*
* This file is generated by jOOQ.
*/
package com.yourrents.services.geodata.jooq.tables;
/*-
* #%L
* YourRents GeoData Service
* %%
* Copyright (C) 2023 Your Rents Team
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import com.yourrents.services.geodata.jooq.Keys;
import com.yourrents.services.geodata.jooq.YrsGeodata;
import com.yourrents.services.geodata.jooq.tables.records.AddressRecord;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.function.Function;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Function11;
import org.jooq.Identity;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Records;
import org.jooq.Row11;
import org.jooq.Schema;
import org.jooq.SelectField;
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.SQLDataType;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Address extends TableImpl {
private static final long serialVersionUID = 1L;
/**
* The reference instance of yrs_geodata.address
*/
public static final Address ADDRESS = new Address();
/**
* The class holding records for this type
*/
@Override
public Class getRecordType() {
return AddressRecord.class;
}
/**
* The column yrs_geodata.address.id
.
*/
public final TableField ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
/**
* The column yrs_geodata.address.address_line_1
.
*/
public final TableField ADDRESS_LINE_1 = createField(DSL.name("address_line_1"), SQLDataType.CLOB.nullable(false), this, "");
/**
* The column yrs_geodata.address.address_line_2
.
*/
public final TableField ADDRESS_LINE_2 = createField(DSL.name("address_line_2"), SQLDataType.CLOB, this, "");
/**
* The column yrs_geodata.address.postal_code
.
*/
public final TableField POSTAL_CODE = createField(DSL.name("postal_code"), SQLDataType.VARCHAR(20), this, "");
/**
* The column yrs_geodata.address.city_external_id
.
*/
public final TableField CITY_EXTERNAL_ID = createField(DSL.name("city_external_id"), SQLDataType.UUID, this, "");
/**
* The column yrs_geodata.address.city
.
*/
public final TableField CITY = createField(DSL.name("city"), SQLDataType.VARCHAR(256), this, "");
/**
* The column yrs_geodata.address.province_external_id
.
*/
public final TableField PROVINCE_EXTERNAL_ID = createField(DSL.name("province_external_id"), SQLDataType.UUID, this, "");
/**
* The column yrs_geodata.address.province
.
*/
public final TableField PROVINCE = createField(DSL.name("province"), SQLDataType.VARCHAR(256), this, "");
/**
* The column yrs_geodata.address.country_external_id
.
*/
public final TableField COUNTRY_EXTERNAL_ID = createField(DSL.name("country_external_id"), SQLDataType.UUID, this, "");
/**
* The column yrs_geodata.address.country
.
*/
public final TableField COUNTRY = createField(DSL.name("country"), SQLDataType.VARCHAR(256), this, "");
/**
* The column yrs_geodata.address.external_id
.
*/
public final TableField EXTERNAL_ID = createField(DSL.name("external_id"), SQLDataType.UUID.nullable(false).defaultValue(DSL.field(DSL.raw("gen_random_uuid()"), SQLDataType.UUID)), this, "");
private Address(Name alias, Table aliased) {
this(alias, aliased, null);
}
private Address(Name alias, Table aliased, Field>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
}
/**
* Create an aliased yrs_geodata.address
table reference
*/
public Address(String alias) {
this(DSL.name(alias), ADDRESS);
}
/**
* Create an aliased yrs_geodata.address
table reference
*/
public Address(Name alias) {
this(alias, ADDRESS);
}
/**
* Create a yrs_geodata.address
table reference
*/
public Address() {
this(DSL.name("address"), null);
}
public Address(Table child, ForeignKey key) {
super(child, key, ADDRESS);
}
@Override
public Schema getSchema() {
return aliased() ? null : YrsGeodata.YRS_GEODATA;
}
@Override
public Identity getIdentity() {
return (Identity) super.getIdentity();
}
@Override
public UniqueKey getPrimaryKey() {
return Keys.ADDRESS_PKEY;
}
@Override
public List> getUniqueKeys() {
return Arrays.asList(Keys.ADDRESS_EXTERNAL_ID_KEY);
}
@Override
public Address as(String alias) {
return new Address(DSL.name(alias), this);
}
@Override
public Address as(Name alias) {
return new Address(alias, this);
}
@Override
public Address as(Table> alias) {
return new Address(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public Address rename(String name) {
return new Address(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public Address rename(Name name) {
return new Address(name, null);
}
/**
* Rename this table
*/
@Override
public Address rename(Table> name) {
return new Address(name.getQualifiedName(), null);
}
// -------------------------------------------------------------------------
// Row11 type methods
// -------------------------------------------------------------------------
@Override
public Row11 fieldsRow() {
return (Row11) super.fieldsRow();
}
/**
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
*/
public SelectField mapping(Function11 super Integer, ? super String, ? super String, ? super String, ? super UUID, ? super String, ? super UUID, ? super String, ? super UUID, ? super String, ? super UUID, ? extends U> from) {
return convertFrom(Records.mapping(from));
}
/**
* Convenience mapping calling {@link SelectField#convertFrom(Class,
* Function)}.
*/
public SelectField mapping(Class toType, Function11 super Integer, ? super String, ? super String, ? super String, ? super UUID, ? super String, ? super UUID, ? super String, ? super UUID, ? super String, ? super UUID, ? extends U> from) {
return convertFrom(toType, Records.mapping(from));
}
}