Package ejp

Examples of ejp.DatabaseManager.saveObject()


            // HSQL in memory database
            DatabaseManager dbm = DatabaseManager.getDatabaseManager("users", 5, "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:users", "sa", "");
           
            dbm.executeUpdate("create memory table users(username varchar(30), password varchar(30), first_name varchar(40), last_name varchar(40), roles varchar(100))");
           
            dbm.saveObject(new User("admin", "b8fOPfDKETezXTCgqbtF", "Admin", null, "admin, create, delete"));
            dbm.saveObject(new User("jsmith", "njiaJzLtntWp6abHfRtU", "John", "Smith", "user"));
           
            config.getServletContext().setAttribute("databaseManager", dbm);
          }
        catch (Exception e)
View Full Code Here


            DatabaseManager dbm = DatabaseManager.getDatabaseManager("users", 5, "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:users", "sa", "");
           
            dbm.executeUpdate("create memory table users(username varchar(30), password varchar(30), first_name varchar(40), last_name varchar(40), roles varchar(100))");
           
            dbm.saveObject(new User("admin", "b8fOPfDKETezXTCgqbtF", "Admin", null, "admin, create, delete"));
            dbm.saveObject(new User("jsmith", "njiaJzLtntWp6abHfRtU", "John", "Smith", "user"));
           
            config.getServletContext().setAttribute("databaseManager", dbm);
          }
        catch (Exception e)
          {
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.