public Set<String> getEventTypeNameUsedBy(String name) {
   Set<String> statements = statementEventTypeRef.getStatementNamesForType(name);
   if ((statements == null) || (statements.isEmpty())) {
     return Collections.emptySet();
   }
   return Collections.unmodifiableSet(statements);
 }
  public boolean removeEventType(String name, boolean force) throws ConfigurationException {
    if (!force) {
      Set<String> statements = statementEventTypeRef.getStatementNamesForType(name);
      if ((statements != null) && (!statements.isEmpty())) {
        throw new ConfigurationException(
            "Event type '" + name + "' is in use by one or more statements");
      }
    }

    EventType type = eventAdapterService.getExistsTypeByName(name);
    if (type == null) {
      return false;
    }

    eventAdapterService.removeType(name);
    statementEventTypeRef.removeReferencesType(name);
    filterService.removeType(type);
    return true;
  }