org.unitils.orm.hibernate.annotation
Annotation Type HibernateSessionFactory


@Target(value={TYPE,METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface HibernateSessionFactory

Annotation that can be used for configuring a hibernate SessionFactory on a test class. Such a SessionFactory will connect to the unitils configured test datasource.

This annotation can be used at class, method or field level. If at field level, the SessionFactory associated with this test object is injected. If put on a method with a single argument of type SessionFactory, the method is invoked with the SessionFactory as argument.

This annotation can also be used to identify a custom configuration method. Such a method takes as single parameter a hibernate org.hibernate.cfg.Configuration object, on which any specified configuration files were already loaded.

Author:
Filip Neven, Tim Ducheyne

Optional Element Summary
 String[] value
          Specifies zero, one or more configuration files, that will be used to configure the hibernate SessionFactory
 

value

public abstract String[] value
Specifies zero, one or more configuration files, that will be used to configure the hibernate SessionFactory

Default:
{}


Copyright © 2011. All Rights Reserved.