Factory method for Key-entity entries. Key-entity entries are used to identify the members of a dictionary.
@param key indexing the entity in the dictionary
@param entity a {@link QualifiedName} denoting an entity
@return an instance of {@link Entry}
320616
public Entry newEntry(Key key, QualifiedName entity) {
	Entry res = of.createEntry();
	res.setKey(key);
	res.setEntity(entity);
	return res;
    }
1344456
private void initEntityMetadata(Entity entity) {
    String kind = entity.kind();
    if (kind.trim().length() == 0) {
      kind = entityClass.getSimpleName();
    }
    entityMetadata = new EntityMetadata(entityClass, kind);
  }
284827
public CompletableFuture<Void> removeEntry(String tableName, String key) {
        log.trace("remove entry called for : {} key : {}", tableName, key);

        List<TableKey<byte[]>> keys = Collections.singletonList(new TableKeyImpl<>(key.getBytes(Charsets.UTF_8), null));
        return expectingDataNotFound(withRetries(() -> segmentHelper.removeTableKeys(
                tableName, keys, authToken.get(), RequestTag.NON_EXISTENT_ID), 
                () -> String.format("remove entry: key: %s table: %s", key, tableName)), null)
                .thenAcceptAsync(v -> log.trace("entry for key {} removed from table {}", key, tableName), executor);
    }
411030
public X getPrimaryID(T entity) {
		if(mappingContext == null || conversionService == null) {
			fetchMappingContextAndConversionService();
		}

		MongoPersistentEntity<?> persistentEntity = mappingContext.getPersistentEntity(entity.getClass());
		MongoPersistentProperty idProperty = persistentEntity.getIdProperty();
		if(idProperty == null) {
			return null;
		}
		
//		X idValue = BeanWrapper.create(entity, conversionService).getProperty(idProperty, this.primaryIDClass);
		X idValue = (X) this.mappingContext.getPersistentEntity(this.entityClass).getPropertyAccessor(entity).getProperty(idProperty);
		return idValue;
	}
62746
public static final String getTimeKey(String entity)
    {
        if ( entity == null ) {
            return null;
        }
        
        int sIdx = entity.indexOf('.');
        if ( sIdx == -1 ) {
        	return null;
        }
        
        return entity.substring(sIdx + 1);
    }
783989
public static ClassName tableClassName(SQLiteDaoDefinition dao, SQLiteEntity entity) {
		String entityName = BindDataSourceSubProcessor.generateEntityQualifiedName(dao, entity);

		return TypeUtility.className(entityName + SUFFIX);

	}
402141
protected static final <T, K extends Serializable>
    K _key2Id(
                    final Key<T> key
                    )
    {
        K  id = null;
        try {
            @SuppressWarnings( "unchecked" )
            K  obj = (K)key.getId();
            id = obj;
        } catch (Exception ex) {
            throw new RepositoryException( ex );
        }

        return id;
    }
600071
public JPAEntry getEntry(String entryKey) {
        for (JPAEntry entry : entries) {
            if (entry.getKey().equals(entryKey)) {
                return entry;
            }
        }
        return null;
    }
595790
public String getOrGenerateDocumentId(Object entity) {
        Reference<String> idHolder = new Reference<>();
        tryGetIdFromInstance(entity, idHolder);
        String id = idHolder.value;
        if (id == null) {
            // Generate the key up front
            id = _generateId.apply(entity);
        }

        if (id != null && id.startsWith("/")) {
            throw new IllegalStateException("Cannot use value '" + id + "' as a document id because it begins with a '/'");
        }
        return id;
    }
598990
public static Object initialize(EntityMetadata m, Object entity, Object id)
    {
        try
        {
            if (entity == null)
            {
                entity = createNewInstance(m.getEntityClazz());
            }
            if (id != null)
            {
                PropertyAccessorHelper.setId(entity, m, id);
            }
            return entity;
        }
        catch (Exception e)
        {
            throw new PersistenceException("Error occured while instantiating entity.", e);
        }
    }
838905
public Map.Entry<K, V> getEntry(Object key) {
    EntryImpl<K, V> entry = _entries[keyHash(key) & _mask];
    while (entry != null) {
      if (key.equals(entry._key)) { return entry; }
      entry = entry._next;
    }
    return null;
  }
1055971
public EntityMakerBuilder reuseEntity(Serializable entity) {
        Class aClass = entity.getClass();
        valueHolder.putIfNotNull(aClass, entity);
        return this;
    }
146399
public static Specification<JpaDistributionSetType> byKey(final String key) {
        return (targetRoot, query, cb) -> cb.equal(targetRoot.<String> get(JpaDistributionSetType_.key), key);
    }
1201014
private Entry getEntry(Object key)
    {
        if (key == null) return null;
        int hash = hashCode(key);
        int index = indexFor(hash);
        for (Entry entry = table[index]; entry != null; entry = entry.next)
        {
            if ((entry.hash == hash) && equals(key, entry.getKey()))
            {
                return entry;
            }
        }
        return null;
    }
1222145
public static Map<String, Object> getKeyPropertyValues(EntityType entityType, Object entity) {
        Map<String, Object> keyPropertyValues = new HashMap<>();
        for (PropertyRef propertyRef : entityType.getKey().getPropertyRefs()) {
            String propertyName = propertyRef.getPath();
            Object propertyValue = getPropertyValue(entityType.getStructuralProperty(propertyName), entity);
            keyPropertyValues.put(propertyName, propertyValue);
        }
        return keyPropertyValues;
    }
963718
public Entity newEntity(QualifiedName id) {
	Entity res = of.createEntity();
	res.setId(id);
	return res;
    }
1082736
public static Map<String, Object> serializeToMap( Object entity )
  {
    IObjectSerializer serializer = getSerializer( entity.getClass() );
    return (Map<String, Object>) serializer.serializeToMap( entity, new HashMap<Object, Map<String, Object>>() );
  }