Examples of XMLBeanWriter


Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

  public synchronized void save()
  {
    File prefsFile = new ApplicationFiles().getUserPreferencesFile();
    try
    {
      XMLBeanWriter wtr = new XMLBeanWriter(this);
      wtr.save(prefsFile);
    }
    catch (Exception ex)
    {
      s_log.error(s_stringMgr.getString("SquirrelPreferences.error.writing",
                        prefsFile.getPath()), ex);
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

  private File createJavaBeanDumpFile(Object obj)
    throws IOException, XMLException
  {
    File tempFile = File.createTempFile(PREFIX, SUFFIX);
    XMLBeanWriter wtr = new XMLBeanWriter(obj);
    wtr.save(tempFile);

    return tempFile;
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

          System.arraycopy(data, data.length - maxSize, reducedData, 0, maxSize);
          _sqlHistory.setData(reducedData);
        }
      }

      XMLBeanWriter wtr = new XMLBeanWriter(_sqlHistory);
      wtr.save(new ApplicationFiles().getUserSQLHistoryFile());
    }
    catch (Exception ex)
    {
      // i18n[Application.error.savesqlhistory=Unable to write SQL queries to persistant storage.]
      s_log.error(s_stringMgr.getString("Application.error.savesqlhistory"), ex);
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

   */
  private void saveCellImportExportInfo()
  {
    try
    {
      XMLBeanWriter wtr = new XMLBeanWriter(CellImportExportInfoSaver.getInstance());
      wtr.save(new ApplicationFiles().getCellImportExportSelectionsFile());
    }
    catch (Exception ex)
    {
      // i18n[Application.error.writecellselections=Unable to write Cell Import/Export options to
      // persistant storage.]
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

   */
  private void saveEditWhereColsInfo()
  {
    try
    {
      XMLBeanWriter wtr = new XMLBeanWriter(editWhereCols);
      wtr.save(new ApplicationFiles().getEditWhereColsFile());
    }
    catch (Exception ex)
    {
      // i18n[Application.error.savecolsinfo=Unable to write Edit Where Cols options to persistant
      // storage.]
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

   */
  private void saveDataTypePreferences()
  {
    try
    {
      XMLBeanWriter wtr = new XMLBeanWriter(new DTProperties());
      wtr.save(new ApplicationFiles().getDTPropertiesFile());
    }
    catch (Exception ex)
    {
      // i18n[Application.error.savedatatypeprops=Unable to write DataType properties to persistant
      // storage.]
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

    public void savePrefs() {
        if (!_initialized) {
            throw new IllegalStateException("initialize() must be called first");
        }       
        try {
            XMLBeanWriter wtr = new XMLBeanWriter(_prefs);
            wtr.save(new File(_userSettingsFolder, USER_PREFS_FILE_NAME));
        } catch (Exception ex) {
            s_log.error("Error occured writing to preferences file: "
                    + USER_PREFS_FILE_NAME, ex);
        }
    }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

         DefaultTreeModel dtm = (DefaultTreeModel) _tree.getModel();
         DefaultMutableTreeNode root = (DefaultMutableTreeNode) dtm.getRoot();

         AliasFolderState state = new AliasFolderState(root, _tree);

         XMLBeanWriter wrt = new XMLBeanWriter(state);
         wrt.save(new ApplicationFiles().getDatabaseAliasesTreeStructureFile());
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

  private File createJavaBeanDumpFile(Object obj)
    throws IOException, XMLException
  {
    File tempFile = File.createTempFile(PREFIX, SUFFIX);
    XMLBeanWriter wtr = new XMLBeanWriter(obj);
    wtr.save(tempFile);

    return tempFile;
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter

   */
  protected void save()
  {
    try
    {
      final XMLBeanWriter xmlout = new XMLBeanWriter();

      for (final Replacement rep : replacements)
      {
        xmlout.addToRoot(rep);
      }

      xmlout.save(replacementFile);
    }
    catch (final Exception e)
    {
      throw new RuntimeException(e);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.