01: package com.bm.ejb3metadata.annotations.metadata.interfaces;
02:
03: import com.bm.ejb3metadata.annotations.impl.JavaxPersistenceUnit;
04:
05: /**
06: * This interface represents methods which can be call on
07: * ClassAnnotationMetadata, MethodAnnotationMetadata and FieldAnnotationMetadata.<br>
08: * It manages @{@link javax.persistence.PersistenceUnit} annotation.
09: * @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(
28: JavaxPersistenceUnit javaxPersistenceUnit);
29:
30: }
|