Package org.hibernate.envers.exception

Examples of org.hibernate.envers.exception.AuditException


                throw new RevisionDoesNotExistException(revision);
            }

            return revisionData;
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here


             result.put(revNo, revision);
      }

            return result;
        } catch (HibernateException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

            result = createQuery().forEntitiesAtRevision(cls, entityName, revision, includeDeletions)
                .add(AuditEntity.id().eq(primaryKey)).getSingleResult();
        } catch (NoResultException e) {
            result = null;
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }

        return (T) result;
    }   
View Full Code Here

            }

            // The timestamp object is either a date or a long
            return timestampObject instanceof Date ? (Date) timestampObject : new Date((Long) timestampObject);
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

                throw new RevisionDoesNotExistException(date);
            }

            return res;
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

                throw new RevisionDoesNotExistException(revision);
            }

            return revisionData;
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

             result.put(revNo, revision);
      }

            return result;
        } catch (HibernateException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

        }
    }

    public CrossTypeRevisionChangesReader getCrossTypeRevisionChangesReader() throws AuditException {
        if (!verCfg.getGlobalCfg().isTrackEntitiesChangedInRevisionEnabled()) {
            throw new AuditException("This API is designed for Envers default mechanism of tracking entities modified in a given revision."
                                     + " Extend DefaultTrackingModifiedEntitiesRevisionEntity, utilize @ModifiedEntityNames annotation or set "
                                     + "'org.hibernate.envers.track_entities_changed_in_revision' parameter to true.");
        }
        return crossTypeRevisionChangesReader;
    }
View Full Code Here

    this.revisionTypeInId = revisionTypeInId;

        try {
            proxyConstructor = proxyClass.getConstructor(Initializor.class);
        } catch (NoSuchMethodException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

              )
          ),
          null
      );
        } catch (InstantiationException e) {
            throw new AuditException(e);
        } catch (IllegalAccessException e) {
            throw new AuditException(e);
        } catch (InvocationTargetException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.hibernate.envers.exception.AuditException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.