public boolean isPersistent(DbEntity dbEntity) {
    CachedDbEntity cachedDbEntity = getCachedEntity(dbEntity);
    if(cachedDbEntity == null) {
      return false;
    } else {
      return cachedDbEntity.getEntityState() == PERSISTENT;
    }
  }
public boolean isPersistent ( DbEntity dbEntity ) { CachedDbEntity cachedDbEntity = getCachedEntity ( dbEntity ) ; if ( cachedDbEntity == null ) { return false ; } else { return cachedDbEntity . getEntityState ( ) == PERSISTENT ; } }
Allows checking whether the provided entity is present in the cache
and is {@link DbEntityState#PERSISTENT}.

@param dbEntity the entity to check
@return true if the provided entity is present in the cache and is
{@link DbEntityState#PERSISTENT}.