Skip to content

Commit

Permalink
javax -> jakarta
Browse files Browse the repository at this point in the history
  • Loading branch information
tandraschko committed Jan 11, 2024
1 parent e7357d1 commit 7913453
Show file tree
Hide file tree
Showing 32 changed files with 101 additions and 155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
public interface InterceptorStrategy extends Serializable
{
/**
* Method which will be invoked by the interceptor method annotated with {@link javax.interceptor.AroundInvoke}
* Method which will be invoked by the interceptor method annotated with {@link jakarta.interceptor.AroundInvoke}
* @param invocationContext current invocation-context
* @return result of the intercepted method
* @throws Exception exception which might be thrown by the intercepted method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.apache.deltaspike.core.impl.interceptor;

import org.apache.deltaspike.core.api.config.base.CoreBaseConfig;
import org.apache.deltaspike.core.impl.util.AnnotationInstanceUtils;
import org.apache.deltaspike.core.spi.activation.Deactivatable;
import org.apache.deltaspike.core.util.ClassDeactivationUtils;

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion deltaspike/modules/data/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
org.apache.deltaspike.data.*
</deltaspike.osgi.export.pkg>
<deltaspike.osgi.import>
javax.persistence*;version="[1.1,3)",
jakarta.persistence.*,
!org.apache.deltaspike.data.*,
*
</deltaspike.osgi.import>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
public enum EntityGraphType
{
/** Fetch graph. */
FETCH("javax.persistence.fetchgraph"),
FETCH("jakarta.persistence.fetchgraph"),

/** Load graph. */
LOAD("javax.persistence.loadgraph");
LOAD("jakarta.persistence.loadgraph");

private String hintName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,150 +29,150 @@


/**
* Expose {@link javax.persistence.EntityManager} methods not present on repository base interfaces.
* Expose {@link jakarta.persistence.EntityManager} methods not present on repository base interfaces.
* Calls the corresponding method on the repository EntityManager.
*
* @param <E> The Entity type.
*/
public interface EntityManagerDelegate<E>
{
/**
* See {@link javax.persistence.EntityManager#persist(Object)}.
* See {@link jakarta.persistence.EntityManager#persist(Object)}.
*/
void persist(E entity);

/**
* See {@link javax.persistence.EntityManager#merge(Object)}.
* See {@link jakarta.persistence.EntityManager#merge(Object)}.
*/
E merge(E entity);

/**
* See {@link javax.persistence.EntityManager#find(Class, Object, java.util.Map)}.
* See {@link jakarta.persistence.EntityManager#find(Class, Object, java.util.Map)}.
*/
E find(Object primaryKey, Map<String, Object> properties);

/**
* See {@link javax.persistence.EntityManager#find(Class, Object, LockModeType)}.
* See {@link jakarta.persistence.EntityManager#find(Class, Object, LockModeType)}.
*/
E find(Object primaryKey, LockModeType lockMode);

/**
* See {@link javax.persistence.EntityManager#find(Class, Object, LockModeType, Map)}.
* See {@link jakarta.persistence.EntityManager#find(Class, Object, LockModeType, Map)}.
*/
E find(Object primaryKey, LockModeType lockMode, Map<String, Object> properties);

/**
* See {@link javax.persistence.EntityManager#getReference(Class, Object)}.
* See {@link jakarta.persistence.EntityManager#getReference(Class, Object)}.
*/
E getReference(Object primaryKey);

/**
* See {@link javax.persistence.EntityManager#setFlushMode(FlushModeType)}.
* See {@link jakarta.persistence.EntityManager#setFlushMode(FlushModeType)}.
*/
void setFlushMode(FlushModeType flushMode);

/**
* See {@link javax.persistence.EntityManager#getFlushMode()}.
* See {@link jakarta.persistence.EntityManager#getFlushMode()}.
*/
FlushModeType getFlushMode();

/**
* See {@link javax.persistence.EntityManager#lock(Object, LockModeType)}.
* See {@link jakarta.persistence.EntityManager#lock(Object, LockModeType)}.
*/
void lock(Object entity, LockModeType lockMode);

/**
* See {@link javax.persistence.EntityManager#lock(Object, LockModeType, Map)}.
* See {@link jakarta.persistence.EntityManager#lock(Object, LockModeType, Map)}.
*/
void lock(Object entity, LockModeType lockMode, Map<String, Object> properties);

/**
* See {@link javax.persistence.EntityManager#refresh(Object, Map)}.
* See {@link jakarta.persistence.EntityManager#refresh(Object, Map)}.
*/
void refresh(E entity, Map<String, Object> properties);

/**
* See {@link javax.persistence.EntityManager#refresh(Object, LockModeType)}.
* See {@link jakarta.persistence.EntityManager#refresh(Object, LockModeType)}.
*/
void refresh(E entity, LockModeType lockMode);

/**
* See {@link javax.persistence.EntityManager#refresh(Object, LockModeType, Map)}.
* See {@link jakarta.persistence.EntityManager#refresh(Object, LockModeType, Map)}.
*/
void refresh(E entity, LockModeType lockMode, Map<String, Object> properties);

/**
* See {@link javax.persistence.EntityManager#clear()}.
* See {@link jakarta.persistence.EntityManager#clear()}.
*/
void clear();

/**
* See {@link javax.persistence.EntityManager#detach(Object)}.
* See {@link jakarta.persistence.EntityManager#detach(Object)}.
*/
void detach(E entity);

/**
* See {@link javax.persistence.EntityManager#contains(Object)}.
* See {@link jakarta.persistence.EntityManager#contains(Object)}.
*/
boolean contains(E entity);

/**
* See {@link javax.persistence.EntityManager#getLockMode(Object)}.
* See {@link jakarta.persistence.EntityManager#getLockMode(Object)}.
*/
LockModeType getLockMode(E entity);

/**
* See {@link javax.persistence.EntityManager#setProperty(String, Object)}.
* See {@link jakarta.persistence.EntityManager#setProperty(String, Object)}.
*/
void setProperty(String propertyName, Object value);

/**
* See {@link javax.persistence.EntityManager#getProperties()}.
* See {@link jakarta.persistence.EntityManager#getProperties()}.
*/
Map<String, Object> getProperties();

/**
* See {@link javax.persistence.EntityManager#joinTransaction()}.
* See {@link jakarta.persistence.EntityManager#joinTransaction()}.
*/
void joinTransaction();

/**
* See {@link javax.persistence.EntityManager#unwrap(Class)}.
* See {@link jakarta.persistence.EntityManager#unwrap(Class)}.
*/
<T> T unwrap(Class<T> cls);

/**
* See {@link javax.persistence.EntityManager#getDelegate()}.
* See {@link jakarta.persistence.EntityManager#getDelegate()}.
*/
Object getDelegate();

/**
* See {@link javax.persistence.EntityManager#close()}.
* See {@link jakarta.persistence.EntityManager#close()}.
*/
void close();

/**
* See {@link javax.persistence.EntityManager#isOpen()}.
* See {@link jakarta.persistence.EntityManager#isOpen()}.
*/
boolean isOpen();

/**
* See {@link javax.persistence.EntityManager#getTransaction()}.
* See {@link jakarta.persistence.EntityManager#getTransaction()}.
*/
EntityTransaction getTransaction();

/**
* See {@link javax.persistence.EntityManager#getEntityManagerFactory()}.
* See {@link jakarta.persistence.EntityManager#getEntityManagerFactory()}.
*/
EntityManagerFactory getEntityManagerFactory();

/**
* See {@link javax.persistence.EntityManager#getCriteriaBuilder()}.
* See {@link jakarta.persistence.EntityManager#getCriteriaBuilder()}.
*/
CriteriaBuilder getCriteriaBuilder();

/**
* See {@link javax.persistence.EntityManager#getMetamodel()}.
* See {@link jakarta.persistence.EntityManager#getMetamodel()}.
*/
Metamodel getMetamodel();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,33 @@ public interface EntityPersistenceRepository<E, PK extends Serializable> extends
E saveAndFlushAndRefresh(E entity);

/**
* Convenience access to {@link javax.persistence.EntityManager#remove(Object)}.
* Convenience access to {@link jakarta.persistence.EntityManager#remove(Object)}.
* @param entity Entity to remove.
*/
void remove(E entity);

/**
* Convenience access to {@link javax.persistence.EntityManager#remove(Object)}
* Convenience access to {@link jakarta.persistence.EntityManager#remove(Object)}
* with a following flush.
* @param entity Entity to remove.
*/
void removeAndFlush(E entity);

/**
* Convenience access to {@link javax.persistence.EntityManager#remove(Object)}
* Convenience access to {@link jakarta.persistence.EntityManager#remove(Object)}
* with an detached entity.
* @param entity Entity to remove.
*/
void attachAndRemove(E entity);

/**
* Convenience access to {@link javax.persistence.EntityManager#refresh(Object)}.
* Convenience access to {@link jakarta.persistence.EntityManager#refresh(Object)}.
* @param entity Entity to refresh.
*/
void refresh(E entity);

/**
* Convenience access to {@link javax.persistence.EntityManager#flush()}.
* Convenience access to {@link jakarta.persistence.EntityManager#flush()}.
*/
void flush();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public interface EntityRepository<E, PK extends Serializable> extends EntityPers

/**
* Entity lookup by primary key. Convenicence method around
* {@link javax.persistence.EntityManager#find(Class, Object)}.
* {@link jakarta.persistence.EntityManager#find(Class, Object)}.
* @param primaryKey DB primary key.
* @return Entity identified by primary or null if it does not exist.
*/
E findBy(PK primaryKey);

/**
* Entity lookup by primary key. Convenicence method around
* {@link javax.persistence.EntityManager#find(Class, Object)}.
* {@link jakarta.persistence.EntityManager#find(Class, Object)}.
* @param primaryKey DB primary key.
* @return Entity identified by primary or null if it does not exist, wrapped by Optional.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

/**
* Marks a query method to be modifying. This will execute the
* {@link javax.persistence.Query#executeUpdate()} method instead of
* {@link javax.persistence.Query#getResultList()} (or the corresponding single result method).
* {@link jakarta.persistence.Query#executeUpdate()} method instead of
* {@link jakarta.persistence.Query#getResultList()} (or the corresponding single result method).
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public enum SingleResultType
{

/**
* Expects a single result, throws a {@link javax.persistence.NoResultException} or
* {@link javax.persistence.NonUniqueResultException} otherwise. This is the JPA
* Expects a single result, throws a {@link jakarta.persistence.NoResultException} or
* {@link jakarta.persistence.NonUniqueResultException} otherwise. This is the JPA
* default behavior.
*/
JPA,
Expand Down
Loading

0 comments on commit 7913453

Please sign in to comment.