Package org.milowski.db

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


   public void delete()
      throws SQLException
   {
      DBConnection connection = db.getConnection();
      try {
         connection.deleteById(AuthDB.DELETE_ROLE_PERMISSIONS_BY_PERMISSION, id);
         connection.deleteById(AuthDB.DELETE_PERMISSION, id);
         db.realmGroupCaches.clear();
         db.roleCache.clear();
         db.permissionCache.remove(id);
      } finally {
View Full Code Here


      throws SQLException
   {
      DBConnection connection = db.getConnection();
      try {
         connection.deleteById(AuthDB.DELETE_ROLE_PERMISSIONS_BY_PERMISSION, id);
         connection.deleteById(AuthDB.DELETE_PERMISSION, id);
         db.realmGroupCaches.clear();
         db.roleCache.clear();
         db.permissionCache.remove(id);
      } finally {
         db.release(connection);
View Full Code Here

                  RealmUser user = userCache.get(set.getInt(1));
                  user.delete();
               }
            }
         });
         connection.deleteById(AuthDB.DELETE_AUTHENTICATED_BY_REALM, id);
         connection.deleteById(AuthDB.DELETE_REALM, id);
         db.realmCache.remove(id);
         db.realmUserCaches.remove(this);
         db.realmGroupCaches.remove(this);
      } finally {
View Full Code Here

                  user.delete();
               }
            }
         });
         connection.deleteById(AuthDB.DELETE_AUTHENTICATED_BY_REALM, id);
         connection.deleteById(AuthDB.DELETE_REALM, id);
         db.realmCache.remove(id);
         db.realmUserCaches.remove(this);
         db.realmGroupCaches.remove(this);
      } finally {
         db.release(connection);
View Full Code Here

   public void delete()
      throws SQLException
   {
      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
View Full Code Here

      throws SQLException
   {
      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
            {
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

                  user.delete();
                  db.realmUserCaches.get(realm).remove(user.getId());
               }
            }
         });
         connection.deleteById(AuthDB.DELETE_USER, id);
         db.userCache.remove(id);
      } finally {
         db.release(connection);
      }
   }
View Full Code Here

      if (!algorithm.equals("md5")) {
         throw new NoSuchAlgorithmException("Algorithm "+algorithm+" is not supported.");
      }
      DBConnection connection = db.getConnection();
      try {
         connection.deleteById(AuthDB.DELETE_AUTHENTICATION_BY_USER, id);
         connection.create(AuthDB.CREATE_AUTHENTICATION, -1,new DBUpdateHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,id);
View Full Code Here

      public void delete()
         throws SQLException
      {
         DBConnection connection = db.getConnection();
         try {
            connection.deleteById(AuthDB.DELETE_AUTHENTICATED, dbid);
         } finally {
            db.release(connection);
         }
      }
   }
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.