Examples of Database


Examples of org.geoserver.importer.Database

        // grab the workspace
        Catalog catalog = geoServer.getCatalog();
        WorkspaceInfo ws = findWorkspace(wsName, catalog);

        // create the import data
        Database db = new Database(hack(obj));
        return doImport(db, ws);
    }
View Full Code Here

Examples of org.gephi.io.importer.api.Database

        return EdgeListPanel.createValidationPanel(panel);
    }

    public void unsetup(boolean update) {
        if (update) {
            Database database = panel.getSelectedDatabase();
            importer.setDatabase(database);
        }
        panel = null;
        importer = null;
    }
View Full Code Here

Examples of org.h2.engine.Database

            Properties p = new Properties();
            String userName =  getUser();
            p.setProperty("user", userName);
            p.setProperty("password", getPassword());
            ConnectionInfo ci = new ConnectionInfo("jdbc:h2:" + testDatabase + ";FILE_LOCK=NO;TRACE_LEVEL_FILE=0", p);
            Database database = new Database(ci, null);
            // close the database
            Session session = database.getSystemSession();
            session.prepare("shutdown immediately").update();
            database.removeSession(null);
            // everything OK - return
            return;
        } catch (DbException e) {
            SQLException e2 = DbException.toSQLException(e);
            int errorCode = e2.getErrorCode();
            if (errorCode == ErrorCode.WRONG_USER_OR_PASSWORD) {
                return;
            } else if (errorCode == ErrorCode.FILE_ENCRYPTION_ERROR_1) {
                return;
            }
            e.printStackTrace(System.out);
        } catch (Exception e) {
            // failed
            int errorCode = 0;
            if (e instanceof SQLException) {
                errorCode = ((SQLException) e).getErrorCode();
            }
            if (errorCode == ErrorCode.WRONG_USER_OR_PASSWORD) {
                return;
            } else if (errorCode == ErrorCode.FILE_ENCRYPTION_ERROR_1) {
                return;
            }
            e.printStackTrace(System.out);
        }
        System.out.println("begin ------------------------------ " + writeCount);
        try {
            Recover.execute(fileName.substring(0, fileName.lastIndexOf('/')), null);
        } catch (SQLException e) {
            // ignore
        }
        testDatabase += "X";
        try {
            IOUtils.copy(fileName, testDatabase + Constants.SUFFIX_PAGE_FILE);
            // avoid using the Engine class to avoid deadlocks
            Properties p = new Properties();
            ConnectionInfo ci = new ConnectionInfo("jdbc:h2:" + testDatabase + ";FILE_LOCK=NO", p);
            Database database = new Database(ci, null);
            // close the database
            database.removeSession(null);
        } catch (Exception e) {
            int errorCode = 0;
            if (e instanceof DbException) {
                e = ((DbException) e).getSQLException();
                errorCode = ((SQLException) e).getErrorCode();
View Full Code Here

Examples of org.hibernate.metamodel.relational.Database

  public MetadataImpl(MetadataSources metadataSources, Options options) {
    this.serviceRegistry =  metadataSources.getServiceRegistry();
    this.options = options;
    this.identifierGeneratorFactory = serviceRegistry.getService( MutableIdentifierGeneratorFactory.class );
        //new DefaultIdentifierGeneratorFactory( dialect );
    this.database = new Database( options );

    this.mappingDefaults = new MappingDefaultsImpl();

    final MetadataSourceProcessor[] metadataSourceProcessors;
    if ( options.getMetadataSourceProcessingOrder() == MetadataSourceProcessingOrder.HBM_FIRST ) {
View Full Code Here

Examples of org.jcouchdb.db.Database

  }

  public void publishViews( @Nonnull String dbName ) throws URISyntaxException, IOException {
    CouchDBUpdater updater = new CouchDBUpdater();
    updater.setCreateDatabase( false );
    updater.setDatabase( new Database( server, dbName ) );

    try {
      URL resource = getViewResource();
      if ( resource == null ) {
        return;
View Full Code Here

Examples of org.jenkinsci.plugins.database.Database

    private static final Logger LOG = Logger.getLogger(JenkowEngine.class.getName());
  private static ProcessEngine engine;
 
  public static ProcessEngine getEngine(){
    if (engine == null){
      Database ec = JenkowBuilder.descriptor().getDatabase();
      LOG.info("engineConfig="+ec);

      ProcessEngineConfiguration cfg;
      // context for *all* processes. available in exppressions and scripts in the process.
      Map<Object,Object> ctxBeans = new HashMap<Object,Object>();
      ctxBeans.put("log",LOG);
     
      if (ec instanceof H2DemoDatabase) {
        cfg = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration();
                // we will be sharing this database with Activiti Explorer, so don't force re-creation of the whole DB
                // and honor what's already there
                cfg.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
      } else {
        cfg = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
       
        Mailer.DescriptorImpl md = Mailer.descriptor();
             System.out.println("mailer config");
        System.out.println("md.getSmtpServer()     -> "+md.getSmtpServer());
        System.out.println("md.getDefaultSuffix()  -> "+md.getDefaultSuffix());
        System.out.println("md.getReplyToAddress() -> "+md.getReplyToAddress());
        System.out.println("md.getSmtpPort()       -> "+md.getSmtpPort());
       
        // set database config
                try {
                    cfg.setDataSource(ec.getDataSource());
                } catch (SQLException e) {
                    throw new Error(e); // TODO: what's the error handling strategy in this method?
                }

                // set other engine config
View Full Code Here

Examples of org.jfx4ee.adm4ee.business.configuration.entity.Database

            assertEquals("WebTest", app.getName());

            List<Database> databases = domain.getDatabases();
            assertNotNull(databases);

            Database db = databases.get(0);
            assertEquals("Master", db.getName());

            String pingAction = db.getPingAction();
            assertEquals("ping", pingAction.toLowerCase());

            Map<String, String> properties = db.getProperties();
            assertNotNull(properties);
            String dburl = properties.get("url");
            assertNotNull(dburl);
            assertEquals("APP", properties.get("username"));
View Full Code Here

Examples of org.lealone.engine.Database

        if (distinct) {
            if (distinctRows != null) {
                ValueArray array = ValueArray.get(values);
                distinctRows.put(array, values);
                rowCount = distinctRows.size();
                Database db = session.getDatabase();
                if (rowCount > db.getSettings().maxMemoryRowsDistinct && db.isPersistent() && !db.isReadOnly()) {
                    external = new ResultTempTable(session, sort);
                    rowCount = external.addRows(distinctRows.values());
                    distinctRows = null;
                }
            } else {
                rowCount = external.addRow(values);
            }
            return;
        }
        rows.add(values);
        rowCount++;
        if (rows.size() > maxMemoryRows && session.getDatabase().isPersistent()) {
            if (external == null) {
                if (randomAccess) {
                    Database db = session.getDatabase();
                    if (!db.isReadOnly()) {
                        external = new ResultTempTable(session, sort);
                    }
                } else {
                    external = new ResultDiskBuffer(session, sort, values.length);
                }
View Full Code Here

Examples of org.melonbrew.fe.database.Database

        }
    }

    @EventHandler
    public void onPlayerQuit(PlayerQuitEvent event) {
        Database database = plugin.getFeDatabase();

        Player player = event.getPlayer();

        Account account = database.getCachedAccount(player.getName(), player.getUniqueId().toString());

        if (account != null) {
            account.save(account.getMoney());

            database.removeCachedAccount(account);
        }
    }
View Full Code Here

Examples of org.molgenis.framework.db.Database

  {
    // System.out.println("FrontControllerAuthenticator LOGIN called");
    try
    {

      Database db = request.getDatabase();

      if (db.getLogin().isAuthenticated())
      {
        return LoginStatus.ALREADY_LOGGED_IN;
      }

      // try to login
      boolean loggedIn = db.getLogin().login(db, username, password);

      // System.out.println("FrontControllerAuthenticator loggedIn: " +
      // loggedIn);

      if (loggedIn)
      {
        // TODO: Missing redirect???
        // Login login = new
        // org.molgenis.auth.DatabaseLogin(request.getDatabase(),
        // "ClusterDemo");

        // store login in session
        request.getRequest().getSession().setAttribute("login", db.getLogin());
        return LoginStatus.SUCCESSFULLY_LOGGED_IN;
      }
      else
      {
        return LoginStatus.AUTHENTICATION_FAILURE;
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.