Package org.h2.jaqu.Table

Examples of org.h2.jaqu.Table.JQTable.version()


        if (!upgradeChecked.contains(dbUpgrader.getClass())) {
            // flag as checked immediately because calls are nested.
            upgradeChecked.add(dbUpgrader.getClass());

            JQDatabase model = dbUpgrader.getClass().getAnnotation(JQDatabase.class);
            if (model.version() > 0) {
                DbVersion v = new DbVersion();
                DbVersion dbVersion =
                    // (SCHEMA="" && TABLE="") == DATABASE
                    from(v).where(v.schema).is("").and(v.table).is("").selectFirst();
                if (dbVersion == null) {
View Full Code Here


                    // (SCHEMA="" && TABLE="") == DATABASE
                    from(v).where(v.schema).is("").and(v.table).is("").selectFirst();
                if (dbVersion == null) {
                    // database has no version registration, but model specifies
                    // version: insert DbVersion entry and return.
                    DbVersion newDb = new DbVersion(model.version());
                    insert(newDb);
                } else {
                    // database has a version registration:
                    // check to see if upgrade is required.
                    if ((model.version() > dbVersion.version)
View Full Code Here

                    DbVersion newDb = new DbVersion(model.version());
                    insert(newDb);
                } else {
                    // database has a version registration:
                    // check to see if upgrade is required.
                    if ((model.version() > dbVersion.version)
                            && (dbUpgrader != null)) {
                        // database is an older version than the model
                        boolean success = dbUpgrader.upgradeDatabase(this,
                                dbVersion.version, model.version());
                        if (success) {
View Full Code Here

                    // check to see if upgrade is required.
                    if ((model.version() > dbVersion.version)
                            && (dbUpgrader != null)) {
                        // database is an older version than the model
                        boolean success = dbUpgrader.upgradeDatabase(this,
                                dbVersion.version, model.version());
                        if (success) {
                            dbVersion.version = model.version();
                            update(dbVersion);
                        }
                    }
View Full Code Here

                            && (dbUpgrader != null)) {
                        // database is an older version than the model
                        boolean success = dbUpgrader.upgradeDatabase(this,
                                dbVersion.version, model.version());
                        if (success) {
                            dbVersion.version = model.version();
                            update(dbVersion);
                        }
                    }
                }
            }
View Full Code Here

            // allow control over createTableIfRequired()
            createTableIfRequired = tableAnnotation.createIfRequired();

            // model version
            if (tableAnnotation.version() > 0) {
                tableVersion = tableAnnotation.version();
            }

            // setup the primary index, if properly annotated
            List<String> primaryKey = getColumns(tableAnnotation.primaryKey());
View Full Code Here

            // allow control over createTableIfRequired()
            createTableIfRequired = tableAnnotation.createIfRequired();

            // model version
            if (tableAnnotation.version() > 0) {
                tableVersion = tableAnnotation.version();
            }

            // setup the primary index, if properly annotated
            List<String> primaryKey = getColumns(tableAnnotation.primaryKey());
            if (primaryKey != null) {
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.