private Workflow updateWorkflow()

in app/src/main/java/org/apache/taverna/mobile/data/local/DBHelper.java [72:121]


    private Workflow updateWorkflow(Workflow workflow) {

        Workflow workflow1 = SQLite.select()
                .from(Workflow.class)
                .where(Workflow_Table.id.eq(workflow.getId()))
                .querySingle();

        if (workflow1 != null) {
            if (workflow.getDescription() != null) {

                workflow1.setDescription(workflow.getDescription());
            }
            if (workflow.getUpdatedAt() != null) {

                workflow1.setUpdatedAt(workflow.getUpdatedAt());
            }
            if (workflow.getSvgUri() != null) {

                workflow1.setSvgUri(workflow.getSvgUri());
            }
            if (workflow.getLicenseType() != null) {

                workflow1.setLicenseType(workflow.getLicenseType());
            }
            if (workflow.getContentUri() != null) {

                workflow1.setContentUri(workflow.getContentUri());
            }
            if (workflow.getContentType() != null) {

                workflow1.setContentUri(workflow.getContentType());
            }
            if (workflow.getElementId() != null) {

                workflow1.setElementId(workflow.getElementId());
            }
            workflow1.setFavourite(workflow1.isFavourite());
            workflow1.setTitle(workflow.getTitle());
            workflow1.setType(workflow.getType());
            workflow1.setUploader(workflow.getUploader());
            workflow1.setPreviewUri(workflow.getPreviewUri());
            workflow1.setCreatedAt(workflow.getCreatedAt());
            workflow1.setResource(workflow.getResource());
            workflow1.setUri(workflow.getUri());
            workflow1.setId(workflow.getId());
            workflow1.setVersion(workflow.getVersion());

        }
        return workflow1;
    }