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

org.apereo.cas.jpa.JpaEntityFactory Maven / Gradle / Ivy

There is a newer version: 7.2.0-RC4
Show newest version
package org.apereo.cas.jpa;

/**
 * This is {@link JpaEntityFactory}.
 *
 * @author Misagh Moayyed
 * @since 7.1.0
 */
public interface JpaEntityFactory {
    /**
     * Gets type.
     *
     * @return the type
     */
    Class getType();

    /**
     * Gets dialect.
     *
     * @return dialect
     */
    String getDialect();

    /**
     * Is MS SQL Server ?.
     *
     * @return true/false
     */
    default boolean isMsSqlServer() {
        return getDialect().contains("SQLServer");
    }

    /**
     * Is oracle ?.
     *
     * @return true/false
     */
    default boolean isOracle() {
        return getDialect().contains("Oracle");
    }

    /**
     * Is mysql ?.
     *
     * @return true/false
     */
    default boolean isMySql() {
        return getDialect().contains("MySQL");
    }

    /**
     * Is postgres ?.
     *
     * @return true/false
     */
    default boolean isPostgres() {
        return getDialect().contains("PostgreSQL");
    }

    /**
     * Is maria db ?
     *
     * @return true/false
     */
    default boolean isMariaDb() {
        return getDialect().contains("MariaDB");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy