use of javax.persistence.FlushModeType in project uPortal by Jasig.
the class JpaDateDimensionDao method getDateDimensionById.
@Override
public DateDimension getDateDimensionById(long key) {
final EntityManager entityManager = this.getEntityManager();
final FlushModeType flushMode = entityManager.getFlushMode();
try {
entityManager.setFlushMode(FlushModeType.COMMIT);
return entityManager.find(DateDimensionImpl.class, key);
} finally {
entityManager.setFlushMode(flushMode);
}
}
Aggregations