Package org.apache.cayenne.modeler.util

Examples of org.apache.cayenne.modeler.util.Version


        if (prefs == null || prefs.length == 0) {
            return false;
        }

        // find older version
        Version currentVersion = new Version(versionName);
        Version previousVersion = new Version("0");
        File lastDir = null;
        for (int i = 0; i < prefs.length; i++) {
            File dir = new File(prefsDir, prefs[i]);
            if (dir.isDirectory() && new File(dir, baseName + ".properties").isFile()) {

                // check that there are DB files

                Version v;
                try {
                    v = new Version(prefs[i]);
                }
                catch (NumberFormatException nfex) {
                    // ignore... not a version dir...
                    continue;
                }

                if (v.compareTo(currentVersion) < 0 && v.compareTo(previousVersion) > 0) {
                    previousVersion = v;
                    lastDir = dir;
                }
            }
        }
View Full Code Here


        if (prefs == null || prefs.length == 0) {
            return false;
        }

        // find older version
        Version currentVersion = new Version(versionName);
        Version previousVersion = new Version("0");
        File lastDir = null;
        for (String pref : prefs) {
            File dir = new File(prefsDir, pref);
            if (dir.isDirectory() && new File(dir, baseName + ".properties").isFile()) {

                // check that there are DB files

                Version v;
                try {
                    v = new Version(pref);
                }
                catch (NumberFormatException nfex) {
                    // ignore... not a version dir...
                    continue;
                }

                if (v.compareTo(currentVersion) < 0 && v.compareTo(previousVersion) > 0) {
                    previousVersion = v;
                    lastDir = dir;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.modeler.util.Version

Copyright © 2018 www.massapicom. 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.