User Tools

Site Tools


about:navigating_principle_languages

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
about:navigating_principle_languages [2013-09-14 15:47] – judgment christianabout:navigating_principle_languages [2013-09-14 15:55] – code DataImpl christian
Line 43: Line 43:
   * For the data layer there is a data component, a class ''DataImpl'' which aggregates three subcomponents ''Enterprise'', ''Persistence'', and ''Store'' and gives access to them.   * For the data layer there is a data component, a class ''DataImpl'' which aggregates three subcomponents ''Enterprise'', ''Persistence'', and ''Store'' and gives access to them.
  
-FIXME code for Data class+<code java> 
 +public class DataImpl implements DataIf  
 +
 +    public EnterpriseQueryIf getEnterpriseQueryIf()  
 +    { 
 +        return new EnterpriseQueryImpl(); 
 +    } 
 + 
 +    public PersistenceIf getPersistenceManager()  
 +    { 
 +        return new PersistenceImpl(); 
 +    } 
 + 
 +    public StoreQueryIf getStoreQueryIf()  
 +    { 
 +        return new StoreQueryImpl(); 
 +    } 
 +
 +</code>
  
   * There are "factory" classes which lazily create and provide access to single instances of a component.   * There are "factory" classes which lazily create and provide access to single instances of a component.
Line 53: Line 71:
     private static DataIf dataaccess = null;     private static DataIf dataaccess = null;
  
-    private DataIfFactory () {}+    private DataIfFactory() {}
  
-    public static DataIf getInstance () +    public static DataIf getInstance() 
     {     {
         if (dataaccess == null)          if (dataaccess == null) 
         {         {
-            dataaccess = new DataImpl ();+            dataaccess = new DataImpl();
         }         }
         return dataaccess;         return dataaccess;
about/navigating_principle_languages.txt · Last modified: 2013-09-16 17:27 by christian