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

net.java.ao.atlassian.AtlassianTriggerNameConverter 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.schema.DefaultTriggerNameConverter;
import net.java.ao.schema.TriggerNameConverter;

import java.util.Objects;

import static net.java.ao.Common.shorten;

public final class AtlassianTriggerNameConverter implements TriggerNameConverter {
    private final TriggerNameConverter delegate;

    public AtlassianTriggerNameConverter() {
        this(new DefaultTriggerNameConverter());
    }

    public AtlassianTriggerNameConverter(TriggerNameConverter delegate) {
        this.delegate = Objects.requireNonNull(delegate, "delegate can't be null");
    }

    @Override
    public String autoIncrementName(String tableName, String columnName) {
        return shorten(delegate.autoIncrementName(tableName, columnName), ConverterUtils.MAX_LENGTH);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy