/**
   * Inserta un registro.
   *
   * @param inTproc Object - Objeto procesado
   * @throws PersistenciaException - capa de persistencia
   * @return Object - identificador de objeto
   */
  public Object insert(Object Par_Ldap) throws PersistenciaException {
    PreparedStatement stmt = null;
    Connection connection = null;
    StringBuffer sqlString = new StringBuffer();
    Par_LdapTO Par_LdapTO = (Par_LdapTO) Par_Ldap;
    int i = 0;
    Long sequence = new Long(0);
    sqlString.append(" INSERT INTO siga_parametros.Par_Ldap ");
    sqlString.append("    (ldap_id ");
    sqlString.append("    ,ldap_ip ");
    sqlString.append("    ,ldap_puerto");
    sqlString.append("    ,ldap_basedn");
    sqlString.append("    ,ldap_usuario ");
    sqlString.append("    ,ldap_administrador ");
    sqlString.append("    ,ldap_password ");

    sqlString.append(" )VALUES (?,?,?,?,?,?,?) ");
    try {
      synchronized (this) {
        connection = super.getConnection(this.objDataSession);
        sequence = getNextSequential("Par_Ldap", "PAR_ID", connection);
        Par_LdapTO.setAttribute(Par_LdapTO.LDAP_ID, sequence);
        stmt = connection.prepareStatement(sqlString.toString());
        i = 1;
        setLong(stmt, (Long) Par_LdapTO.getAttribute(Par_LdapTO.LDAP_ID), i++);
        setString(stmt, (String) Par_LdapTO.getAttribute(Par_LdapTO.LDAP_IP), i++);
        setString(stmt, (String) Par_LdapTO.getAttribute(Par_LdapTO.LDAP_PUERTO), i++);
        setString(stmt, (String) Par_LdapTO.getAttribute(Par_LdapTO.LDAP_BASEDN), i++);
        setString(stmt, (String) Par_LdapTO.getAttribute(Par_LdapTO.LDAP_USUARIO), i++);
        setString(stmt, (String) Par_LdapTO.getAttribute(Par_LdapTO.LDAP_ADMINISTRADOR), i++);
        setString(stmt, (String) Par_LdapTO.getAttribute(Par_LdapTO.LDAP_PASSWORD), i++);

        stmt.executeUpdate();
      }
      return "Ok";
    } catch (SQLException ex) {
      System.err.println("error Par_LdapDAO.insert: " + ex.toString());
      throw new PersistenciaException(ex.getMessage(), ex);
    } finally {
      try {
        super.cerrarConexiones(connection, stmt, null, this.objDataSession);
      } catch (Exception ex) {
        ex.printStackTrace();
      }
    }
  }