Examples of Database


Examples of liquibase.database.Database

        // NOTE: We do not use DBReset.performDBReset() here, since DBReset deletes the schema, which requires there to
        //       be no active connections to the DB. Liquibase.dropAll(), on the other hand, just deletes all the
        //       objects in the DB, which has no such requirement.
        String dbDriver = DatabaseFactory.getInstance().findDefaultDriver(testDs.connectionUrl);
        Database database = CommandLineUtils.createDatabaseObject(DbSetupUtility.class.getClassLoader(),
            testDs.connectionUrl, testDs.userName, testDs.password, dbDriver, null, null, null);
        //Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(
        //    new JdbcConnection(AbstractEJB3Test.getConnection()));
        Liquibase liquibase = new Liquibase(null, new ClassLoaderResourceAccessor(), database);
        liquibase.dropAll();
View Full Code Here

Examples of lotus.domino.Database

      this.unid = null;
    }
    ObjectObject o = new ObjectObject(jsContext);
    try {
      if(StringUtil.isNotEmpty(id)) {
        Database database = ExtLibUtil.getCurrentDatabase();
        Vector v = new Vector();
        v.add(FORM);
        v.add(id);
        ViewEntry e = database.getView("AllSnippetsById").getEntryByKey(v);
        if(e!=null) {
          Document doc = e.getDocument();
          Properties p = new Properties();
          String props = doc.getItemValueString("Properties");
          if(StringUtil.isNotEmpty(props)) {
View Full Code Here

Examples of net.bnubot.bot.database.Database

      menu = new JMenu("Database");
      {
        menuItem = new JMenuItem("Rank editor");
        menuItem.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent event) {
            Database d = Database.getInstance();
            if(d != null)
              new DatabaseRankEditor(d);
            else
              c.recieveError("There is no database initialized.");
          } });
        menu.add(menuItem);
       
        menuItem = new JMenuItem("Account editor");
        menuItem.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent event) {
            Database d = Database.getInstance();
            if(d != null)
              new DatabaseAccountEditor(d);
            else
              c.recieveError("There is no database initialized.");
          } });
View Full Code Here

Examples of net.hasor.db.ar.support.DataBase

@ContextConfiguration(value = "net/test/simple/db/jdbc-config.xml", loadModules = OneDataSourceWarp.class)
public class ARTest implements AppContextAware {
    private DataBase dataBase = null;
    @Override
    public void setAppContext(AppContext appContext) {
        this.dataBase = new DataBase(appContext.getInstance(DataSource.class));
    }
View Full Code Here

Examples of net.rim.device.api.database.Database

            final URI uri = URI.create(dbLocation + DB_NAME);

            // Open or create a plain text database. This will create the
            // directory and file defined by the URI (if they do not already
            // exist).
            Database db = DatabaseFactory.openOrCreate(uri);

            // Close the database in case it is blank and we need to write to
            // the file
            db.close();

            // Open a connection to the database file
            final FileConnection fileConnection =
                    (FileConnection) Connector.open("file://" + dbLocation
                            + DB_NAME);
View Full Code Here

Examples of net.sf.kpex.DataBase

   * @see net.sf.kpex.prolog.FunBuiltin#exec(net.sf.kpex.prolog.Prog)
   */
  @Override
  public int exec(Prog p)
  {
    DataBase db = (DataBase) ((JavaObject) getArg(0)).toObject();
    Term X = getArg(1);
    Term R = db.cin(X.getKey(), X);
    return putArg(2, R, p);
  }
View Full Code Here

Examples of net.sf.minuteProject.configuration.bean.model.data.Database

  public void setFunctionPackage(FunctionPackage functionPackage) {
    this.functionPackage = functionPackage;
  }
 
  public void complementFunctionWithFunctionEntity() {
    Database database = model.getDataModel().getDatabase();
    getFunctionPackage().setPackages(model, database);
  }
View Full Code Here

Examples of nl2sql.lexicon.Database

   

   
   
    public static void main(String[] args) throws Exception {
        Database db = new Database("đại học công nghệ");
        //System.out.println(attach("19", "điểm", db));
        //System.out.println(TokenVn_ann);
    }
View Full Code Here

Examples of no.priv.garshol.duke.Database

import no.priv.garshol.duke.databases.KeyValueDatabase;

public class KeyValueDatabaseTest extends DatabaseTest {

  public Database createDatabase(Configuration config) {
    Database db = new KeyValueDatabase();
    db.setConfiguration(config);
    return db;
  }
View Full Code Here

Examples of org.apache.ddlutils.model.Database

            for(Class<?> c : classes) {
              // adds classes to the DDL generator
              generator.addTable(c);
            }
            // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance(ddlType);
      platform.setDataSource(DB.datasource);
      // siena.ddl can have create/update/ddl
      // if siena.ddl is defined, uses it
      // if not:
      // in dev mode, will be update by default
      // in prod mode, will be none by default
      String ddl = "none";
      if(Play.mode.isDev()){
        ddl = Play.configuration.getProperty("siena.ddl", "update");
        Logger.debug("Siena DDL dev mode: %s", ddl);
      }else if(Play.mode.isProd()){
        ddl = Play.configuration.getProperty("siena.ddl", "none");
        Logger.debug("Siena DDL prod mode: %s", ddl);       
      }

      if("create".equals(ddl)){
          if(Logger.isDebugEnabled()) {
              Logger.debug("Siena DDL Generator SQL: %s", platform.getCreateModelSql(database, false, false));
          }
        // creates tables and do not drop tables and do not continues on error
        try {
          platform.createModel(connection, database, false, false);
        }catch(DatabaseOperationException ex){
          Logger.warn("Siena DDL createTables generated exception:%s", ex.getCause()!=null?ex.getCause():ex.getMessage());
        }
      }else if("update".equals(ddl)){
        Database currentDatabase = platform.readModelFromDatabase(connection, ddlType);
       
        if(!disableJPA){
          // Remove from the current schema those tables that are not known by Siena,
            // since they're likely to be JPA classes.
            // Iterate in reverse order since removeTable() changes the list size.
            for (int i = currentDatabase.getTableCount() - 1; i >= 0; i--) {
                Table table = currentDatabase.getTable(i);
                if(database.findTable(table.getName(), false) == null){
                    Logger.debug("Keeping existing table %s", table.getName());
                    currentDatabase.removeTable(i);
                }
            }
        }
       
        if(Logger.isDebugEnabled()){
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.