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

org.simpleflatmapper.datastax.impl.mapping.DatastaxAliasProviderFactory Maven / Gradle / Ivy

There is a newer version: 8.2.3
Show newest version
package org.simpleflatmapper.datastax.impl.mapping;

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

public class DatastaxAliasProviderFactory implements AliasProviderProducer {
    private boolean isActive() {
        try {
            Class.forName("com.datastax.driver.mapping.annotations.Table");
            return true;
        } catch (Throwable e) {}
        return false;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy