public TemplateAssociationsVo getTemplateAssociation(TemplateBoRefVo templateID)
      throws DomainInterfaceException {
    if (templateID == null) throw new CodingRuntimeException("Can not search on null user");

    DomainFactory factory = getDomainFactory();
    return TemplateAssociationsVoAssembler.create(
        TemplateAssociations.getTemplateAssociationsFromTemplate(
            factory, templateID.getID_TemplateBo()));
  }
  public TemplateAssociationsVo saveTemplateAssociations(TemplateAssociationsVo templateAssociation)
      throws DomainInterfaceException, StaleObjectException, ForeignKeyViolationException,
          UniqueKeyViolationException {
    if (!templateAssociation.isValidated())
      throw new DomainRuntimeException("TempalteAssociationsVo has not been validated");

    DomainFactory factory = getDomainFactory();

    TemplateAssociations domTemplateAssociations =
        TemplateAssociationsVoAssembler.extractTemplateAssociations(factory, templateAssociation);

    try {
      factory.save(domTemplateAssociations);
    } catch (UnqViolationUncheckedException exception) {
      throw new UniqueKeyViolationException(
          "Template Association already exists for this template.", exception);
    }

    return TemplateAssociationsVoAssembler.create(domTemplateAssociations);
  }