code: protected static long getId4UUID(final UUID _typeUUID)
          throws CacheReloadException
      {
          long ret = 0;
          final Cache<UUID, Type> cache = InfinispanCache.get().<UUID, Type>getCache(Type.UUIDCACHE);
          if (cache.containsKey(_typeUUID)) {
              ret = cache.get(_typeUUID).getId();
          } else {
              Connection con = null;
              try {
                  con = Context.getConnection();
                  PreparedStatement stmt = null;
                  try {
                      stmt = con.prepareStatement(Type.SQL_UUID);
                      stmt.setObject(1, _typeUUID.toString());
                      final ResultSet rs = stmt.executeQuery();
                      while (rs.next()) {
                          ret = rs.getLong(1);
                      }
                      rs.close();
                  } finally {
                      if (stmt != null) {
                          stmt.close();
                      }
                  }
                  con.commit();
              } catch (final SQLException e) {
                  throw new CacheReloadException("could not read child type ids", e);
              } catch (final EFapsException e) {
                  throw new CacheReloadException("could not read child type ids", e);
              } finally {
                  try {
                      if (con != null && !con.isClosed()) {
                          con.close();
                      }
                  } catch (final SQLException e) {
                      throw new CacheReloadException("could not read child type ids", e);
                  }
              }
          }
          return ret;
      }
docs: During the initial caching of types, the mapping does not exists but is necessary.
  @param _typeUUID UUID of the type the id is wanted for
  @return id of the type
  @throws CacheReloadException on error