本文整理汇总了Java中org.hsqldb.util.DatabaseManagerSwing类的典型用法代码示例。如果您正苦于以下问题:Java DatabaseManagerSwing类的具体用法?Java DatabaseManagerSwing怎么用?Java DatabaseManagerSwing使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DatabaseManagerSwing类属于org.hsqldb.util包,在下文中一共展示了DatabaseManagerSwing类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: quickDownload
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
/**
* Quick download.
*
* @param arg
* the arg
* @param toDate
* the to date
* @param fromDate
* the from date
* @param host
* the host
* @throws UNISoNException
* the UNI so n exception
*/
private void quickDownload(final String arg, final Date toDate, final Date fromDate,
final String host) throws UNISoNException {
final UNISoNController instance = UNISoNController.getInstance();
final Set<NewsGroup> listNewsgroups = instance.listNewsgroups(arg, host,
instance.getNntpReader().getClient());
// HibernateHelper.generateSchema();
try {
instance.quickDownload(listNewsgroups, fromDate, toDate, this, DownloadMode.BASIC);
}
catch (final UNISoNException e) {
UNISoNCLI.logger.fatal("Error downloading messages", e);
}
DatabaseManagerSwing.main(HibernateHelper.GUI_ARGS);
}
示例2: start
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
public void start() {
if (debug) {
final Runnable r = new Runnable() {
@Override
public void run() {
System.out.println("LAUNCHING HSQL DBMANAGERSWING");
final String[] args = { "--user", "SA", "--url", datasourceUrl };
try {
DatabaseManagerSwing.main(args);
} catch (final Exception e) {
System.out.println("Could not start hsqldb database manager GUI: " + e.getMessage());
}
}
};
thread = new Thread(r);
thread.start();
}
}
示例3: getDataSource
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
@Bean(destroyMethod = "close")
public DataSource getDataSource(LavagnaEnvironment env) throws URISyntaxException {
HikariDataSource dataSource = new HikariDataSource();
dataSource.setDriverClassName(getDriveClassName(env.getRequiredProperty("datasource.dialect")));
if (env.containsProperty("datasource.url") && //
env.containsProperty("datasource.username")) {
urlAndCredentials(dataSource, env);
} else {
urlWithCredentials(dataSource, env);
}
if (System.getProperty("startDBManager") != null) {
System.setProperty("java.awt.headless", "false");
DatabaseManagerSwing.main(new String[] { "--url", "jdbc:hsqldb:mem:lavagna", "--noexit" });
}
return dataSource;
}
示例4: runDatabaseManager
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
/**
* Run hsqldb explorer.
*/
private static void runDatabaseManager() {
if (DEBUG_DB) {
System.setProperty("java.awt.headless", "false");
DatabaseManagerSwing.main(new String[] { "--url", "jdbc:hsqldb:mem:dbtest", "-noexit" });
}
}
示例5: dbManagerSetup
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
/**
* HSQLDB database manager voor dev.
* @param dataSourceUrl datasource url
* @param userName username
* @return null
*/
@Bean
@Profile("utils")
public Void dbManagerSetup(@Value("${spring.datasource.url}") String dataSourceUrl,
@Value("${spring.datasource.username}") String userName) {
DatabaseManagerSwing.main(
new String[] { "--url", dataSourceUrl, "--user", userName, "--password", ""});
return null;
}
示例6: main
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
public static void main(String[] args) {
System.out.println("Launching manager");
DatabaseManagerSwing.main(new String[] {
"--url", "jdbc:hsqldb:file:db-data/mydatabase", "--noexit"});
}
示例7: executeMojo
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
/** Executes the Mojo **/
public void executeMojo() throws MojoExecutionException, MojoFailureException {
if (help != null) {
printUsage();
}
else {
ArrayList argList = new ArrayList();
// handles the case when the user specifies an empty string for driver
// in that case driver gets the value 'true'
if (StringUtils.hasText(driver) && !driver.equals("true")) {
argList.add("-driver");
argList.add(driver);
}
// handles the case when the user specifies an empty string for driver
// in that case url gets the value 'true'
if (StringUtils.hasText(url) && !url.equals("true")) {
argList.add("-url");
argList.add(url);
}
if (StringUtils.hasText(user)) {
argList.add("-user");
argList.add(user);
}
if (StringUtils.hasText(password)) {
argList.add("-password");
argList.add(password);
}
// create the arguments array
String[] args = new String[argList.size()];
argList.toArray(args);
PluginLog.getLog().info("Starting HSQLDB viewer with arguments: " + argList);
// start the viewer and sleep forever
DatabaseManagerSwing.main(args);
try {
Thread.currentThread().sleep(Long.MAX_VALUE);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
示例8: HsqlDatabaseManagerSwingTask
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
public HsqlDatabaseManagerSwingTask(String url) {
super(DatabaseManagerSwing.class.getCanonicalName());
this.url = url;
this.args = new String[]{"--url", url, "--noexit"};
}
示例9: getDbManager
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
@PostConstruct
public void getDbManager() throws SQLException{
DatabaseManagerSwing manager = new DatabaseManagerSwing();
manager.main();
manager.start();
}
示例10: main
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
public static void main(String[] args) {
EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("sequence");
try {
Connection connection = ConventionUtils.getConnection(entityManagerFactory);
DatabaseManagerSwing manager = new DatabaseManagerSwing();
manager.main();
manager.connect(connection);
manager.start();
} finally {
entityManagerFactory.close();
}
}
示例11: startDBManager
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
@PostConstruct
public void startDBManager() {
//hsqldb
DatabaseManagerSwing.main(new String[] { "--url", "jdbc:hsqldb:mem:testdb", "--user", "sa", "--password", "" });
//derby
//DatabaseManagerSwing.main(new String[] { "--url", "jdbc:derby:memory:testdb", "--user", "", "--password", "" });
//h2
//DatabaseManagerSwing.main(new String[] { "--url", "jdbc:h2:mem:testdb", "--user", "sa", "--password", "" });
}
示例12: main
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
/**
* This opens up a SQL client to access the database directly.
*
* @param args
* the arguments
*/
public static void main(final String[] args) {
final HibernateHelper helper = new HibernateHelper(null);
helper.generateSchema();
DatabaseManagerSwing.main(HibernateHelper.GUI_ARGS);
}
示例13: showDBclientMenuItemActionPerformed
import org.hsqldb.util.DatabaseManagerSwing; //导入依赖的package包/类
/**
* Show d bclient menu item action performed.
*
* @param evt
* the evt
*/
private void showDBclientMenuItemActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_showDBclientMenuItemActionPerformed
DatabaseManagerSwing.main(UNISoNTabbedFrame.GUI_ARGS);
}