Package com.cosmo.data

Examples of com.cosmo.data.DataAgent.execute()


         sql = "INSERT INTO " + TABLE_ROLES + " (roleid, roledescription, roleappid, rolesu) " +
               "VALUES ('" + DataAgent.sqlFormatTextValue(role.getId()) + "', " +
                       "'" + DataAgent.sqlFormatTextValue(role.getDescription()) + "', " +
                       "'" + DataAgent.sqlFormatTextValue(role.getApplicationId()) + "', " +
                             (role.isSuperUser() ? "true" : "false") + ")";
         conn.execute(sql);
      }
      catch (Exception ex)
      {
         throw new AuthorizationException(ex.getMessage(), ex);
      }
View Full Code Here


         conn = DataFactory.getInstance(workspace);

         // Elimina las asociaciones con actividades
         sql = "DELETE FROM " + TABLE_ROLE_ACTIVITIES + " " +
               "WHERE roleid='" + DataAgent.sqlFormatTextValue(roleId) + "'";
         conn.execute(sql);

         // Elimina las asociaciones con usuarios
         sql = "DELETE FROM " + TABLE_USER_ROLES + " " +
               "WHERE roleid='" + DataAgent.sqlFormatTextValue(roleId) + "'";
         conn.execute(sql);
View Full Code Here

         conn.execute(sql);

         // Elimina las asociaciones con usuarios
         sql = "DELETE FROM " + TABLE_USER_ROLES + " " +
               "WHERE roleid='" + DataAgent.sqlFormatTextValue(roleId) + "'";
         conn.execute(sql);

         // Elimina el rol
         sql = "DELETE FROM " + TABLE_ROLES + " " +
               "WHERE roleid='" + DataAgent.sqlFormatTextValue(roleId) + "'";
         conn.execute(sql);
View Full Code Here

         conn.execute(sql);

         // Elimina el rol
         sql = "DELETE FROM " + TABLE_ROLES + " " +
               "WHERE roleid='" + DataAgent.sqlFormatTextValue(roleId) + "'";
         conn.execute(sql);
      }
      catch (Exception ex)
      {
         throw new AuthorizationException(ex.getMessage(), ex);
      }
View Full Code Here

         sql = "UPDATE " + TABLE_ROLES + " " +
               "SET roledescription = '" + DataAgent.sqlFormatTextValue(role.getDescription()) + "', " +
               "    roleappid       = '" + DataAgent.sqlFormatTextValue(role.getApplicationId()) + "', " +
               "    rolesu          =  " + (role.isSuperUser() ? "true" : "false") + " " +
               "WHERE roleid = '" + DataAgent.sqlFormatTextValue(role.getId()) + "'";
         conn.execute(sql);
      }
      catch (Exception ex)
      {
         throw new AuthorizationException(ex.getMessage(), ex);
      }
View Full Code Here

         sql = "INSERT INTO " + TABLE_ACTIVITIES + " (actid, actdescription, actdefaultgrant, actenabled) " +
               "VALUES ('" + DataAgent.sqlFormatTextValue(activity.getId()) + "', " +
                       "'" + DataAgent.sqlFormatTextValue(activity.getDescription()) + "', " +
                             (activity.isGrantedByDefault() ? "true" : "false") + ", " +
                             (activity.isEnabled() ? "true" : "false") + ")";
         conn.execute(sql);
      }
      catch (Exception ex)
      {
         throw new AuthorizationException(ex.getMessage(), ex);
      }
View Full Code Here

         conn = DataFactory.getInstance(workspace);

         // Elimina las asociaciones con roles
         sql = "DELETE FROM " + TABLE_ROLE_ACTIVITIES + " " +
               "WHERE actid='" + DataAgent.sqlFormatTextValue(activityId) + "'";
         conn.execute(sql);

         // Elimina el rol
         sql = "DELETE FROM " + TABLE_ACTIVITIES + " " +
               "WHERE actid='" + DataAgent.sqlFormatTextValue(activityId) + "'";
         conn.execute(sql);
View Full Code Here

         conn.execute(sql);

         // Elimina el rol
         sql = "DELETE FROM " + TABLE_ACTIVITIES + " " +
               "WHERE actid='" + DataAgent.sqlFormatTextValue(activityId) + "'";
         conn.execute(sql);
      }
      catch (Exception ex)
      {
         throw new AuthorizationException(ex.getMessage(), ex);
      }
View Full Code Here

         sql = "UPDATE " + TABLE_ACTIVITIES + " " +
               "SET actdescription  = '" + DataAgent.sqlFormatTextValue(activity.getDescription()) + "', " +
               "    actdefaultgrant =  " + (activity.isGrantedByDefault() ? "true" : "false") + ", " +
               "    actenabled      =  " + (activity.isEnabled() ? "true" : "false") + " " +
               "WHERE actid = '" + DataAgent.sqlFormatTextValue(activity.getId()) + "'";
         conn.execute(sql);
      }
      catch (Exception ex)
      {
         throw new AuthorizationException(ex.getMessage(), ex);
      }
View Full Code Here

         // Agrega la nueva asociaci�n
         sql = "INSERT INTO " + TABLE_ROLE_ACTIVITIES + " (actid, roleid, isgranted) " +
               "VALUES ('" + DataAgent.sqlFormatTextValue(activityId) + "', " +
                       "'" + DataAgent.sqlFormatTextValue(roleId) + "', " +
                             (isGranted ? "true" : "false") + ")";
         conn.execute(sql);
      }
      catch (Exception ex)
      {
         throw new AuthorizationException(ex.getMessage(), 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.