Examples of dataSearch()


Examples of hibernateLogic.DatabaseTools.dataSearch()

          // Adding the relationship to the database
          int newUserRoleGroup = myTools.dataEntry(newRelationship);
           
          //Confirm Group exist by searching its id
          // WILL NEED TO ADD LOGIC IN THE FUTURE TO CLEAN THINGS UP IF ONLY ONE IS ADDED AND NOT THE OTHER
          boolean groupConfirmed = myTools.dataSearch("Group", "id", newGroupID);
          boolean relationshipConfirmed = myTools.dataSearch("UserRoleGroup", "id", newUserRoleGroup);
         
            // If successfully created and it exist in the database return true;
            if(groupConfirmed && relationshipConfirmed)
            {
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

          int newUserRoleGroup = myTools.dataEntry(newRelationship);
           
          //Confirm Group exist by searching its id
          // WILL NEED TO ADD LOGIC IN THE FUTURE TO CLEAN THINGS UP IF ONLY ONE IS ADDED AND NOT THE OTHER
          boolean groupConfirmed = myTools.dataSearch("Group", "id", newGroupID);
          boolean relationshipConfirmed = myTools.dataSearch("UserRoleGroup", "id", newUserRoleGroup);
         
            // If successfully created and it exist in the database return true;
            if(groupConfirmed && relationshipConfirmed)
            {
              return GroupFactory.validGroup(true);
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

          
           // Set up your database Tools
           DatabaseTools myTools = new DatabaseTools();
          
           // Confirm user exists and has the correct password before letting them pass.
             boolean userFound = myTools.dataSearch("User", "id", userId, "password", password);

           // Return false if a user is not found or password incorrect!
         if(!userFound) {
          
           throw new Exception ("User not found");
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

         }
        
         else {
          
             //check if group exists first
           boolean groupFound = myTools.dataSearch("Group", "id", groupId);
          
           //group not found
           if(!groupFound) {
            
             return GroupFactory.validGroup(false);
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

              
               boolean answer;
              
               //first check to see if group has any questions first
               //if there are questions, there will be answers as well
               if (answer = myTools.dataSearch("Question", "groupId", groupId)){
                
                 //get all the questions associated with the group id
                    ObjectRetrievalTools<Question> objTool2 = new ObjectRetrievalTools<Question>();
                    List<Question> questionList = objTool2.getObjectList(Table.Question, "groupId", groupId);
                   
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

              
               //call the tools to remove the group from the db
               myTools.dataRemoval(remGroup);
              
               //return true when group is deleted
               return GroupFactory.validGroup(!myTools.dataSearch("Group", "id", groupId));
             }                       
           }
         }
         }
    }
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

      else {
        //load database tools
        DatabaseTools myTools = new DatabaseTools();
       
          //confirm user is valid
        boolean userFound = myTools.dataSearch("User", "id", userId, "password", password);
       
        if(!userFound){
          throw new Exception ("User was not found");
      }
       
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

          throw new Exception ("User was not found");
      }
       
        else {
          //confirm you can find the group based on ID
          boolean groupConfirmed = myTools.dataSearch("Group", "id", groupId);
         
          if (!groupConfirmed){
            throw new Exception ("Group not found");
          }
         
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

      else {
        //set up db tools
        DatabaseTools myTools = new DatabaseTools();
       
        //check for valid user
        boolean userFound = myTools.dataSearch("User", "id", userId, "password", password);
       
        if (!userFound) {
          throw new Exception ("User was not found");
        }
       
View Full Code Here

Examples of hibernateLogic.DatabaseTools.dataSearch()

          throw new Exception ("User was not found");
        }
       
        else {
          //check if group exists
          boolean groupConfirmed = myTools.dataSearch("Group", "id", groupId);
         
          if (!groupConfirmed){
            throw new Exception ("Group not found");
          }
         
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.