Package com.microsoft.windowsazure.management.sql.models

Examples of com.microsoft.windowsazure.management.sql.models.RestoreDatabaseOperationCreateResponse


                }
                throw ex;
            }
           
            // Create Result
            RestoreDatabaseOperationCreateResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new RestoreDatabaseOperationCreateResponse();
            DocumentBuilderFactory documentBuilderFactory2 = DocumentBuilderFactory.newInstance();
            documentBuilderFactory2.setNamespaceAware(true);
            DocumentBuilder documentBuilder2 = documentBuilderFactory2.newDocumentBuilder();
            Document responseDoc = documentBuilder2.parse(new BOMInputStream(responseContent));
           
            Element serviceResourceElement2 = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/windowsazure", "ServiceResource");
            if (serviceResourceElement2 != null) {
                RestoreDatabaseOperation serviceResourceInstance = new RestoreDatabaseOperation();
                result.setOperation(serviceResourceInstance);
               
                Element requestIDElement = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "RequestID");
                if (requestIDElement != null) {
                    String requestIDInstance;
                    requestIDInstance = requestIDElement.getTextContent();
                    serviceResourceInstance.setId(requestIDInstance);
                }
               
                Element sourceDatabaseNameElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "SourceDatabaseName");
                if (sourceDatabaseNameElement2 != null) {
                    String sourceDatabaseNameInstance;
                    sourceDatabaseNameInstance = sourceDatabaseNameElement2.getTextContent();
                    serviceResourceInstance.setSourceDatabaseName(sourceDatabaseNameInstance);
                }
               
                Element sourceDatabaseDeletionDateElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "SourceDatabaseDeletionDate");
                if (sourceDatabaseDeletionDateElement2 != null && (sourceDatabaseDeletionDateElement2.getTextContent() == null || sourceDatabaseDeletionDateElement2.getTextContent().isEmpty() == true) == false) {
                    Calendar sourceDatabaseDeletionDateInstance;
                    sourceDatabaseDeletionDateInstance = DatatypeConverter.parseDateTime(sourceDatabaseDeletionDateElement2.getTextContent());
                    serviceResourceInstance.setSourceDatabaseDeletionDate(sourceDatabaseDeletionDateInstance);
                }
               
                Element targetServerNameElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "TargetServerName");
                if (targetServerNameElement2 != null) {
                    String targetServerNameInstance;
                    targetServerNameInstance = targetServerNameElement2.getTextContent();
                    serviceResourceInstance.setTargetServerName(targetServerNameInstance);
                }
               
                Element targetDatabaseNameElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "TargetDatabaseName");
                if (targetDatabaseNameElement2 != null) {
                    String targetDatabaseNameInstance;
                    targetDatabaseNameInstance = targetDatabaseNameElement2.getTextContent();
                    serviceResourceInstance.setTargetDatabaseName(targetDatabaseNameInstance);
                }
               
                Element targetUtcPointInTimeElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "TargetUtcPointInTime");
                if (targetUtcPointInTimeElement2 != null) {
                    Calendar targetUtcPointInTimeInstance;
                    targetUtcPointInTimeInstance = DatatypeConverter.parseDateTime(targetUtcPointInTimeElement2.getTextContent());
                    serviceResourceInstance.setPointInTime(targetUtcPointInTimeInstance);
                }
            }
           
            result.setStatusCode(statusCode);
            if (httpResponse.getHeaders("x-ms-request-id").length > 0) {
                result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue());
            }
           
            if (shouldTrace) {
                CloudTracing.exit(invocationId, result);
            }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.management.sql.models.RestoreDatabaseOperationCreateResponse

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.