_getRef(userOrRole) {
    if (typeof userOrRole !== 'string') {
      userOrRole = userOrRole._metadata.id;
    }

    if (userOrRole.indexOf('/db/User/') == 0 || userOrRole.indexOf('/db/Role/') == 0) {
      return userOrRole;
    }

    throw new TypeError('The given object isn\'t a user, role or a valid reference.');
  }
/**
   * Resolves user and role references and validate given references
   * @param {model.User|model.Role|string} userOrRole The user, role or reference
   * @return {string} The resolved and validated reference
   * @private
   */
Resolves user and role references and validate given references
@param {model.User|model.Role|string} userOrRole The user, role or reference
@return {string} The resolved and validated reference
@private
Resolves user and role references and validate given references @param { model . User|model . Role|string } userOrRole The user role or reference @return { string } The resolved and validated reference @private
_getRef(userOrRole) {
    if (typeof userOrRole !== 'string') {
      userOrRole = userOrRole._metadata.id;
    }
    if (userOrRole.indexOf('/db/User/') == 0 || userOrRole.indexOf('/db/Role/') == 0) {
      return userOrRole;
    }
    throw new TypeError('The given object isn\'t a user, role or a valid reference.');
  }
_getRef ( userOrRole ) { if ( typeof userOrRole !== 'string' ) { userOrRole = userOrRole . _metadata . id ; } if ( userOrRole . indexOf ( '/db/User/' ) == 0 || userOrRole . indexOf ( '/db/Role/' ) == 0 ) { return userOrRole ; } throw new TypeError ( 'The given object isn\'t a user, role or a valid reference.' ) ; }
Resolves user and role references and validate given references
 @param {model.User|model.Role|string} userOrRole The user, role or reference
 @return {string} The resolved and validated reference
 @private
Resolves user and role references and validate given references @param { model . User|model . Role|string } userOrRole The user role or reference @return { string } The resolved and validated reference @private