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

net.java.ao.atlassian.PrefixedTableNameConverter 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.atlassian;


import net.java.ao.RawEntity;
import net.java.ao.schema.TableNameConverter;

import java.util.Objects;


/**
 * 

A {@link net.java.ao.schema.TableNameConverter table name converter} that will prepend the given {@link Prefix} to table names.

*

It uses a {@link net.java.ao.schema.TableNameConverter delegate table name converter} for the general conversion strategy.

*/ final class PrefixedTableNameConverter implements TableNameConverter { private final TablePrefix prefix; /** * The table name converter we delegate the real conversion to */ private final TableNameConverter delegate; public PrefixedTableNameConverter(TablePrefix prefix, TableNameConverter delegate) { this.prefix = Objects.requireNonNull(prefix, "prefix can't be null"); this.delegate = Objects.requireNonNull(delegate, "delegate can't be null"); } public String getName(Class> clazz) { return prefix.prepend(delegate.getName(clazz)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy