// Checkerframework stubs for the jakarta.persistence module package jakarta.persistence; import org.checkerframework.checker.nullness.qual.Nullable; public interface AttributeConverter { public @Nullable Y convertToDatabaseColumn(@Nullable X attribute); public @Nullable X convertToEntityAttribute(@Nullable Y dbData); } public interface EntityManager extends AutoCloseable { public @Nullable T find(Class entityClass, Object primaryKey); public @Nullable T find(Class entityClass, Object primaryKey, Map properties); public @Nullable T find(Class entityClass, Object primaryKey, LockModeType lockMode); public @Nullable T find(Class entityClass, Object primaryKey, LockModeType lockMode, Map properties); } public interface EntityManagerFactory extends AutoCloseable { public @Nullable Cache getCache(); } public interface EntityTransaction { @Nullable Integer getTimeout(); } public interface Parameter { public @Nullable String getName(); public @Nullable Integer getPosition(); } public interface PersistenceUnitUtil extends PersistenceUtil { public @Nullable Object getIdentifier(Object entity); } public interface Query { Query setParameter(Parameter param, @Nullable T value); Query setParameter(Parameter param, @Nullable Calendar value, TemporalType temporalType); Query setParameter(Parameter param, @Nullable Date value, TemporalType temporalType); Query setParameter(String name, @Nullable Object value); Query setParameter(String name, @Nullable Calendar value, TemporalType temporalType); Query setParameter(String name, @Nullable Date value, TemporalType temporalType); Query setParameter(int position, @Nullable Object value); Query setParameter(int position, @Nullable Calendar value, TemporalType temporalType); Query setParameter(int position, @Nullable Date value, TemporalType temporalType); @Nullable T getParameterValue(Parameter param); @Nullable Object getParameterValue(String name); @Nullable Object getParameterValue(int position); } public interface StoredProcedureQuery extends Query { StoredProcedureQuery setParameter(Parameter param, @Nullable T value); StoredProcedureQuery setParameter(Parameter param, @Nullable Calendar value, TemporalType temporalType); StoredProcedureQuery setParameter(Parameter param, @Nullable Date value, TemporalType temporalType); StoredProcedureQuery setParameter(String name, @Nullable Object value); StoredProcedureQuery setParameter(String name, @Nullable Calendar value, TemporalType temporalType); StoredProcedureQuery setParameter(String name, @Nullable Date value, TemporalType temporalType); StoredProcedureQuery setParameter(int position, @Nullable Object value); StoredProcedureQuery setParameter(int position, @Nullable Calendar value, TemporalType temporalType); StoredProcedureQuery setParameter(int position, @Nullable Date value, TemporalType temporalType); @Nullable Object getOutputParameterValue(int position); @Nullable Object getOutputParameterValue(String parameterName); } public interface TypedQuery extends Query { TypedQuery setParameter(Parameter param, @Nullable T value); TypedQuery setParameter(Parameter param, @Nullable Calendar value, TemporalType temporalType); TypedQuery setParameter(Parameter param, @Nullable Date value, TemporalType temporalType); TypedQuery setParameter(String name, @Nullable Object value); TypedQuery setParameter(String name, @Nullable Calendar value, TemporalType temporalType); TypedQuery setParameter(String name, @Nullable Date value, TemporalType temporalType); TypedQuery setParameter(int position, @Nullable Object value); TypedQuery setParameter(int position, @Nullable Calendar value, TemporalType temporalType); TypedQuery setParameter(int position, @Nullable Date value, TemporalType temporalType); @Nullable Object getOutputParameterValue(int position); @Nullable Object getOutputParameterValue(String parameterName); } public interface Tuple { @Nullable X get(TupleElement tupleElement); @Nullable X get(String alias, Class type); @Nullable Object get(String alias); @Nullable X get(int i, Class type); @Nullable Object get(int i); @Nullable Object[] toArray(); } public interface TupleElement { @Nullable String getAlias(); } package jakarta.persistence.criteria; public interface CommonAbstractCriteria { @Nullable Predicate getRestriction(); } public interface AbstractQuery extends CommonAbstractCriteria { AbstractQuery where(@Nullable Expression restriction); AbstractQuery where(@Nullable Predicate... restrictions); AbstractQuery having(@Nullable Expression restriction); AbstractQuery having(@Nullable Predicate... restrictions); @Nullable Selection getSelection(); @Nullable Predicate getGroupRestriction(); } public interface CriteriaUpdate extends CommonAbstractCriteria { CriteriaUpdate set(SingularAttribute attribute, @Nullable X value); CriteriaUpdate set(Path attribute, @Nullable X value); CriteriaUpdate set(String attributeName, @Nullable Object value); } public interface Subquery extends AbstractQuery, Expression { Subquery where(@Nullable Expression restriction); Subquery where(@Nullable Predicate... restrictions); Subquery having(@Nullable Expression restriction); Subquery having(@Nullable Predicate... restrictions); @Nullable Expression getSelection(); } public interface CriteriaBuilder { public static interface SimpleCase extends Expression { SimpleCase when(C condition, @Nullable R result); SimpleCase when(Expression condition, @Nullable R result); Expression otherwise(@Nullable R result); } public static interface Case extends Expression { Case when(Expression condition, @Nullable R result); Expression otherwise(@Nullable R result); } } public interface Join extends From { Join on(@Nullable Expression restriction); Join on(@Nullable Predicate... restrictions); @Nullable Predicate getOn(); } public interface SetJoin extends PluralJoin, E> { SetJoin on(@Nullable Expression restriction); SetJoin on(@Nullable Predicate... restrictions); } public interface ListJoin extends PluralJoin, E> { ListJoin on(@Nullable Expression restriction); ListJoin on(@Nullable Predicate... restrictions); } public interface MapJoin extends PluralJoin, V> { MapJoin on(@Nullable Expression restriction); MapJoin on(@Nullable Predicate... restrictions); } public interface Path extends Expression { // CteRoot etc. @Nullable Bindable getModel(); @Nullable Path getParentPath(); MapJoin on(@Nullable Predicate... restrictions); } package jakarta.persistence.metamodel; public interface IdentifiableType extends ManagedType { @Nullable IdentifiableType getSupertype(); } package jakarta.persistence.spi; public interface ClassTransformer { @Nullable byte[] transform( @Nullable ClassLoader loader, String className, @Nullable Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws TransformerException; } public interface PersistenceProvider { public @Nullable EntityManagerFactory createEntityManagerFactory(String emName, @Nullable Map map); public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, @Nullable Map map); } public interface PersistenceUnitInfo { public @Nullable String getPersistenceProviderClassName(); public @Nullable PersistenceUnitTransactionType getTransactionType(); public @Nullable DataSource getJtaDataSource(); public @Nullable DataSource getNonJtaDataSource(); public @Nullable ClassLoader getClassLoader(); public @Nullable ClassLoader getNewTempClassLoader(); }