Returns the object unique identity.

@param iPojo
User object
163281
public ORID getIdentity(final Object iPojo) {
		final ODocument record = getRecordByUserObject(iPojo, false);
		if (record == null)
			throw new OObjectNotManagedException("The object " + iPojo + " is not managed by current database");

		return record.getIdentity();
	}
727000
public static String createUniqueIdentifier() {
		String id;
		do {
			id = UUID.randomUUID().toString();
		} while (getSREFromId(id) != null);
		return id;
	}
749155
private static String getIdentityDocument(final HttpClient client) throws IOException {
    try {
      final HttpGet getInstance = new HttpGet();
      getInstance.setURI(INSTANCE_IDENTITY_URI);
      final HttpResponse response = client.execute(getInstance);
      if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
        throw new IOException("failed to get instance identity, tried: " + INSTANCE_IDENTITY_URL + ", response: " + response.getStatusLine().getReasonPhrase());
      }
      return EntityUtils.toString(response.getEntity());
    } catch (Exception e) {
      throw new IOException("failed to get instance identity", e);
    }
  }
853999
@JsonIgnore
	public String getUsername() {
		if (App.isRoot(user.getAppid())) {
			return user.getIdentifier();
		} else {
			return user.getAppid() + "/" + user.getIdentifier();
		}
	}
638809
@Override
    public IPersonAttributes getPerson(final String uid,
                                       final IPersonAttributeDaoFilter filter) {
        if (!this.isEnabled()) {
            return null;
        }
        if (uid == null) {
            throw new IllegalArgumentException("Illegal to invoke getPerson(String) with a null argument.");
        }
        return this.backingPerson;
    }
949877
private static Node checkUserIdentifier(final HttpServletRequest request,
			final ReadResponse response) {
		final String userId = request
				.getParameter(ProtocolConstants.Parameters.Read.USER_IDENTIFIER);
		if (userId != null) {
			final Node user = NeoUtils.getUserByIdentifier(userId);
			if (user != null) {
				return user;
			}
			response.userIdentifierInvalid(userId);
		} else {
			response.userIdentifierMissing();
		}

		return null;
	}
504751
private Identity identity(final String tkn) throws IOException {
        return parse(
            this.user
                .uri()
                .set(
                    URI.create(
                        new Href(PsTwitter.VERIFY_URL)
                            .with(PsTwitter.ACCESS_TOKEN, tkn)
                            .toString()
                    )
                )
                .back()
                .header("accept", "application/json")
                .fetch().as(RestResponse.class)
                .assertStatus(HttpURLConnection.HTTP_OK)
                .as(JsonResponse.class)
                .json()
                .readObject()
        );
    }
1306677
private void addObjectIdentity(final Object object) {

        if (object == null) {
            _buffer.append("null");
        } else {
            _buffer.append(object.getClass().getName());
            _buffer.append("@");
            _buffer
                    .append(Integer
                            .toHexString(System.identityHashCode(object)));
        }

    }
822098
@Override
	public int getVersion(final Object iPojo) {
		checkOpeness();
		final ODocument record = getRecordByUserObject(iPojo, false);
		if (record != null)
			return record.getVersion();

		return OObjectSerializerHelper.getObjectVersion(iPojo);
	}
137563
private Identity fetch(final String token) throws IOException {
        final String uri = new Href(this.api).path("user")
            .with(PsGithub.ACCESS_TOKEN, token).toString();
        return PsGithub.parse(
            new JdkRequest(uri)
                .header("accept", "application/json")
                .fetch().as(RestResponse.class)
                .assertStatus(HttpURLConnection.HTTP_OK)
                .as(JsonResponse.class).json().readObject()
        );
    }
1328119
protected function getExistingIdentity( UserResponseInterface $response )
    {
        $repo = $this->om->getRepository( $this->userIdentityClass );   // wrong class
        return $repo->findOneBy( array(
            'identifier' => $response->getUsername(),
            'type' => $response->getResourceOwner()->getName(),
        ));
    }
1184033
private SecurityContext getUserContext(final RepositoryObject obj) {

		final String userId = obj.getUserId();
		Principal principal = null;

		if (userId != null) {

			final App app = StructrApp.getInstance();

			try (final Tx tx = app.tx()) {

				// TODO: change this, userId is currently the name of a user,
				//       WITHOUT ANY AUTHENTICATION.
				principal = app.nodeQuery(Principal.class).and(Principal.name, userId).getFirst();
				tx.success();

			} catch (FrameworkException fex) {
				logger.warn("", fex);
			}

		} else {

			System.out.println("Object without userId!");
		}

		// return user
		if (principal != null) {
			return SecurityContext.getInstance(principal, AccessMode.Backend);
		}

		return SecurityContext.getSuperUserInstance();
	}
656809
protected String getObjectId(IPersistable object) {
        // The format of the object id is <type>/<path>/<objectName>
        String result = object.getType();
        if (object.getPath().charAt(0) != '/') {
            result += '/';
        }
        result += object.getPath();
        if (!result.endsWith("/")) {
            result += '/';
        }
        String name = object.getName();
        if (name == null) {
            name = PERSISTENCE_NO_NAME;
        }
        if (name.charAt(0) == '/') {
            // "result" already ends with a slash
            name = name.substring(1);
        }
        return result + name;
    }
729869
protected void appendIdentityHashCode(StringBuilder buffer, Object object) {
        if (this.isUseIdentityHashCode() && object != null) {
            register(object);
            buffer.append('@');
            buffer.append(Integer.toHexString(System.identityHashCode(object)));
        }
    }
72482
public JSONObject getUser(String userId, String groupId, HashMap<String, String> options) {
        AipRequest request = new AipRequest();
        preOperation(request);
        
        request.addBody("user_id", userId);
        
        request.addBody("group_id", groupId);
        if (options != null) {
            request.addBody(options);
        }
        request.setUri(FaceConsts.USER_GET);
        request.setBodyFormat(EBodyFormat.RAW_JSON);
        postOperation(request);
        return requestServer(request);
    }
573656
private Integer getUniqueId(Object object) {
    Integer id = idCache.get(object);
    if (id == null) {
      id = uidGenerator.incrementAndGet();
      Integer existing = idCache.putIfAbsent(object, id);
      if (existing != null) {
        return existing;
      }
    }
    return id;
  }
300537
public Identity getIdentity()
    {
        if(identity == null)
        {
            identity = tx.getBroker().serviceIdentity().buildIdentity(obj);
        }
        return identity;
    }