@@ -69,8 +69,6 @@ class Factory {
6969 * <dt>empty</dt><dd>return a resource instance with empty property values.</dd></dl>
7070 * @param {boolean } [options.includeOptionalFields] - if <code>options.generate</code>
7171 * is specified, whether optional fields should be generated.
72- * @param {boolean } [options.allowEmptyId] - if <code>options.allowEmptyId</code>
73- * is specified as true, a zero length string for id is allowed (allows it to be filled in later).
7472 * @return {Resource } the new instance
7573 * @throws {TypeNotFoundException } if the type is not registered with the ModelManager
7674 */
@@ -102,14 +100,12 @@ class Factory {
102100 } ) ) ;
103101 }
104102
105- if ( ! ( options . allowEmptyId && id === '' ) ) {
106- if ( id . trim ( ) . length === 0 ) {
107- let formatter = Globalize . messageFormatter ( 'factory-newinstance-missingidentifier' ) ;
108- throw new Error ( formatter ( {
109- namespace : ns ,
110- type : type
111- } ) ) ;
112- }
103+ if ( id . trim ( ) . length === 0 ) {
104+ let formatter = Globalize . messageFormatter ( 'factory-newinstance-missingidentifier' ) ;
105+ throw new Error ( formatter ( {
106+ namespace : ns ,
107+ type : type
108+ } ) ) ;
113109 }
114110 } else if ( id ) {
115111 throw new Error ( 'Type is not identifiable ' + classDecl . getFullyQualifiedName ( ) ) ;
@@ -192,8 +188,6 @@ class Factory {
192188 * <dt>empty</dt><dd>return a resource instance with empty property values.</dd></dl>
193189 * @param {boolean } [options.includeOptionalFields] - if <code>options.generate</code>
194190 * is specified, whether optional fields should be generated.
195- * @param {boolean } [options.allowEmptyId] - if <code>options.allowEmptyId</code>
196- * is specified as true, a zero length string for id is allowed (allows it to be filled in later).
197191 * @return {Resource } A resource for the new transaction.
198192 */
199193 newTransaction ( ns , type , id , options ) {
@@ -224,8 +218,6 @@ class Factory {
224218 * <dt>empty</dt><dd>return a resource instance with empty property values.</dd></dl>
225219 * @param {boolean } [options.includeOptionalFields] - if <code>options.generate</code>
226220 * is specified, whether optional fields should be generated.
227- * @param {boolean } [options.allowEmptyId] - if <code>options.allowEmptyId</code>
228- * is specified as true, a zero length string for id is allowed (allows it to be filled in later).
229221 * @return {Resource } A resource for the new event.
230222 */
231223 newEvent ( ns , type , id , options ) {
0 commit comments