View Javadoc
1   package de.fhdw.wtf.context.core;
2   
3   import de.fhdw.wtf.persistence.facade.ObjectFacade;
4   import de.fhdw.wtf.persistence.facade.TypeManager;
5   
6   /**
7    * This method represent an abstraction over Persistence and Revision Context, because both classes need a connection to
8    * the Database, this means a Type Manager and the Object Facade.
9    * 
10   */
11  public abstract class ContextWithDatabaseAccess extends Context {
12  	
13  	/**
14  	 * The Type Manager, which holds knowledge about all existing Types and associations in the model.
15  	 */
16  	protected final TypeManager typeManager;
17  	/**
18  	 * The Facade towards the database.
19  	 */
20  	protected final ObjectFacade objectFacade;
21  	
22  	/**
23  	 * Protected superclass constructor.
24  	 * 
25  	 * @param objectFacade
26  	 *            A reference to Object Facade.
27  	 */
28  	protected ContextWithDatabaseAccess(final ObjectFacade objectFacade) {
29  		this.objectFacade = objectFacade;
30  		this.typeManager = objectFacade.getTypeManager();
31  	}
32  	
33  }