obj/src/persistence/IdentifiableMemoryPersistence.js
/**
     * Creates a data item.
     *
     * @param correlationId    (optional) transaction id to trace execution through call chain.
     * @param item              an item to be created.
     * @returns                a created data item.
     */
Creates a data item.
@param correlationId    (optional) transaction id to trace execution through call chain.
@param item              an item to be created.
@returns                a created data item.
Creates a data item . @param correlationId ( optional ) transaction id to trace execution through call chain . @param item an item to be created . @returns a created data item .
create(correlationId, item) {
        const _super = Object.create(null, {
            create: { get: () => super.create }
        });
        return __awaiter(this, void 0, void 0, function* () {
            if (item.id == null) {
                item = Object.assign({}, item);
                pip_services3_commons_nodex_1.ObjectWriter.setProperty(item, "id", pip_services3_commons_nodex_2.IdGenerator.nextLong());
            }
            return yield _super.create.call(this, correlationId, item);
        });
    }
create ( correlationId , item ) { const _super = Object . create ( null , { create : { get : ( ) => super . create } } ) ; return __awaiter ( this , void 0 , void 0 , function * ( ) { if ( item . id == null ) { item = Object . assign ( { } , item ) ; pip_services3_commons_nodex_1 . ObjectWriter . setProperty ( item , "id" , pip_services3_commons_nodex_2 . IdGenerator . nextLong ( ) ) ; } return yield _super . create . call ( this , correlationId , item ) ; } ) ; }
Creates a data item.
Creates a data item .
// Clone the object