Package org.milowski.db

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


         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);
               s.setString(2,value);
View Full Code Here


      throws SQLException
   {
     
      DBConnection connection = getConnection();
      try {
         int id = connection.create(CREATE_PERMISSION,LAST_ID_FROM_PERMISSIONS, new DBUpdateHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setString(1,name);
               s.setString(2,uuid.toString());
View Full Code Here

   public Role createRole(final String name,final UUID uuid)
      throws SQLException
   {
      DBConnection connection = getConnection();
      try {
         int id = connection.create(CREATE_ROLE,LAST_ID_FROM_ROLES, new DBUpdateHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setString(1,name);
               s.setString(2,uuid.toString());
View Full Code Here

   public Realm createRealm(final String name,final UUID uuid)
      throws SQLException
   {
      DBConnection connection = getConnection();
      try {
         int id = connection.create(CREATE_REALM,LAST_ID_FROM_REALMS, new DBUpdateHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setString(1,name);
               s.setString(2,uuid.toString());
View Full Code Here

         return null;
      }
      final Timestamp tstamp = new Timestamp((new Date()).getTime());
      DBConnection connection = getConnection();
      try {
         int id = connection.create(CREATE_USER,LAST_ID_FROM_USERS, new DBUpdateHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setString(1,uuid.toString());
               if (name==null) {
View Full Code Here

      if (cache.getNamed(alias)!=null) {
         return null;
      }
      DBConnection connection = getConnection();
      try {
         int id = connection.create(CREATE_GROUP,LAST_ID_FROM_GROUPS, new DBUpdateHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,realm.getId());
               s.setString(2,uuid.toString());
View Full Code Here

         return null;
      }
      final Timestamp tstamp = new Timestamp((new Date()).getTime());
      DBConnection connection = getConnection();
      try {
         int id = connection.create(CREATE_REALM_USER,LAST_ID_FROM_REALM_USERS, new DBUpdateHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,realm.getId());
               s.setInt(2,user.getId());
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.