public ActiveMQTopic toActiveMQTopic(List<TopicExpressionType> topics)
      throws InvalidTopicException {
    if (topics == null || topics.size() == 0) {
      return null;
    }
    int size = topics.size();
    ActiveMQTopic childrenDestinations[] = new ActiveMQTopic[size];
    for (int i = 0; i < size; i++) {
      childrenDestinations[i] = toActiveMQTopic(topics.get(i));
    }

    ActiveMQTopic topic = new ActiveMQTopic();
    topic.setCompositeDestinations(childrenDestinations);
    return topic;
  }
 public TopicExpressionType toTopicExpression(ActiveMQTopic topic) {
   return toTopicExpression(topic.getPhysicalName());
 }