View Javadoc

1   package net.sf.josceleton.core.impl.entity;
2   
3   import net.sf.josceleton.core.api.entity.User;
4   
5   /**
6    * @since 0.3
7    */
8   class UserFactoryImpl implements UserFactory {
9   	
10  	/** Containts the next available unique ID, starting by 1. */
11  	private int uniqueIdCounter = 1;
12  	
13  	// MINOR @TEST check internal unique ID generation
14  
15  	/**
16  	 * @since 0.3
17  	 */
18  	@Override public final User create(final int osceletonId) {
19  		final User newUser = new UserImpl(this.uniqueIdCounter, osceletonId);
20  		
21  		this.uniqueIdCounter++;
22  		
23  		return newUser;
24  	}
25  
26  }