Example usage for org.hibernate EmptyInterceptor subclass-usage

List of usage examples for org.hibernate EmptyInterceptor subclass-usage

Introduction

In this page you can find the example usage for org.hibernate EmptyInterceptor subclass-usage.

Usage

From source file org.openmrs.api.db.hibernate.AuditableInterceptor.java

/**
 * This class looks for {@link OpenmrsObject} and {@link Auditable} that are being inserted into the
 * database. The creator and dateCreated fields are set when inserting or updating objects and the
 * fields are still null. If the class is an update (instead of an insert) then the changedBy and
 * dateChanged fields are set to the current user and the current time. <br>
 * <br>

From source file org.openmrs.api.db.hibernate.DropMillisecondsHibernateInterceptor.java

/**
 * Prior to MySQL version 5.6 the DATETIME datatype is only precise to the second, and in version 5.6, a column datatype
 * of DATETIME is precise to the second. (To get millisecond precision you'd need to say DATETIME(3).) Thus all the
 * DATETIME fields in all existing OpenMRS installations running on MySQL are precise to the second.
 * <p/>
 * We use java.util.Date in OpenMRS, which has millisecond precision, so when saving an OpenMRS object to the database,

From source file org.openmrs.api.db.hibernate.ImmutableEntityInterceptor.java

/**
 * Superclass for all Interceptors that would like to ensure that changes to immutable entities of
 * specific types don't get persisted to the database, more granularity of the immutable properties
 * is also supported so as to allow editing some properties while not for others
 * 
 * <pre>

From source file org.openmrs.module.auditlog.api.db.hibernate.interceptor.HibernateAuditLogInterceptor.java

/**
 * A hibernate {@link org.hibernate.Interceptor} implementation, intercepts any database inserts,
 * updates and deletes and creates audit log entries for Audited Objects, it logs changes for a
 * single session meaning that if User A and B concurrently make changes to the same object, there
 * will be 2 log entries in the DB, one for each user's session. Any changes/inserts/deletes made to
 * the DB that are not made through the application won't be detected by the module.

From source file org.openmrs.module.conceptpubsub.api.db.hibernate.interceptor.LocalMappingHibernateInterceptor.java

/**
 * Retires/unretires/purges local mappings with concepts.
 */
@Component("conceptpubsub.LocalMappingHibernateInterceptor")
public class LocalMappingHibernateInterceptor extends EmptyInterceptor implements ApplicationContextAware {

From source file org.openmrs.module.ebolaexample.db.DropMillisecondsHibernateInterceptor.java

/**
 * [ This class is temporarily copied from PIH's Mirebalais module, but once we fix this in OpenMRS core per
 * https://issues.openmrs.org/browse/TRUNK-4252 we can remove this workaround. ]
 *
 * Prior to MySQL version 5.6 the DATETIME datatype is only precise to the second, and in version 5.6, a column datatype
 * of DATETIME is precise to the second. (To get millisecond precision you'd need to say DATETIME(3).) Thus all the

From source file org.openmrs.module.interceptorexample.db.hibernate.HibernateLoggingInterceptor.java

/**
 * Example interceptor that is added to the hibernate sessions via the sessionfactory.<br/>
 * <br/>
 * See the /metadata/moduleApplicationContext.xml for how this is done.<br/>
 * <br/>
 * See /metadata/log4j.xml for why these .info statements are appearing in the logs

From source file org.openmrs.module.metadatamapping.api.db.hibernate.interceptor.LocalMappingHibernateInterceptor.java

/**
 * Retires/unretires/purges local mappings with concepts.
 */
@Component("metadatamapping.LocalMappingHibernateInterceptor")
public class LocalMappingHibernateInterceptor extends EmptyInterceptor implements ApplicationContextAware {

From source file org.openmrs.module.mirebalais.api.db.hibernate.DropMillisecondsHibernateInterceptor.java

/**
 * Prior to MySQL version 5.6 the DATETIME datatype is only precise to the second, and in version 5.6, a column datatype
 * of DATETIME is precise to the second. (To get millisecond precision you'd need to say DATETIME(3).) Thus all the
 * DATETIME fields in all existing OpenMRS installations running on MySQL are precise to the second.
 * <p/>
 * We use java.util.Date in OpenMRS, which has millisecond precision, so when saving an OpenMRS object to the database,

From source file org.openmrs.module.restrictbyrole.api.db.hibernate.HibernateRestrictByRoleInterceptor.java

/**
 * 
 * @see org.hibernate.EmptyInterceptor
 *
 */
public class HibernateRestrictByRoleInterceptor extends EmptyInterceptor