Package org.milowski.db

Examples of org.milowski.db.DBConnection.query()


   {
      final DBCache<UUID,Group> groupCache = db.realmGroupCaches.get(this);
      final DBCache<UUID,RealmUser> userCache = db.realmUserCaches.get(this);
      DBConnection connection = db.getConnection();
      try {
         connection.query(AuthDB.GROUP_BY_REALM,new DBQueryHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,id);
            }
View Full Code Here


                  Group group = groupCache.get(set.getInt(1));
                  group.delete();
               }
            }
         });
         connection.query(AuthDB.REALM_USER_BY_REALM,new DBQueryHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,id);
            }
View Full Code Here

      DBConnection connection = db.getConnection();
      try {
         connection.deleteById(AuthDB.DELETE_USER_ROLES_BY_USER, id);
         connection.deleteById(AuthDB.DELETE_AUTHENTICATION_BY_USER, id);
         connection.deleteById(AuthDB.DELETE_USER_ALIAS_BY_USER, id);
         connection.query(AuthDB.REALM_USERS_BY_USER, new DBQueryHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1, id);
            }
View Full Code Here

   {
     
      final Slot<Boolean> hasRole = new Slot<Boolean>(false);
      DBConnection connection = db.getConnection();
      try {
         connection.query(AuthDB.USER_HAS_ROLE, new DBQueryHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,id);
               s.setInt(2,role.getId());
View Full Code Here

      throws SQLException
   {
      final Slot<Iterator<Role>> result = new Slot<Iterator<Role>>();
      final DBConnection connection = db.getConnection();
      try {
         connection.query(AuthDB.USER_ROLES, new DBQueryHandler() {
         public boolean shouldClose() { return false; }
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,id);
View Full Code Here

   {
      final Slot<Authenticated> retval = new Slot<Authenticated>();
      if (realm==null) {
         DBConnection connection = db.getConnection();
         try {
            connection.query(AuthDB.USER_AUTHENTICATED, new DBQueryHandler() {
               public void prepare(PreparedStatement s)
                  throws SQLException
               {
                  s.setInt(1,id);
                  s.setString(2,session.toString());
View Full Code Here

            db.release(connection);
         }
      } else {
         DBConnection connection = db.getConnection();
         try {
            connection.query(AuthDB.REALM_USER_AUTHENTICATED, new DBQueryHandler() {
               public void prepare(PreparedStatement s)
                  throws SQLException
               {
                  s.setInt(1,id);
                  s.setInt(2,realm.getId());
View Full Code Here

   {
      final Slot<Boolean> found = new Slot<Boolean>(false);
      final String encrypted = md5Password(password);
      DBConnection connection = db.getConnection();
      try {
         connection.query(AuthDB.CHECK_PASSWORD, new DBQueryHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,id);
               s.setString(2,encrypted);
View Full Code Here

      throws SQLException
   {
      final Slot<String> found = new Slot<String>();
      DBConnection connection = db.getConnection();
      try {
         connection.query(AuthDB.ENCRYPTED_PASSWORD, new DBQueryHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,id);
            }
View Full Code Here

      throws SQLException
   {
     
      DBConnection connection = db.getConnection();
      try {
         connection.query(AuthDB.ROLE_PERMISSIONS, new DBQueryHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1, id);
            }
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.