01: /*
02: * Copyright 2006-2007, Unitils.org
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.unitils.hibernate.annotation;
17:
18: import static java.lang.annotation.ElementType.*;
19: import java.lang.annotation.Retention;
20: import static java.lang.annotation.RetentionPolicy.RUNTIME;
21: import java.lang.annotation.Target;
22:
23: /**
24: * todo javadoc
25: * <p/>
26: * Annotation indicating that this field or method should be initialized with the Hibernate<code>SessionFactory</code> object
27: * that can be used to create Hibernate <code>Session</code> object that provide a connection to the unit test database.
28: * If a field is annotated, it should be of type <code>org.hibernate.SessionFactory</code>. If a method is annotated,
29: * the method should have following signature: void myMethod(org.hibernate.SessionFactory sessionFactory)
30: *
31: * @author Filip Neven
32: * @author Tim Ducheyne
33: */
34: @Target({TYPE,METHOD,FIELD})
35: @Retention(RUNTIME)
36: public @interface HibernateSessionFactory {
37:
38: //todo javadoc
39:
40: String[] value() default {};
41:
42: }
|