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

net.java.ao.schema.CachingNameConverters Maven / Gradle / Ivy

Go to download

This is the core library for Active Objects. It is generic and can be embedded in any environment. As such it is generic and won't contain all connection pooling, etc.

There is a newer version: 6.1.1
Show newest version
package net.java.ao.schema;


import java.util.Objects;

public final class CachingNameConverters implements NameConverters {
    private final TableNameConverter tableNameConverter;
    private final FieldNameConverter fieldNameConverter;
    private final SequenceNameConverter sequenceNameConverter;
    private final TriggerNameConverter triggerNameConverter;
    private final IndexNameConverter indexNameConverter;
    private final UniqueNameConverter uniqueNameConverter;

    public CachingNameConverters(NameConverters nameConverters) {
        Objects.requireNonNull(nameConverters, "nameConverters can't be null");
        this.tableNameConverter = new CachingTableNameConverter(nameConverters.getTableNameConverter());
        this.fieldNameConverter = nameConverters.getFieldNameConverter();
        this.sequenceNameConverter = nameConverters.getSequenceNameConverter();
        this.triggerNameConverter = nameConverters.getTriggerNameConverter();
        this.indexNameConverter = nameConverters.getIndexNameConverter();
        this.uniqueNameConverter = nameConverters.getUniqueNameConverter();
    }

    @Override
    public TableNameConverter getTableNameConverter() {
        return tableNameConverter;
    }

    @Override
    public FieldNameConverter getFieldNameConverter() {
        return fieldNameConverter;
    }

    @Override
    public SequenceNameConverter getSequenceNameConverter() {
        return sequenceNameConverter;
    }

    @Override
    public TriggerNameConverter getTriggerNameConverter() {
        return triggerNameConverter;
    }

    @Override
    public IndexNameConverter getIndexNameConverter() {
        return indexNameConverter;
    }

    @Override
    public UniqueNameConverter getUniqueNameConverter() {
        return uniqueNameConverter;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy