code: public static UUID getUUID4Id(final long _typeId)
          throws CacheReloadException
      {
          UUID ret = null;
          final Cache<Long, Type> cache = InfinispanCache.get().<Long, Type>getCache(Type.IDCACHE);
          if (cache.containsKey(_typeId)) {
              ret = cache.get(_typeId).getUUID();
          } else {
              Connection con = null;
              try {
                  con = Context.getConnection();
                  PreparedStatement stmt = null;
                  try {
                      stmt = con.prepareStatement(Type.SQL_ID);
                      stmt.setObject(1, _typeId);
                      final ResultSet rs = stmt.executeQuery();
                      while (rs.next()) {
                          ret = UUID.fromString(rs.getString(2).trim());
                      }
                      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("Cannot read a type for an attribute.", e);
                  }
              }
          }
          return ret;
      }
docs: During the initial caching of types, the mapping does not exists but is necessary.
  @param _typeId id of the type the UUID is wanted for
  @return id of the type
  @throws CacheReloadException on error