Package ch.inftec.ju.db

Examples of ch.inftec.ju.db.JuDbException


          try {
            XmlOutputConverter xmlConv = new XmlOutputConverter();
            ExportBuilder.writeToXml(dataSet, xmlConv.getOutputStream());
            doc.setValue(xmlConv.getDocument());
          } catch (Exception ex) {
            throw new JuDbException("Couldn't write DB data to XML document", ex);
          }
        }
      });
     
      return doc.getValue();
View Full Code Here


           @Override
          public void execute(IDataSet dataSet) {
            try {
              ExportBuilder.writeToXml(dataSet, stream);
            } catch (Exception ex) {
              throw new JuDbException("Couldn't write DB data to byte stream", ex);
            }
          }
        });
      } catch (Exception ex) {
        throw new JuDbException("Couldn't write DB data to byte stream", ex);
      }
     
      try {
        return bos.toString("utf-8");
      } catch (Exception ex) {
View Full Code Here

           @Override
          public void execute(IDataSet dataSet) {
            try {
              ExportBuilder.writeToXml(dataSet, stream);
            } catch (Exception ex) {
              throw new JuDbException("Couldn't write DB data to file " + file, ex);
            }
          }
        });
      } catch (Exception ex) {
        throw new JuDbException("Couldn't write DB data to file " + file, ex);
      }
    }
View Full Code Here

          .setCaseSensitiveTableNames(false)
          .build(xmlUrl);
        this.dataSetUrl = xmlUrl;
        return this;
      } catch (Exception ex) {
        throw new JuDbException("Couldn't import data from XML: " + xmlUrl, ex);
      }
    }
View Full Code Here

        public void execute(IDatabaseConnection conn) {
          try {
            logger.debug("Executing Clean-Insert from: " + dataSetUrl);
            DatabaseOperation.CLEAN_INSERT.execute(conn, flatXmlDataSet);
          } catch (Exception ex) {
            throw new JuDbException("Couldn't clean and insert data into DB", ex);
          }
        }
      });
    }
View Full Code Here

        public void execute(IDatabaseConnection conn) {
          try {
            logger.debug("Executing Delete-All from: " + dataSetUrl);
            DatabaseOperation.DELETE_ALL.execute(conn, flatXmlDataSet);
          } catch (Exception ex) {
            throw new JuDbException("Couldnt truncate data in DB", ex);
          }
        };
      });
    }
View Full Code Here

        public void execute(IDatabaseConnection conn) {
          try {
            logger.debug("Executing Insert from: " + dataSetUrl);
            DatabaseOperation.INSERT.execute(conn, flatXmlDataSet);
          } catch (Exception ex) {
            throw new JuDbException("Couldnt insert data into DB", ex);
          }
        };
      });
     
    }
View Full Code Here

        public void execute(IDatabaseConnection conn) {
          try {
            logger.debug("Executing Update from: " + dataSetUrl);
            DatabaseOperation.UPDATE.execute(conn, flatXmlDataSet);
          } catch (Exception ex) {
            throw new JuDbException("Couldnt update data in DB", ex);
          }
        };
      });
     
    }
View Full Code Here

      try {
        this.dataSetUrl = xmlUrl;
        flatXmlDataSet = new FlatXmlDataSetBuilder().build(xmlUrl);
        return this;
      } catch (Exception ex) {
        throw new JuDbException("Couldn't import data from XML: xmlUrl", ex);
      }
    }
View Full Code Here

              .addTablesByDataSet(dataSetUrl, true)
              .createDataSet(conn);
           
            Assertion.assertEquals(flatXmlDataSet, dbDataSet);
          } catch (Exception ex) {
            throw new JuDbException("Couldn't assert DB data", ex);
          }
        }
       
      });
    }
View Full Code Here

TOP

Related Classes of ch.inftec.ju.db.JuDbException

Copyright © 2018 www.massapicom. 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.