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

org.simpleflatmapper.jdbc.impl.JpaAliasProviderFactory Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 9.0.2
Show newest version
package org.simpleflatmapper.jdbc.impl;

import org.simpleflatmapper.reflect.meta.AliasProvider;
import org.simpleflatmapper.reflect.meta.AliasProviderProducer;
import org.simpleflatmapper.util.Consumer;

public class JpaAliasProviderFactory implements AliasProviderProducer {
    private boolean isActive() {
        try {
            Class.forName("javax.persistence.Column");
            return true;
        } catch (Throwable e) {
        }
        return false;
    }

    @Override
    public void produce(Consumer consumer) {
        if (isActive()) {
            consumer.accept(new JpaAliasProvider());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy