1 package com.bm.ejb3metadata.annotations.impl; 2 3 4 /** 5 * This class allow to set informations on javax.persistence.PersistenceUnit 6 * annotation. 7 * @author Daniel Wiese 8 */ 9 public class JavaxPersistenceUnit { 10 11 /** 12 * Name of this persistence unit. 13 */ 14 private String name = null; 15 16 /** 17 * Unit name of this persistence context. 18 */ 19 private String unitName = null; 20 21 /** 22 * Build new object with default values. 23 */ 24 public JavaxPersistenceUnit() { 25 // default values 26 this.unitName = ""; 27 this.name = ""; 28 } 29 30 /** 31 * @return the unit name used by this persistence context. 32 */ 33 public String getName() { 34 return name; 35 } 36 37 /** 38 * sets the name of this persistence context. 39 * @param name the name of the persistence context 40 */ 41 public void setName(final String name) { 42 this.name = name; 43 } 44 45 /** 46 * @return the unit name used by this persistence context. 47 */ 48 public String getUnitName() { 49 return unitName; 50 } 51 52 /** 53 * sets the unit name of this persistence context. 54 * @param unitName the name of the persistence unit 55 */ 56 public void setUnitName(final String unitName) { 57 this.unitName = unitName; 58 } 59 60 }