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

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

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

import org.apereo.cas.util.function.FunctionUtils;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * This is {@link AbstractJpaEntityFactory}.
 *
 * @author Misagh Moayyed
 * @param  the type parameter
 * @since 6.2.0
 */
@RequiredArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
public abstract class AbstractJpaEntityFactory implements JpaEntityFactory {
    private final String dialect;
    
    /**
     * New document.
     *
     * @return the document
     */
    public T newInstance() {
        return FunctionUtils.doUnchecked(() -> getType().getDeclaredConstructor().newInstance());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy