1 package com.bm.ejb3metadata.annotations.metadata.interfaces;
2
3 import com.bm.ejb3metadata.annotations.impl.JavaxPersistenceUnit;
4
5 /**
6 * This interface represents methods which can be call on
7 * ClassAnnotationMetadata, MethodAnnotationMetadata and FieldAnnotationMetadata.<br>
8 * It manages @{@link javax.persistence.PersistenceUnit} annotation.
9 * @author Daniel Wiese
10 */
11 public interface IPersistenceUnit {
12
13 /**
14 * @return true if this field is used as a persistence unit.
15 */
16 boolean isPersistenceUnit();
17
18 /**
19 * @return the persistence unit infos.
20 */
21 JavaxPersistenceUnit getJavaxPersistenceUnit();
22
23 /**
24 * Sets the persistence unit info on this field.
25 * @param javaxPersistenceUnit information on persistence unit.
26 */
27 void setJavaxPersistenceUnit(JavaxPersistenceUnit javaxPersistenceUnit);
28
29 }