Package org.odmg

Examples of org.odmg.Implementation.newDatabase()


     * as foreign keys in ODMG. :(
     */
    public void testCreateWithoutRelatedObject() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(databaseName, Database.OPEN_READ_WRITE);
        try
        {
            Transaction tx = odmg.newTransaction();
            tx.begin();
View Full Code Here


     * do the create with a related object to prove it works in ODMG mode.
     */
    public void testCreateWithRelatedObject() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(databaseName, Database.OPEN_READ_WRITE);
        try
        {
            Transaction tx = odmg.newTransaction();
            tx.begin();
View Full Code Here

     * test removing all
     */
    public void testRemoveAll() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();

        db.open(databaseName, Database.OPEN_READ_WRITE);

        // 1. Get a list of some articles
        Transaction tx = odmg.newTransaction();
View Full Code Here

     * test getting all (make sure basic operation is still functional)
     */
    public void testGetAllUnrestricted() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(databaseName, Database.OPEN_READ_WRITE);
        try
        {
            // 1. remove all data
            removeAllData(db, odmg);
View Full Code Here

     */

    public void testGetSomeA() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(databaseName, Database.OPEN_READ_WRITE);
        int start = 10;
        int end = 15;
        try
        {
View Full Code Here

     * test start at beginning, and go to an end index.
     */
    public void testGetSomeB() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(databaseName, Database.OPEN_READ_WRITE);
        int start = Query.NO_START_AT_INDEX;
        int end = 15;
        try
        {
View Full Code Here

     */
    public void testGetSomeC() throws Exception
    {

        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(databaseName, Database.OPEN_READ_WRITE);
        int start = 10;
        int end = Query.NO_END_AT_INDEX;
        try
        {
View Full Code Here

     * test the condition where start is after end.
     */
    public void testGetSomeD() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(databaseName, Database.OPEN_READ_WRITE);
        int start = 10;
        int end = 5;
        Transaction tx = odmg.newTransaction();
        try
View Full Code Here

     * test condition where start and end are the same.
     */
    public void testGetSomeE() throws Exception
    {
        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(databaseName, Database.OPEN_READ_WRITE);
        int start = 10;
        int end = 10;
        try
        {
View Full Code Here

    public void testLookupDatabase() throws Exception
    {
        String queryStr = "select allArticle from " + TEST_CLASS.getName();
        Implementation odmg = OJB.getInstance();
        Transaction tx;
        Database db = odmg.newDatabase();
        db.open(TestHelper.DEF_JCD_ALIAS, Database.OPEN_READ_WRITE);
        db.close();
        db = odmg.newDatabase();
        db.open(TestHelper.DEF_JCD_ALIAS + "#" +
                TestHelper.DEF_USER + "#" +
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.