Package com.art.anette.server.database

Examples of com.art.anette.server.database.ServerDB.execute()


            final long delta = 90L * 24L * 60L * 60L * 1000L;
            //noinspection InfiniteLoopStatement
            while (true) {
                try {
                    long time = (System.currentTimeMillis() - delta) / -1000;
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Project.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
View Full Code Here


            //noinspection InfiniteLoopStatement
            while (true) {
                try {
                    long time = (System.currentTimeMillis() - delta) / -1000;
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Project.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
View Full Code Here

            while (true) {
                try {
                    long time = (System.currentTimeMillis() - delta) / -1000;
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Project.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackageDependsRelation.getTableName(), time));
View Full Code Here

                try {
                    long time = (System.currentTimeMillis() - delta) / -1000;
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Project.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackageDependsRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Task.getTableName(), time));
View Full Code Here

                    long time = (System.currentTimeMillis() - delta) / -1000;
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Project.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackageDependsRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Task.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Duration.getTableName(), time));
View Full Code Here

                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Project.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackageDependsRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Task.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Duration.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("UPDATE %s SET dirty = 1 WHERE lastlogin < %d", Employee.getTableName(), -time));
View Full Code Here

                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Employee.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Project.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackageDependsRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Task.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Duration.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("UPDATE %s SET dirty = 1 WHERE lastlogin < %d", Employee.getTableName(), -time));
                } catch (SQLException ex) {
View Full Code Here

                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Project.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackageDependsRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Task.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Duration.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("UPDATE %s SET dirty = 1 WHERE lastlogin < %d", Employee.getTableName(), -time));
                } catch (SQLException ex) {
                    logger.severe(null, ex);
View Full Code Here

                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Department.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackageDependsRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Task.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Duration.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("UPDATE %s SET dirty = 1 WHERE lastlogin < %d", Employee.getTableName(), -time));
                } catch (SQLException ex) {
                    logger.severe(null, ex);
                }
View Full Code Here

                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackage.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeProjectRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", EmployeeWorkPackageRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", WorkPackageDependsRelation.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Task.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("DELETE FROM %s WHERE timestamp > %d AND timestamp < 0", Duration.getTableName(), time));
                    sdb.execute(SQLFormatter.generateQuery("UPDATE %s SET dirty = 1 WHERE lastlogin < %d", Employee.getTableName(), -time));
                } catch (SQLException ex) {
                    logger.severe(null, ex);
                }
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.