Gets the identifier value from a neo4j {@link Entity}.

@param entity The neo4j {@link Entity}.
@return The neo4j {@link Entity} identifier.
338776
@Override
    public Long get(Entity entity) {
        Objects.requireNonNull(entity, "entity cannot be null");
        // return property value
        return entity.get(idFieldName).asLong();
    }
137459
private function getEntityIdentifierValue($entity)
    {
        $entityMetaData = $this->entityManager->getEntityMetadataRegister()->getEntityMetadata($entity);

        return $entityMetaData ? $entityMetaData->getIdentifierValue() : null;
    }
1089291
protected Object getId(Object entity, EntityMetadata metadata)
    {
        try
        {
            return PropertyAccessorHelper.getId(entity, metadata);
        }
        catch (PropertyAccessException e)
        {
            log.error("Error while Getting ID for entity {}, Caused by: {}.", entity, e);
            throw new EntityReaderException("Error while Getting ID for entity " + entity, e);
        }

    }
949240
public <T> Key<T> getKey(final T entity) {
        T unwrapped = entity;
        if (unwrapped instanceof ProxiedEntityReference) {
            final ProxiedEntityReference proxy = (ProxiedEntityReference) unwrapped;
            return (Key<T>) proxy.__getKey();
        }

        unwrapped = ProxyHelper.unwrap(unwrapped);
        if (unwrapped instanceof Key) {
            return (Key<T>) unwrapped;
        }

        final Object id = getId(unwrapped);
        final Class<T> aClass = (Class<T>) unwrapped.getClass();
        return id == null ? null : new Key<T>(aClass, getCollectionName(aClass), id);
    }
224140
public static Class getReferentClass(final Object entity) {
        if (isProxy(entity)) {
            return asProxy(entity).__getReferenceObjClass();
        } else {
            return entity != null ? entity.getClass() : null;
        }
    }
863407
public function getEntityId($entity)
    {
        $className = get_class($entity);

        if (!isset($this->idAccessorFunctions[$className]["getter"])) {
            if (!$this->hasId($entity)) {
                throw new OrmException("No Id getter registered for class $className");
            }

            $this->registerReflectionIdAccessors($className, 'id');
        }

        try {
            return call_user_func($this->idAccessorFunctions[$className]["getter"], $entity);
        } catch (ReflectionException $e) {
            throw new OrmException("Failed to get entity Id\n" . $e->getMessage(), 0, $e);
        }
    }
1239494
public String getCollectionName(Object entity) {
        if (entity == null) {
            return null;
        }

        return getCollectionName(entity.getClass());
    }
257436
public Node getNodeFromEntity(Object entity, Object key, GraphDatabaseService graphDb, EntityMetadata m,
            boolean isUpdate)
    {

        // Construct top level node first, making sure unique ID in the index
        Node node = null;
        if (!isUpdate)
        {
            node = getOrCreateNodeWithUniqueFactory(entity, key, m, graphDb);
        }
        else
        {

            node = searchNode(key, m, graphDb, true);
        }

        if (node != null)
        {
            populateNodeProperties(entity, m, node);
        }

        return node;
    }
283544
protected <T> String resolveApitraryEntity(T entity) {
		String entityName = ClassUtil.getClassAnnotationValue(entity.getClass(), Entity.class, "value", String.class);
		if (entityName == null || entityName.isEmpty()) {
			entityName = StringUtil.toVerb(entity.getClass().getSimpleName());
		}
		return entityName;
	}
968271
public void trySetIdentity(Object entity, String id) {
        Class<?> entityType = entity.getClass();
        Field identityProperty = _conventions.getIdentityProperty(entityType);

        if (identityProperty == null) {
            return;
        }

        setPropertyOrField(identityProperty.getType(), entity, identityProperty, id);
    }
1011483
private function getIdentifierValues($entity)
    {
        try {
            return $this->modelManager->getIdentifierValues($entity);
        } catch (\Exception $e) {
            throw new \InvalidArgumentException(sprintf('Unable to retrieve the identifier values for entity %s', \get_class($entity)), 0, $e);
        }
    }
48000
public static Object keyValue(Object entity) {
		Class<?> clazz = entity.getClass();
		Field key = fields.get(clazz);
		
		try {
			if (key == null) {
				return keyField(clazz).get(entity);
			} else {
				return key.get(entity);
			}
			
		} catch (IllegalAccessException e) {
			throw new UncheckedException(e);
		}
	}
1055971
public EntityMakerBuilder reuseEntity(Serializable entity) {
        Class aClass = entity.getClass();
        valueHolder.putIfNotNull(aClass, entity);
        return this;
    }
547827
private Entities toEntities(final JsonNode node, String text) throws IOException {
		if (null == node || node.isNull() || node.isMissingNode()) {
			return null;
		}
		final ObjectMapper mapper = this.createMapper();
		Entities entities = mapper.readerFor(Entities.class).readValue(node);
		extractTickerSymbolEntitiesFromText(text, entities);
		return entities;
	}
393425
@FFDCIgnore(Exception.class)
    public List<String> getEntityType(String entity) {

        if (isSafRegistry()) {
            try {
                if (userRegistry.isValidUser(entity)) {
                    List<String> returnValue = new ArrayList<String>();
                    returnValue.add(SchemaConstants.DO_PERSON_ACCOUNT);
                    returnValue.add(userRegistry.getUserSecurityName(entity)); // Handle SAF tokens.
                    return returnValue;
                }
            } catch (Exception e) {
                /* Ignore. */
            }

            try {
                if (userRegistry.isValidGroup(entity)) {
                    List<String> returnValue = new ArrayList<String>();
                    returnValue.add(SchemaConstants.DO_GROUP);
                    returnValue.add(userRegistry.getGroupSecurityName(entity)); // Handle SAF tokens.
                    return returnValue;
                }
            } catch (Exception e) {
                /* Ignore. */
            }
        } else {
            try {
                SearchResult result = userRegistry.getUsers(entity, 1);
                if (result != null && result.getList().size() > 0) {
                    List<String> returnValue = new ArrayList<String>();
                    returnValue.add(SchemaConstants.DO_PERSON_ACCOUNT);
                    returnValue.add(entity);
                    return returnValue;
                }
            } catch (Exception e) {
                /* Ignore. */
            }

            try {
                SearchResult result = userRegistry.getGroups(entity, 1);
                if (result != null && result.getList().size() > 0) {
                    List<String> returnValue = new ArrayList<String>();
                    returnValue.add(SchemaConstants.DO_GROUP);
                    returnValue.add(entity);
                    return returnValue;
                }
            } catch (Exception e) {
                /* Ignore. */
            }

            try {
                String result = userRegistry.getUserSecurityName(entity);
                if (result != null) {
                    List<String> returnValue = new ArrayList<String>();
                    returnValue.add(SchemaConstants.DO_PERSON_ACCOUNT);
                    returnValue.add(result);
                    return returnValue;
                }
            } catch (Exception e) {
                /* Ignore. */
            }

            try {
                String result = userRegistry.getGroupSecurityName(entity);
                if (result != null) {
                    List<String> returnValue = new ArrayList<String>();
                    returnValue.add(SchemaConstants.DO_GROUP);
                    returnValue.add(result);
                    return returnValue;
                }
            } catch (Exception e) {
                /* Ignore. */
            }
        }

        return null;
    }
455731
public String getId(Node node) {
        String id = null;
        try {
            id = node.getIdentifier();
        } catch (RepositoryException e) {
            id = node.toString(); // use Java 'ID'
        }
        return id;
    }
783989
public static ClassName tableClassName(SQLiteDaoDefinition dao, SQLiteEntity entity) {
		String entityName = BindDataSourceSubProcessor.generateEntityQualifiedName(dao, entity);

		return TypeUtility.className(entityName + SUFFIX);

	}