Examples of newDatabase()


Examples of org.odmg.Implementation.newDatabase()

        s_ref_3.setMainObject(obj_1);
        obj_2.setSingleReference(s_ref_4);
        s_ref_3.setMainObject(obj_1);

        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(TestHelper.DEF_DATABASE_NAME, Database.OPEN_READ_WRITE);

        Transaction tx = odmg.newTransaction();
        tx.begin();
        db.makePersistent(s_ref_1);
View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

     * @param args The commandline arguments
     */
    public static void main(String[] args) throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database       db   = odmg.newDatabase();

        db.open("default", Database.OPEN_READ_WRITE);

        Product product = new Product();

View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

        // get facade instance
        // use one Implementation instance per database
        // it's recommended to share the Implementation and Database instances
        // in the application, instead of always instantiate and open it.
        Implementation odmg = OJB.getInstance();
        Database       db   = odmg.newDatabase();

        // open database
        try
        {
            db.open(DATABASE_NAME, Database.OPEN_READ_WRITE);
View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

     * unique in the DB.
     */
    public void testDuplicateInsertion() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        String name = "testDuplicateInsertion_" + System.currentTimeMillis();
        String nameNew = "testDuplicateInsertion_New_" + System.currentTimeMillis();

        db.open(databaseName, Database.OPEN_READ_WRITE);
        //System.out.println("TEST: Database open");
View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

    }

    public void testSimpleQueryDelete() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        String name = "testSimpleQueryDelete - " + System.currentTimeMillis();

        db.open(databaseName, Database.OPEN_READ_WRITE);
        Site site = new Site();
        site.setName(name);
View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

            {
                restore = true;
                conf.setUseImplicitLocking(false);
            }
            Implementation odmg = OJB.getInstance();
            Database db = odmg.newDatabase();
            db.open(databaseName, Database.OPEN_READ_WRITE);

            String name = "testImplicitLocking - " + System.currentTimeMillis();
            String queryString = "select sites from " + Site.class.getName() + " where name = $1";
View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

       * store an object and then retrieve it by id.
       */
      public void testStoreRetrieveSameTxn() throws Exception
      {
          Implementation odmg = OJB.getInstance();
          Database db = odmg.newDatabase();
          //open database
          try
          {
            db.open(databaseName, Database.OPEN_READ_WRITE);
          }
View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

    public void testRetrieveNonExistent()
  {
    try
    {
      Implementation odmg = OJB.getInstance();
      Database db = odmg.newDatabase();
      //open database
      try
      {
        db.open(databaseName, Database.OPEN_READ_WRITE);
      }
View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

  public void testRetrieveOutsideTxn()
  {
    try
    {
      Implementation odmg = OJB.getInstance();
      Database db = odmg.newDatabase();
      //open database
      try
      {
        db.open(databaseName, Database.OPEN_READ_WRITE);
      }
View Full Code Here

Examples of org.odmg.Implementation.newDatabase()

        if (whichTest == 2 || whichTest == 3)
        {
//        log.info("Init ODMG-API");
            PerformanceArticle art2 = createArticle(1001);
            Implementation ojb = OJB.getInstance();
            Database db = ojb.newDatabase();
            db.open(databaseName, Database.OPEN_READ_WRITE);
            Transaction tx = ojb.newTransaction();
            tx.begin();
            tx.lock(art2, Transaction.WRITE);
            tx.commit();
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.