View Javadoc
1   package generated.model.factories;
2   
3   import generated.model.de.fhdw.partner.NatuerlichePerson;
4   import de.fhdw.wtf.context.model.AnyType;
5   import de.fhdw.wtf.context.model.UserObjectFactory;
6   import de.fhdw.wtf.persistence.meta.UserObject;
7   
8   /**
9    * Creates NatuerlichePerson objects.
10   */
11  public class NatuerlichePersonFactory extends UserObjectFactory {
12  	
13  	/**
14  	 * The singleton instance of this factory class.
15  	 */
16  	private static NatuerlichePersonFactory instance;
17  	
18  	/**
19  	 * Returns the singleton instance of this factory class.
20  	 * 
21  	 * @return The singleton instance of this factory class.
22  	 */
23  	public static synchronized NatuerlichePersonFactory create() {
24  		if (instance == null) {
25  			instance = new NatuerlichePersonFactory();
26  		}
27  		return instance;
28  	}
29  	
30  	@Override
31  	protected AnyType createSpecificUserType(final UserObject userObject) {
32  		return new NatuerlichePerson(userObject);
33  	}
34  }