Put a new, {@link DbEntityState#TRANSIENT} object into the cache.

@param e the object to put into the cache
339254
public void putTransient(DbEntity e) {
    CachedDbEntity cachedDbEntity = new CachedDbEntity();
    cachedDbEntity.setEntity(e);
    cachedDbEntity.setEntityState(TRANSIENT);
    putInternal(cachedDbEntity);
  }
987989
public void add(E e) {
    // resize when needed
    if(size + 1 > queue.length) {
      resize(size + 1);
    }
    // final int pos = size;
    this.size += 1;
    heapifyUp(size - 1, e);
    heapModified();
  }
872365
public Key put(Transaction transaction, Entity entity) {
		return datastore.put(transaction, entity);
	}
750818
public int insert(Entity record) throws SQLException {
		Connection conn = null;
		try {
			conn = this.getConnection();
			return runner.insert(conn, record);
		} catch (SQLException e) {
			throw e;
		} finally {
			this.closeConnection(conn);
		}
	}
232818
@Override
  public <T> void insert(Collection<? extends T> batchToSave, Class<T> entityClass) {
    insert(batchToSave, Util.determineCollectionName(entityClass));
  }
461992
@SuppressWarnings("unchecked")
  public <E> E update(E entity) {
    try {
      entityManager.executeEntityListeners(CallbackType.PRE_UPDATE, entity);
      Intent intent = (nativeWriter instanceof Batch) ? Intent.BATCH_UPDATE : Intent.UPDATE;
      Entity nativeEntity = (Entity) Marshaller.marshal(entityManager, entity, intent);
      nativeWriter.update(nativeEntity);
      E updatedEntity = (E) Unmarshaller.unmarshal(nativeEntity, entity.getClass());
      entityManager.executeEntityListeners(CallbackType.POST_UPDATE, updatedEntity);
      return updatedEntity;
    } catch (DatastoreException exp) {
      throw DatastoreUtils.wrap(exp);
    }

  }
1223917
public void putEntity(Entity entity) {
        Assert.isTrue(entity.hasTableName(), "Expecting a table name for the entity: " + entity.getName());
        Assert.isTrue(!hasEntityBySchemaAndTableName(entity.getTable().getSchemaName(), entity.getTable().getName()), "Entity was already added!: " + entity.getTableName());
        currentEntitiesByTableName.put(entity.getTable().getName().toUpperCase(), entity);
        currentEntitiesBySchemaAndTableName.put(entity.getTable().asKeyForMap(), entity);
    }
1176027
@Transactional()
    public E add(E entity)
    {
        getSqlSession().insert(getMapId(ADD_MAP_ID), entity);
        return entity;
    }
496498
@Override
	public synchronized Object putIfAbsent(Object key, Object value) {		
		Cache cache = manager.getCache(ehcacheConf.getPredefinedCacheName());
		if (!cache.isKeyInCache(key)){
			Element element = new Element(key, value);
			cache.put(element);
		}
		Element e = (Element)cache.get(key);
		return e.getObjectValue();

	}
1272214
public void setDeleted(DbEntity dbEntity) {
    CachedDbEntity cachedEntity = getCachedEntity(dbEntity);
    if(cachedEntity != null) {
      if(cachedEntity.getEntityState() == TRANSIENT) {
        cachedEntity.setEntityState(DELETED_TRANSIENT);

      } else if(cachedEntity.getEntityState() == PERSISTENT){
        cachedEntity.setEntityState(DELETED_PERSISTENT);

      } else if(cachedEntity.getEntityState() == MERGED){
        cachedEntity.setEntityState(DELETED_MERGED);
      }
    } else {
      // put a deleted merged into the cache
      CachedDbEntity cachedDbEntity = new CachedDbEntity();
      cachedDbEntity.setEntity(dbEntity);
      cachedDbEntity.setEntityState(DELETED_MERGED);
      putInternal(cachedDbEntity);

    }
  }
928747
public void put(String beanName, Class<?> clazz, Method method,
			ApplicationContext context) {
		MethodInfo info = new MethodInfo(clazz, context, beanName, method);
		this.cache.put(new Key(beanName, method.getName()), info);
	}
1123347
public void setCache(String cacheName, String cacheKey, Object object) {
        Cache cache = cacheManager.getCache(cacheName);
        if (cache == null) {
            return;
        }
        cache.put(new Element(cacheKey, object));
    }
1319328
@Override
	public void addExtraState(EntityEntryExtraState extraState) {
		if ( next == null ) {
			next = extraState;
		}
		else {
			next.addExtraState( extraState );
		}
	}
727359
public List<Object> addForGeneratedKeys(Entity entity) throws SQLException {
		return db.insertForGeneratedKeys(fixEntity(entity));
	}
1260632
public boolean remove(DbEntity e) {
    Class<?> cacheKey = cacheKeyMapping.getEntityCacheKey(e.getClass());
    Map<String, CachedDbEntity> typeMap = cachedEntites.get(cacheKey);
    if(typeMap != null) {
      return typeMap.remove(e.getId()) != null;
    } else {
      return false;
    }
  }
885622
@Override
	public void put(Object entity) {
		if (entity == null) {
			throw new IllegalArgumentException("'entity' must not be [" + entity + "]");
		}
		
		if (operation != null) {
			throw new IllegalStateException("Log [" + operation + "] -> ["
					+ Log.Operation.PUT
					+ "] is not allowed: This operation must be first");
		}
		
		Key id = Keys.create(Translation.toKind(entity.getClass()), Entities.keyValue(entity));
		Entity e = datastore.get(local, id);
		
		if (e != null) {
			throw new EntityExistsException(id);
		}
		
		this.entity = entity;
		operation = Log.Operation.PUT;
	}
315619
public int insertOrUpdate(Entity record, String... keys) throws SQLException {
		Connection conn = null;
		try {
			conn = this.getConnection();
			return runner.insertOrUpdate(conn, record, keys);
		} catch (SQLException e) {
			throw e;
		} finally {
			this.closeConnection(conn);
		}
	}