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

org.jooq.codegen.gradle.MetaExtensions Maven / Gradle / Ivy

There is a newer version: 3.19.16
Show newest version
/*
 * 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
 *
 *  https://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.
 *
 * Other licenses:
 * -----------------------------------------------------------------------------
 * Commercial licenses for this work are available. These replace the above
 * Apache-2.0 license and offer limited warranties, support, maintenance, and
 * commercial database integrations.
 *
 * For more information, please visit: https://www.jooq.org/legal/licensing
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
package org.jooq.codegen.gradle;

import java.util.*;
import groovy.lang.*;
import org.gradle.api.*;
import org.gradle.api.model.ObjectFactory;
import org.jooq.meta.jaxb.*;

import javax.inject.Inject;

/**
 * Extensions for the jOOQ-meta types, to enable groovy DSL usage.
 */
public class MetaExtensions {

    static void call(Closure closure, Object delegate) {
        // Explicit Closure support seems to still be needed in Gradle 8.5
        // For GeneratedClosure types (which is what the gradle/groovy implementation does),
        // it seems that the ClosureBackedAction is instantiated with Closure.OWNER_ONLY,
        // which is a weird and undesirable flag value for most DSLs.
        // See: https://github.com/jOOQ/jOOQ/issues/12985#issuecomment-1845084003
        closure = (Closure) closure.clone();
        closure.setResolveStrategy(Closure.DELEGATE_FIRST);
        closure.setDelegate(delegate);

        if (closure.getMaximumNumberOfParameters() == 0)
            closure.call();
        else
            closure.call(delegate);
    }



    public static class ConfigurationExtension extends Configuration {

        final ObjectFactory objects;

        @Inject
        public ConfigurationExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void jdbc(Action action) {
            JdbcExtension o = objects.newInstance(JdbcExtension.class, objects);
            action.execute(o);
            setJdbc(o);
        }

        public void generator(Action action) {
            GeneratorExtension o = objects.newInstance(GeneratorExtension.class, objects);
            action.execute(o);
            setGenerator(o);
        }
    }

    public static class JdbcExtension extends Jdbc {

        final ObjectFactory objects;

        @Inject
        public JdbcExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void properties(Action action) {
            PropertyListExtension l = objects.newInstance(PropertyListExtension.class, objects);
            action.execute(l);
            setProperties(l);
        }
    }

    public static class PropertyExtension extends Property {

        final ObjectFactory objects;

        @Inject
        public PropertyExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class GeneratorExtension extends Generator {

        final ObjectFactory objects;

        @Inject
        public GeneratorExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void strategy(Action action) {
            StrategyExtension o = objects.newInstance(StrategyExtension.class, objects);
            action.execute(o);
            setStrategy(o);
        }

        public void database(Action action) {
            DatabaseExtension o = objects.newInstance(DatabaseExtension.class, objects);
            action.execute(o);
            setDatabase(o);
        }

        public void generate(Action action) {
            GenerateExtension o = objects.newInstance(GenerateExtension.class, objects);
            action.execute(o);
            setGenerate(o);
        }

        public void target(Action action) {
            TargetExtension o = objects.newInstance(TargetExtension.class, objects);
            action.execute(o);
            setTarget(o);
        }
    }

    public static class StrategyExtension extends Strategy {

        final ObjectFactory objects;

        @Inject
        public StrategyExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void matchers(Action action) {
            MatchersExtension o = objects.newInstance(MatchersExtension.class, objects);
            action.execute(o);
            setMatchers(o);
        }
    }

    public static class MatchersExtension extends Matchers {

        final ObjectFactory objects;

        @Inject
        public MatchersExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void catalogs(Action action) {
            MatchersCatalogTypeListExtension l = objects.newInstance(MatchersCatalogTypeListExtension.class, objects);
            action.execute(l);
            setCatalogs(l);
        }

        public void schemas(Action action) {
            MatchersSchemaTypeListExtension l = objects.newInstance(MatchersSchemaTypeListExtension.class, objects);
            action.execute(l);
            setSchemas(l);
        }

        public void tables(Action action) {
            MatchersTableTypeListExtension l = objects.newInstance(MatchersTableTypeListExtension.class, objects);
            action.execute(l);
            setTables(l);
        }

        public void indexes(Action action) {
            MatchersIndexTypeListExtension l = objects.newInstance(MatchersIndexTypeListExtension.class, objects);
            action.execute(l);
            setIndexes(l);
        }

        public void primaryKeys(Action action) {
            MatchersPrimaryKeyTypeListExtension l = objects.newInstance(MatchersPrimaryKeyTypeListExtension.class, objects);
            action.execute(l);
            setPrimaryKeys(l);
        }

        public void uniqueKeys(Action action) {
            MatchersUniqueKeyTypeListExtension l = objects.newInstance(MatchersUniqueKeyTypeListExtension.class, objects);
            action.execute(l);
            setUniqueKeys(l);
        }

        public void foreignKeys(Action action) {
            MatchersForeignKeyTypeListExtension l = objects.newInstance(MatchersForeignKeyTypeListExtension.class, objects);
            action.execute(l);
            setForeignKeys(l);
        }

        public void fields(Action action) {
            MatchersFieldTypeListExtension l = objects.newInstance(MatchersFieldTypeListExtension.class, objects);
            action.execute(l);
            setFields(l);
        }

        public void routines(Action action) {
            MatchersRoutineTypeListExtension l = objects.newInstance(MatchersRoutineTypeListExtension.class, objects);
            action.execute(l);
            setRoutines(l);
        }

        public void sequences(Action action) {
            MatchersSequenceTypeListExtension l = objects.newInstance(MatchersSequenceTypeListExtension.class, objects);
            action.execute(l);
            setSequences(l);
        }

        public void enums(Action action) {
            MatchersEnumTypeListExtension l = objects.newInstance(MatchersEnumTypeListExtension.class, objects);
            action.execute(l);
            setEnums(l);
        }

        public void embeddables(Action action) {
            MatchersEmbeddableTypeListExtension l = objects.newInstance(MatchersEmbeddableTypeListExtension.class, objects);
            action.execute(l);
            setEmbeddables(l);
        }

        public void udts(Action action) {
            MatchersUDTTypeListExtension l = objects.newInstance(MatchersUDTTypeListExtension.class, objects);
            action.execute(l);
            setUdts(l);
        }

        public void attributes(Action action) {
            MatchersAttributeTypeListExtension l = objects.newInstance(MatchersAttributeTypeListExtension.class, objects);
            action.execute(l);
            setAttributes(l);
        }
    }

    public static class MatchersCatalogTypeExtension extends MatchersCatalogType {

        final ObjectFactory objects;

        @Inject
        public MatchersCatalogTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void catalogClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setCatalogClass(o);
        }

        public void catalogIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setCatalogIdentifier(o);
        }
    }

    public static class MatcherRuleExtension extends MatcherRule {

        final ObjectFactory objects;

        @Inject
        public MatcherRuleExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class MatchersSchemaTypeExtension extends MatchersSchemaType {

        final ObjectFactory objects;

        @Inject
        public MatchersSchemaTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void schemaClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setSchemaClass(o);
        }

        public void schemaIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setSchemaIdentifier(o);
        }
    }

    public static class MatchersTableTypeExtension extends MatchersTableType {

        final ObjectFactory objects;

        @Inject
        public MatchersTableTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void tableClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setTableClass(o);
        }

        public void tableIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setTableIdentifier(o);
        }

        public void pathClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPathClass(o);
        }

        public void pathExtends(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPathExtends(o);
        }

        public void pathImplements(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPathImplements(o);
        }

        public void recordClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setRecordClass(o);
        }

        public void interfaceClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setInterfaceClass(o);
        }

        public void daoClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setDaoClass(o);
        }

        public void pojoClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPojoClass(o);
        }
    }

    public static class MatchersIndexTypeExtension extends MatchersIndexType {

        final ObjectFactory objects;

        @Inject
        public MatchersIndexTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void keyIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setKeyIdentifier(o);
        }
    }

    public static class MatchersPrimaryKeyTypeExtension extends MatchersPrimaryKeyType {

        final ObjectFactory objects;

        @Inject
        public MatchersPrimaryKeyTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void keyIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setKeyIdentifier(o);
        }
    }

    public static class MatchersUniqueKeyTypeExtension extends MatchersUniqueKeyType {

        final ObjectFactory objects;

        @Inject
        public MatchersUniqueKeyTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void keyIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setKeyIdentifier(o);
        }
    }

    public static class MatchersForeignKeyTypeExtension extends MatchersForeignKeyType {

        final ObjectFactory objects;

        @Inject
        public MatchersForeignKeyTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void keyIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setKeyIdentifier(o);
        }

        public void pathMethodName(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPathMethodName(o);
        }

        public void pathMethodNameInverse(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPathMethodNameInverse(o);
        }

        public void pathMethodNameManyToMany(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPathMethodNameManyToMany(o);
        }
    }

    public static class MatchersFieldTypeExtension extends MatchersFieldType {

        final ObjectFactory objects;

        @Inject
        public MatchersFieldTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void fieldIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setFieldIdentifier(o);
        }

        public void fieldMember(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setFieldMember(o);
        }

        public void fieldSetter(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setFieldSetter(o);
        }

        public void fieldGetter(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setFieldGetter(o);
        }
    }

    public static class MatchersRoutineTypeExtension extends MatchersRoutineType {

        final ObjectFactory objects;

        @Inject
        public MatchersRoutineTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void routineClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setRoutineClass(o);
        }

        public void routineMethod(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setRoutineMethod(o);
        }
    }

    public static class MatchersSequenceTypeExtension extends MatchersSequenceType {

        final ObjectFactory objects;

        @Inject
        public MatchersSequenceTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void sequenceIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setSequenceIdentifier(o);
        }
    }

    public static class MatchersEnumTypeExtension extends MatchersEnumType {

        final ObjectFactory objects;

        @Inject
        public MatchersEnumTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void enumClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setEnumClass(o);
        }

        public void enumLiteral(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setEnumLiteral(o);
        }
    }

    public static class MatchersEmbeddableTypeExtension extends MatchersEmbeddableType {

        final ObjectFactory objects;

        @Inject
        public MatchersEmbeddableTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void recordClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setRecordClass(o);
        }

        public void interfaceClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setInterfaceClass(o);
        }

        public void pojoClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPojoClass(o);
        }
    }

    public static class MatchersUDTTypeExtension extends MatchersUDTType {

        final ObjectFactory objects;

        @Inject
        public MatchersUDTTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void udtClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setUdtClass(o);
        }

        public void udtIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setUdtIdentifier(o);
        }

        public void pathClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPathClass(o);
        }

        public void recordClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setRecordClass(o);
        }

        public void interfaceClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setInterfaceClass(o);
        }

        public void pojoClass(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setPojoClass(o);
        }
    }

    public static class MatchersAttributeTypeExtension extends MatchersAttributeType {

        final ObjectFactory objects;

        @Inject
        public MatchersAttributeTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void attributeIdentifier(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setAttributeIdentifier(o);
        }

        public void attributeMember(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setAttributeMember(o);
        }

        public void attributeSetter(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setAttributeSetter(o);
        }

        public void attributeGetter(Action action) {
            MatcherRuleExtension o = objects.newInstance(MatcherRuleExtension.class, objects);
            action.execute(o);
            setAttributeGetter(o);
        }
    }

    public static class DatabaseExtension extends Database {

        final ObjectFactory objects;

        @Inject
        public DatabaseExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void syntheticObjects(Action action) {
            SyntheticObjectsTypeExtension o = objects.newInstance(SyntheticObjectsTypeExtension.class, objects);
            action.execute(o);
            setSyntheticObjects(o);
        }

        public void properties(Action action) {
            PropertyListExtension l = objects.newInstance(PropertyListExtension.class, objects);
            action.execute(l);
            setProperties(l);
        }

        public void comments(Action action) {
            CommentTypeListExtension l = objects.newInstance(CommentTypeListExtension.class, objects);
            action.execute(l);
            setComments(l);
        }

        public void catalogs(Action action) {
            CatalogMappingTypeListExtension l = objects.newInstance(CatalogMappingTypeListExtension.class, objects);
            action.execute(l);
            setCatalogs(l);
        }

        public void schemata(Action action) {
            SchemaMappingTypeListExtension l = objects.newInstance(SchemaMappingTypeListExtension.class, objects);
            action.execute(l);
            setSchemata(l);
        }

        public void embeddables(Action action) {
            EmbeddableDefinitionTypeListExtension l = objects.newInstance(EmbeddableDefinitionTypeListExtension.class, objects);
            action.execute(l);
            setEmbeddables(l);
        }

        public void customTypes(Action action) {
            CustomTypeListExtension l = objects.newInstance(CustomTypeListExtension.class, objects);
            action.execute(l);
            setCustomTypes(l);
        }

        public void enumTypes(Action action) {
            EnumTypeListExtension l = objects.newInstance(EnumTypeListExtension.class, objects);
            action.execute(l);
            setEnumTypes(l);
        }

        public void forcedTypes(Action action) {
            ForcedTypeListExtension l = objects.newInstance(ForcedTypeListExtension.class, objects);
            action.execute(l);
            setForcedTypes(l);
        }
    }

    public static class SyntheticObjectsTypeExtension extends SyntheticObjectsType {

        final ObjectFactory objects;

        @Inject
        public SyntheticObjectsTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void readonlyColumns(Action action) {
            SyntheticReadonlyColumnTypeListExtension l = objects.newInstance(SyntheticReadonlyColumnTypeListExtension.class, objects);
            action.execute(l);
            setReadonlyColumns(l);
        }

        public void readonlyRowids(Action action) {
            SyntheticReadonlyRowidTypeListExtension l = objects.newInstance(SyntheticReadonlyRowidTypeListExtension.class, objects);
            action.execute(l);
            setReadonlyRowids(l);
        }

        public void columns(Action action) {
            SyntheticColumnTypeListExtension l = objects.newInstance(SyntheticColumnTypeListExtension.class, objects);
            action.execute(l);
            setColumns(l);
        }

        public void identities(Action action) {
            SyntheticIdentityTypeListExtension l = objects.newInstance(SyntheticIdentityTypeListExtension.class, objects);
            action.execute(l);
            setIdentities(l);
        }

        public void enums(Action action) {
            SyntheticEnumTypeListExtension l = objects.newInstance(SyntheticEnumTypeListExtension.class, objects);
            action.execute(l);
            setEnums(l);
        }

        public void primaryKeys(Action action) {
            SyntheticPrimaryKeyTypeListExtension l = objects.newInstance(SyntheticPrimaryKeyTypeListExtension.class, objects);
            action.execute(l);
            setPrimaryKeys(l);
        }

        public void uniqueKeys(Action action) {
            SyntheticUniqueKeyTypeListExtension l = objects.newInstance(SyntheticUniqueKeyTypeListExtension.class, objects);
            action.execute(l);
            setUniqueKeys(l);
        }

        public void foreignKeys(Action action) {
            SyntheticForeignKeyTypeListExtension l = objects.newInstance(SyntheticForeignKeyTypeListExtension.class, objects);
            action.execute(l);
            setForeignKeys(l);
        }

        public void views(Action action) {
            SyntheticViewTypeListExtension l = objects.newInstance(SyntheticViewTypeListExtension.class, objects);
            action.execute(l);
            setViews(l);
        }

        public void daos(Action action) {
            SyntheticDaoTypeListExtension l = objects.newInstance(SyntheticDaoTypeListExtension.class, objects);
            action.execute(l);
            setDaos(l);
        }
    }

    public static class SyntheticReadonlyColumnTypeExtension extends SyntheticReadonlyColumnType {

        final ObjectFactory objects;

        @Inject
        public SyntheticReadonlyColumnTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticReadonlyRowidTypeExtension extends SyntheticReadonlyRowidType {

        final ObjectFactory objects;

        @Inject
        public SyntheticReadonlyRowidTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticColumnTypeExtension extends SyntheticColumnType {

        final ObjectFactory objects;

        @Inject
        public SyntheticColumnTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticIdentityTypeExtension extends SyntheticIdentityType {

        final ObjectFactory objects;

        @Inject
        public SyntheticIdentityTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticEnumTypeExtension extends SyntheticEnumType {

        final ObjectFactory objects;

        @Inject
        public SyntheticEnumTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticPrimaryKeyTypeExtension extends SyntheticPrimaryKeyType {

        final ObjectFactory objects;

        @Inject
        public SyntheticPrimaryKeyTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticUniqueKeyTypeExtension extends SyntheticUniqueKeyType {

        final ObjectFactory objects;

        @Inject
        public SyntheticUniqueKeyTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticForeignKeyTypeExtension extends SyntheticForeignKeyType {

        final ObjectFactory objects;

        @Inject
        public SyntheticForeignKeyTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticViewTypeExtension extends SyntheticViewType {

        final ObjectFactory objects;

        @Inject
        public SyntheticViewTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class SyntheticDaoTypeExtension extends SyntheticDaoType {

        final ObjectFactory objects;

        @Inject
        public SyntheticDaoTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void methods(Action action) {
            SyntheticDaoMethodTypeListExtension l = objects.newInstance(SyntheticDaoMethodTypeListExtension.class, objects);
            action.execute(l);
            setMethods(l);
        }
    }

    public static class SyntheticDaoMethodTypeExtension extends SyntheticDaoMethodType {

        final ObjectFactory objects;

        @Inject
        public SyntheticDaoMethodTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class CommentTypeExtension extends CommentType {

        final ObjectFactory objects;

        @Inject
        public CommentTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class CatalogMappingTypeExtension extends CatalogMappingType {

        final ObjectFactory objects;

        @Inject
        public CatalogMappingTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void schemata(Action action) {
            SchemaMappingTypeListExtension l = objects.newInstance(SchemaMappingTypeListExtension.class, objects);
            action.execute(l);
            setSchemata(l);
        }
    }

    public static class SchemaMappingTypeExtension extends SchemaMappingType {

        final ObjectFactory objects;

        @Inject
        public SchemaMappingTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class EmbeddableDefinitionTypeExtension extends EmbeddableDefinitionType {

        final ObjectFactory objects;

        @Inject
        public EmbeddableDefinitionTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void fields(Action action) {
            EmbeddableFieldListExtension l = objects.newInstance(EmbeddableFieldListExtension.class, objects);
            action.execute(l);
            setFields(l);
        }
    }

    public static class EmbeddableFieldExtension extends EmbeddableField {

        final ObjectFactory objects;

        @Inject
        public EmbeddableFieldExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class CustomTypeExtension extends CustomType {

        final ObjectFactory objects;

        @Inject
        public CustomTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void lambdaConverter(Action action) {
            LambdaConverterExtension o = objects.newInstance(LambdaConverterExtension.class, objects);
            action.execute(o);
            setLambdaConverter(o);
        }
    }

    public static class LambdaConverterExtension extends LambdaConverter {

        final ObjectFactory objects;

        @Inject
        public LambdaConverterExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class EnumTypeExtension extends EnumType {

        final ObjectFactory objects;

        @Inject
        public EnumTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class ForcedTypeExtension extends ForcedType {

        final ObjectFactory objects;

        @Inject
        public ForcedTypeExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void lambdaConverter(Action action) {
            LambdaConverterExtension o = objects.newInstance(LambdaConverterExtension.class, objects);
            action.execute(o);
            setLambdaConverter(o);
        }
    }

    public static class GenerateExtension extends Generate {

        final ObjectFactory objects;

        @Inject
        public GenerateExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class TargetExtension extends Target {

        final ObjectFactory objects;

        @Inject
        public TargetExtension(ObjectFactory objects) {
            this.objects = objects;
        }
    }

    public static class PropertyListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public PropertyListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void property(Action action) {
            PropertyExtension o = objects.newInstance(PropertyExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersCatalogTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersCatalogTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void catalog(Action action) {
            MatchersCatalogTypeExtension o = objects.newInstance(MatchersCatalogTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersSchemaTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersSchemaTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void schema(Action action) {
            MatchersSchemaTypeExtension o = objects.newInstance(MatchersSchemaTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersTableTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersTableTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void table(Action action) {
            MatchersTableTypeExtension o = objects.newInstance(MatchersTableTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersIndexTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersIndexTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void index(Action action) {
            MatchersIndexTypeExtension o = objects.newInstance(MatchersIndexTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersPrimaryKeyTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersPrimaryKeyTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void primaryKey(Action action) {
            MatchersPrimaryKeyTypeExtension o = objects.newInstance(MatchersPrimaryKeyTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersUniqueKeyTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersUniqueKeyTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void uniqueKey(Action action) {
            MatchersUniqueKeyTypeExtension o = objects.newInstance(MatchersUniqueKeyTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersForeignKeyTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersForeignKeyTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void foreignKey(Action action) {
            MatchersForeignKeyTypeExtension o = objects.newInstance(MatchersForeignKeyTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersFieldTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersFieldTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void field(Action action) {
            MatchersFieldTypeExtension o = objects.newInstance(MatchersFieldTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersRoutineTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersRoutineTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void routine(Action action) {
            MatchersRoutineTypeExtension o = objects.newInstance(MatchersRoutineTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersSequenceTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersSequenceTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void sequence(Action action) {
            MatchersSequenceTypeExtension o = objects.newInstance(MatchersSequenceTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersEnumTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersEnumTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void enum_(Action action) {
            MatchersEnumTypeExtension o = objects.newInstance(MatchersEnumTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersEmbeddableTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersEmbeddableTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void embeddable(Action action) {
            MatchersEmbeddableTypeExtension o = objects.newInstance(MatchersEmbeddableTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersUDTTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersUDTTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void udt(Action action) {
            MatchersUDTTypeExtension o = objects.newInstance(MatchersUDTTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class MatchersAttributeTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public MatchersAttributeTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void attribute(Action action) {
            MatchersAttributeTypeExtension o = objects.newInstance(MatchersAttributeTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class CommentTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public CommentTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void comment(Action action) {
            CommentTypeExtension o = objects.newInstance(CommentTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class CatalogMappingTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public CatalogMappingTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void catalog(Action action) {
            CatalogMappingTypeExtension o = objects.newInstance(CatalogMappingTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SchemaMappingTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SchemaMappingTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void schema(Action action) {
            SchemaMappingTypeExtension o = objects.newInstance(SchemaMappingTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class EmbeddableDefinitionTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public EmbeddableDefinitionTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void embeddable(Action action) {
            EmbeddableDefinitionTypeExtension o = objects.newInstance(EmbeddableDefinitionTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class CustomTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public CustomTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void customType(Action action) {
            CustomTypeExtension o = objects.newInstance(CustomTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class EnumTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public EnumTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void enumType(Action action) {
            EnumTypeExtension o = objects.newInstance(EnumTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class ForcedTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public ForcedTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void forcedType(Action action) {
            ForcedTypeExtension o = objects.newInstance(ForcedTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticReadonlyColumnTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticReadonlyColumnTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void readonlyColumn(Action action) {
            SyntheticReadonlyColumnTypeExtension o = objects.newInstance(SyntheticReadonlyColumnTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticReadonlyRowidTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticReadonlyRowidTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void readonlyRowid(Action action) {
            SyntheticReadonlyRowidTypeExtension o = objects.newInstance(SyntheticReadonlyRowidTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticColumnTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticColumnTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void column(Action action) {
            SyntheticColumnTypeExtension o = objects.newInstance(SyntheticColumnTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticIdentityTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticIdentityTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void identity(Action action) {
            SyntheticIdentityTypeExtension o = objects.newInstance(SyntheticIdentityTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticEnumTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticEnumTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void enum_(Action action) {
            SyntheticEnumTypeExtension o = objects.newInstance(SyntheticEnumTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticPrimaryKeyTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticPrimaryKeyTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void primaryKey(Action action) {
            SyntheticPrimaryKeyTypeExtension o = objects.newInstance(SyntheticPrimaryKeyTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticUniqueKeyTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticUniqueKeyTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void uniqueKey(Action action) {
            SyntheticUniqueKeyTypeExtension o = objects.newInstance(SyntheticUniqueKeyTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticForeignKeyTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticForeignKeyTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void foreignKey(Action action) {
            SyntheticForeignKeyTypeExtension o = objects.newInstance(SyntheticForeignKeyTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticViewTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticViewTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void view(Action action) {
            SyntheticViewTypeExtension o = objects.newInstance(SyntheticViewTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticDaoTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticDaoTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void dao(Action action) {
            SyntheticDaoTypeExtension o = objects.newInstance(SyntheticDaoTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class SyntheticDaoMethodTypeListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public SyntheticDaoMethodTypeListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void method(Action action) {
            SyntheticDaoMethodTypeExtension o = objects.newInstance(SyntheticDaoMethodTypeExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }

    public static class EmbeddableFieldListExtension extends ArrayList {

        final ObjectFactory objects;

        @Inject
        public EmbeddableFieldListExtension(ObjectFactory objects) {
            this.objects = objects;
        }

        public void field(Action action) {
            EmbeddableFieldExtension o = objects.newInstance(EmbeddableFieldExtension.class, objects);
            action.execute(o);
            add(o);
        }
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy