/**
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 
 * If a copy of the MPL was not distributed with this file, You can obtain one at 
 * http://mozilla.org/MPL/2.0/.
 * 
 * This Source Code Form is also subject to the terms of the Health-Related Additional
 * Disclaimer of Warranty and Limitation of Liability available at
 * http://www.carewebframework.org/licensing/disclaimer.
 */
package org.carewebframework.api.domain;

import java.util.List;

/**
 * Interface for a domain object factory.
 * 
 * @param <T> The class of domain object serviced by the factory.
 */
public interface IDomainFactory<T extends IDomainObject> {
    
    /**
     * Creates a new instance of an object of this domain.
     * 
     * @return The new domain object instance.
     */
    T newObject();
    
    /**
     * Fetches an object, identified by its unique id, from the underlying data store.
     * 
     * @param id Unique id of the object.
     * @return The requested object.
     */
    T fetchObject(long id);
    
    /**
     * Fetches multiple domain objects as specified by an array of identifier values.
     * 
     * @param ids An array of unique identifiers.
     * @return A list of domain objects in the same order as requested in the ids parameter.
     */
    List<T> fetchObjects(long[] ids);
    
}

@@ -84,17 +84,16 @@
  v. 2.0.
- 
 %0A * If a
@@ -166,17 +166,16 @@
 n one at
- 
 %0A * http
@@ -197,25 +197,24 @@
 MPL/2.0/.%0A *
- 
 %0A * This Sou
@@ -531,17 +531,16 @@
 tory.%0A *
- 
 %0A * @par
@@ -661,21 +661,17 @@
 ject%3E %7B%0A
-    
 %0A
+
     /**%0A
@@ -727,33 +727,32 @@
 s domain.%0A     *
- 
 %0A     * @return 
@@ -810,21 +810,17 @@
 ject();%0A
-    
 %0A
+
     /**%0A
@@ -904,33 +904,32 @@
 ta store.%0A     *
- 
 %0A     * @param i
@@ -1022,18 +1022,20 @@
 ect(
-lo
+Stri
 ng id);%0A
     
@@ -1030,20 +1030,16 @@
 ng id);%0A
-    
 %0A    /**
@@ -1131,17 +1131,16 @@
 .%0A     *
- 
 %0A     * 
@@ -1312,10 +1312,12 @@
 cts(
-lo
+Stri
 ng%5B%5D
@@ -1323,15 +1323,11 @@
 %5D ids);%0A
-    
 %0A%7D%0A

Make domain id a String instead of long (more compatible with FHIR).