org.apereo.cas.jpa.AbstractJpaEntityFactory Maven / Gradle / Ivy
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