Package com.centraview.common

Examples of com.centraview.common.DDNameValue


      if (fileVO.getVirtualFolderVO() != null) {
        for (int i=0;i<fileVO.getVirtualFolderVO().size();i++) {
          CvFolderVO folderVO = new CvFolderVO();
          folderVO = (CvFolderVO) fileVO.getVirtualFolderVO().get(i);
         
          DDNameValue otherFolderDDNameValue = new DDNameValue(""+folderVO.getFolderId() + "#" + folderVO.getName(), folderVO.getName());
          otherFolderVec.add(otherFolderDDNameValue);
        }
      }
      ((FileForm)form).setOtheruploadfoldernamevec(otherFolderVec);
     
View Full Code Here


      else if (FileConstantKeys.PERMISSION.equals(previousTab))
      {
        // view permission
        String[] viewPermissionS = previousForm.getViewpermission();
        Vector viewPermisionV = new Vector();
        DDNameValue viewPermissionListBox = null;
        String idName = "";
        String displayName = "";
        // if user have selected records
        if (previousForm.getViewpermission() != null)
        {
          int sizeOfListBox = viewPermissionS.length;
          for (int i=0;i<sizeOfListBox;i++)
          {
            int indexOfHash = viewPermissionS[i].indexOf("#");
            idName = viewPermissionS[i].substring(0, indexOfHash);
            displayName = viewPermissionS[i].substring(indexOfHash+1, viewPermissionS[i].length());
            viewPermissionListBox = new DDNameValue(viewPermissionS[i], displayName);
            viewPermisionV.add(viewPermissionListBox);
          }
          previousForm.setViewpermissionvec(viewPermisionV);
        }
        // if user have not selected records
        else
        {
          previousForm.setViewpermissionvec(new Vector());
        }

        // modify permission
        String[] modifyPermissionS = previousForm.getViewpermission();
        Vector modifyPermisionV = new Vector();
        DDNameValue modifyPermissionListBox = null;
        idName = "";
        displayName = "";
        // if user have selected records
        if (previousForm.getViewpermission() != null)
        {
          int sizeOfListBox = modifyPermissionS.length;
          for (int i=0;i<sizeOfListBox;i++)
          {
            int indexOfHash = modifyPermissionS[i].indexOf("#");
            idName = modifyPermissionS[i].substring(0, indexOfHash);
            displayName = modifyPermissionS[i].substring(indexOfHash+1, modifyPermissionS[i].length());
            modifyPermissionListBox = new DDNameValue(modifyPermissionS[i], displayName);
            modifyPermisionV.add(modifyPermissionListBox);
          }
          previousForm.setViewpermissionvec(modifyPermisionV);
        }
        // if user have not selected records
        else
        {
          previousForm.setViewpermissionvec(new Vector());
        }

        // delete permission
        String[] deletePermissionS = previousForm.getViewpermission();
        Vector deletePermisionV = new Vector();
        DDNameValue deletePermissionListBox = null;
        idName = "";
        displayName = "";
        // if user have selected records
        if (previousForm.getViewpermission() != null)
        {
          int sizeOfListBox = deletePermissionS.length;
          for (int i=0;i<sizeOfListBox;i++)
          {
            int indexOfHash = deletePermissionS[i].indexOf("#");
            idName = deletePermissionS[i].substring(0, indexOfHash);
            displayName = deletePermissionS[i].substring(indexOfHash+1, deletePermissionS[i].length());
            deletePermissionListBox = new DDNameValue(deletePermissionS[i], displayName);
            deletePermisionV.add(deletePermissionListBox);
          }
          previousForm.setViewpermissionvec(deletePermisionV);
        }
        // if user have not selected records
View Full Code Here

        Iterator iter = results.iterator();
        while (iter.hasNext()) {
          HashMap resultRow = (HashMap)iter.next();
          Number accountID = (Number)resultRow.get("accountID");
          String emailAddress = (String)resultRow.get("Address");
          accountList.add(new DDNameValue(accountID.intValue(),emailAddress));
        }
      }// end if (results != null)
    }catch(Exception e){
      System.out.println("[Exception][MailEJB] Exception thrown in getAccountList(): " + e.toString());
      // e.printStackTrace();
View Full Code Here

    try {
      if (sourceCollection != null) {
        StringBuffer stringBuffer = new StringBuffer();
        Iterator it = sourceCollection.iterator();
        while (it.hasNext()) {
          DDNameValue sourceObject = (DDNameValue) it.next();
          if (sourceObject.getName() != null && sourceObject.getId() == -1) {
            // create a new Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("INSERT INTO source (Name) VALUES (?)");
            cvdl.setString(1, sourceObject.getName());
            cvdl.executeUpdate();
            int newId = cvdl.getAutoGeneratedKey();
            stringBuffer.append(newId);
          } // end of if statement (sourceObject.getName() != null ...
          else if (sourceObject.getName() != null) {
            // update the existing Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("UPDATE source SET Name = ? WHERE SourceID = ?");
            cvdl.setString(1, sourceObject.getName());
            cvdl.setInt(2, sourceObject.getId());
            cvdl.executeUpdate();
            stringBuffer.append(sourceObject.getId());
          } // end of else if statement (sourceObject.getName() != null)
          if (stringBuffer.length() > 0 && it.hasNext()) {
            stringBuffer.append(", ");
          }
        } // end of while loop (it.hasNext())
View Full Code Here

    try {
      if (typeCollection != null) {
        StringBuffer stringBuffer = new StringBuffer();
        Iterator it = typeCollection.iterator();
        while (it.hasNext()) {
          DDNameValue sourceObject = (DDNameValue) it.next();
          // System.out.println("[DEBUG] [AppSettingsEJB]: sourceObject: " +
          // sourceObject.toString());
          if (sourceObject.getName() != null && sourceObject.getId() == -1) {
            // create a new Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("INSERT INTO salestype (Name) VALUES (?)");
            cvdl.setString(1, sourceObject.getName());
            cvdl.executeUpdate();
            int newId = cvdl.getAutoGeneratedKey();
            stringBuffer.append(newId);
          } // end of if statement (sourceObject.getName() != null ...
          else if (sourceObject.getName() != null) {
            // update the existing Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("UPDATE salestype SET Name = ? WHERE SalesTypeID = ?");
            cvdl.setString(1, sourceObject.getName());
            cvdl.setInt(2, sourceObject.getId());
            cvdl.executeUpdate();
            stringBuffer.append(sourceObject.getId());
          } // end of else if statement (sourceObject.getName() != null)
          if (stringBuffer.length() > 0 && it.hasNext()) {
            stringBuffer.append(", ");
          }
        } // end of while loop (it.hasNext())
View Full Code Here

    try {
      if (stageCollection != null) {
        StringBuffer stringBuffer = new StringBuffer();
        Iterator it = stageCollection.iterator();
        while (it.hasNext()) {
          DDNameValue sourceObject = (DDNameValue) it.next();
          // System.out.println("[DEBUG] [AppSettingsEJB]: sourceObject: " +
          // sourceObject.toString());
          if (sourceObject.getName() != null && sourceObject.getId() == -1) {
            // create a new Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("INSERT INTO salesstage (Name) VALUES (?)");
            cvdl.setString(1, sourceObject.getName());
            cvdl.executeUpdate();
            int newId = cvdl.getAutoGeneratedKey();
            stringBuffer.append(newId);
          } // end of if statement (sourceObject.getName() != null ...
          else if (sourceObject.getName() != null) {
            // update the existing Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("UPDATE salesstage SET Name = ? WHERE SalesStageID = ?");
            cvdl.setString(1, sourceObject.getName());
            cvdl.setInt(2, sourceObject.getId());
            cvdl.executeUpdate();
            stringBuffer.append(sourceObject.getId());
          } // end of else if statement (sourceObject.getName() != null)
          if (stringBuffer.length() > 0 && it.hasNext()) {
            stringBuffer.append(", ");
          }
        } // end of while loop (it.hasNext())
View Full Code Here

    try {
      if (termsCollection != null) {
        StringBuffer stringBuffer = new StringBuffer();
        Iterator it = termsCollection.iterator();
        while (it.hasNext()) {
          DDNameValue sourceObject = (DDNameValue) it.next();
          // System.out.println("[DEBUG] [AppSettingsEJB]: sourceObject: " +
          // sourceObject.toString());
          if (sourceObject.getName() != null && sourceObject.getId() == -1) {
            // create a new Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("INSERT INTO terms (TermName) VALUES (?)");
            cvdl.setString(1, sourceObject.getName());
            cvdl.executeUpdate();
            int newId = cvdl.getAutoGeneratedKey();
            stringBuffer.append(newId);
          } // end of if statement (sourceObject.getName() != null ...
          else if (sourceObject.getName() != null) {
            // update the existing Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("UPDATE terms SET TermName = ? WHERE TermID = ?");
            cvdl.setString(1, sourceObject.getName());
            cvdl.setInt(2, sourceObject.getId());
            cvdl.executeUpdate();
            stringBuffer.append(sourceObject.getId());
          } // end of else if statement (sourceObject.getName() != null)
          if (stringBuffer.length() > 0 && it.hasNext()) {
            stringBuffer.append(", ");
          }
        } // end of while loop (it.hasNext())
View Full Code Here

    try {
      if (statusCollection != null) {
        StringBuffer stringBuffer = new StringBuffer();
        Iterator it = statusCollection.iterator();
        while (it.hasNext()) {
          DDNameValue sourceObject = (DDNameValue) it.next();
          // System.out.println("[DEBUG] [AppSettingsEJB]: sourceObject: " +
          // sourceObject.toString());
          if (sourceObject.getName() != null && sourceObject.getId() == -1) {
            // create a new Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("INSERT INTO projectstatus (Title) VALUES (?)");
            cvdl.setString(1, sourceObject.getName());
            cvdl.executeUpdate();
            int newId = cvdl.getAutoGeneratedKey();
            stringBuffer.append(newId);
          } // end of if statement (sourceObject.getName() != null ...
          else if (sourceObject.getName() != null) {
            // update the existing Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("UPDATE projectstatus SET Title = ? WHERE StatusID = ?");
            cvdl.setString(1, sourceObject.getName());
            cvdl.setInt(2, sourceObject.getId());
            cvdl.executeUpdate();
            stringBuffer.append(sourceObject.getId());
          } // end of else if statement (sourceObject.getName() != null)
          if (stringBuffer.length() > 0 && it.hasNext()) {
            stringBuffer.append(", ");
          }
        } // end of while loop (it.hasNext())
View Full Code Here

    try {
      if (termCollection != null) {
        StringBuffer stringBuffer = new StringBuffer();
        Iterator it = termCollection.iterator();
        while (it.hasNext()) {
          DDNameValue sourceObject = (DDNameValue) it.next();
          if (sourceObject.getName() != null && sourceObject.getId() == -1) {
            // create a new Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("INSERT INTO accountingterms (title) VALUES (?)");
            cvdl.setString(1, sourceObject.getName());
            cvdl.executeUpdate();
            int newId = cvdl.getAutoGeneratedKey();
            stringBuffer.append(newId);
          } // end of if statement (sourceObject.getName() != null ...
          else if (sourceObject.getName() != null) {
            // update the existing Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("UPDATE accountingterms SET title = ? WHERE termsid = ?");
            cvdl.setString(1, sourceObject.getName());
            cvdl.setInt(2, sourceObject.getId());
            cvdl.executeUpdate();
            stringBuffer.append(sourceObject.getId());
          } // end of else if statement (sourceObject.getName() != null)
          if (stringBuffer.length() > 0 && it.hasNext()) {
            stringBuffer.append(", ");
          }
        } // end of while loop (it.hasNext())
View Full Code Here

    try {
      if (statusCollection != null) {
        StringBuffer stringBuffer = new StringBuffer();
        Iterator it = statusCollection.iterator();
        while (it.hasNext()) {
          DDNameValue sourceObject = (DDNameValue) it.next();
          // System.out.println("[DEBUG] [AppSettingsEJB]: sourceObject: " +
          // sourceObject.toString());
          if (sourceObject.getName() != null && sourceObject.getId() == -1) {
            // create a new Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("INSERT INTO accountingstatus (title) VALUES (?)");
            cvdl.setString(1, sourceObject.getName());
            cvdl.executeUpdate();
            int newId = cvdl.getAutoGeneratedKey();
            stringBuffer.append(newId);
          } // end of if statement (sourceObject.getName() != null ...
          else if (sourceObject.getName() != null) {
            // update the existing Source Record
            cvdl.setSqlQueryToNull();
            cvdl.setSqlQuery("UPDATE accountingstatus SET title = ? WHERE statusid = ?");
            cvdl.setString(1, sourceObject.getName());
            cvdl.setInt(2, sourceObject.getId());
            cvdl.executeUpdate();
            stringBuffer.append(sourceObject.getId());
          } // end of else if statement (sourceObject.getName() != null)
          if (stringBuffer.length() > 0 && it.hasNext()) {
            stringBuffer.append(", ");
          }
        } // end of while loop (it.hasNext())
View Full Code Here

TOP

Related Classes of com.centraview.common.DDNameValue

Copyright © 2018 www.massapicom. 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.