Methods Summary |
---|
protected org.hibernate.event.AutoFlushEventListener[] | buildAutoFlushEventListeners()
return new AutoFlushEventListener[] { JPAAutoFlushEventListener.INSTANCE };
|
protected org.hibernate.event.FlushEntityEventListener[] | buildFlushEntityEventListeners()
return new FlushEntityEventListener[] { new JPAFlushEntityEventListener() };
|
protected org.hibernate.event.FlushEventListener[] | buildFlushEventListeners()
return new FlushEventListener[] { JPAFlushEventListener.INSTANCE };
|
protected org.hibernate.event.PersistEventListener[] | buildPersisOnFlushEventListeners()
return new PersistEventListener[] { new JPAPersistOnFlushEventListener() };
|
protected org.hibernate.event.PersistEventListener[] | buildPersistEventListeners()
return new PersistEventListener[] { new JPAPersistEventListener() };
|
public void | configure(org.hibernate.cfg.Configuration cfg)
super.configure( cfg );
cfg.setProperty( Environment.JPAQL_STRICT_COMPLIANCE, "true" );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "false" );
cfg.setEntityNotFoundDelegate( new JPAEntityNotFoundDelegate() );
cfg.getEventListeners().setPersistEventListeners( buildPersistEventListeners() );
cfg.getEventListeners().setPersistOnFlushEventListeners( buildPersisOnFlushEventListeners() );
cfg.getEventListeners().setAutoFlushEventListeners( buildAutoFlushEventListeners() );
cfg.getEventListeners().setFlushEventListeners( buildFlushEventListeners() );
cfg.getEventListeners().setFlushEntityEventListeners( buildFlushEntityEventListeners() );
|
public java.lang.String | getCacheConcurrencyStrategy()
// no second level caching
return null;
|
public java.lang.String[] | getMappings()
return new String[] { "jpa/Part.hbm.xml", "jpa/Item.hbm.xml", "jpa/MyEntity.hbm.xml" };
|