Examples of save()


Examples of org.fao.geonet.repository.MetadataFileUploadRepository.save()

        try {
            MetadataFileUpload metadataFileUpload = repo.findByMetadataIdAndFileNameNotDeleted(metadataId, fileName);
            metadataFileUpload.setDeletedDate(new ISODate().toString());

            repo.save(metadataFileUpload);

        } catch (org.springframework.dao.EmptyResultDataAccessException ex) {
            Log.warning(Geonet.RESOURCES, "Delete file upload request: No upload request for (metadataid, file): (" + metadataId + "," + fileName + ")");
        }
    }
View Full Code Here

Examples of org.fao.geonet.repository.MetadataNotifierRepository.save()

            // insert
            if (!notificationTarget.isPreExisting() && StringUtils.isNotBlank(notificationTarget.getName())
                    && StringUtils.isNotBlank(notificationTarget.getUrl())) {

                notifierRepository.save(metadataNotifier);
            } else if(notificationTarget.isPreExisting()) {
                // pre-existing
                String id = notificationTarget.getId();
                // delete
                if(notificationTarget.getName() == null) {
View Full Code Here

Examples of org.fao.geonet.repository.MetadataRatingByIpRepository.save()

        MetadataRatingByIp ratingEntity = new MetadataRatingByIp();
        ratingEntity.setRating(rating);
        ratingEntity.setId(new MetadataRatingByIpId(metadataId, ipAddress));

        final MetadataRatingByIpRepository ratingByIpRepository = _applicationContext.getBean(MetadataRatingByIpRepository.class);
        ratingByIpRepository.save(ratingEntity);

        //
        // calculate new rating
        //
        final int newRating = ratingByIpRepository.averageRating(metadataId);
View Full Code Here

Examples of org.fao.geonet.repository.MetadataRelationRepository.save()

        boolean exist = false;
    if (count == 1) {
      exist = true;
    } else {
            MetadataRelation entity = new MetadataRelation().setId(new MetadataRelationId(parentId, childId));
            metadataRelationRepository.save(entity);
    }
   
    Element response = new Element(Jeeves.Elem.RESPONSE)
        .setAttribute("alreadyExist", String.valueOf(exist))
        .addContent(
View Full Code Here

Examples of org.fao.geonet.repository.MetadataRepository.save()

        if (((ArrayList<Group>)params.getGroupCopyPolicy()).size() == 0) {
            addPrivileges(id, params.getPrivileges(), localGroups, dataMan, context, log);
        } else {
            addPrivilegesFromGroupPolicy(id, info.getChild("privileges"));
        }
        metadataRepository.save(metadata);
//        dataMan.flush();

        dataMan.indexMetadata(id, false);
    result.addedMetadata++;
View Full Code Here

Examples of org.fao.geonet.repository.MetadataValidationRepository.save()

                .setTested(results[1])
                .setFailed(results[2])
                .setValidationDate(new ISODate(date));
            MetadataValidationId validationId = new MetadataValidationId(Integer.valueOf(id), type);
            metadataValidation.setId(validationId);
            validationRepository.save(metadataValidation);
        }
    }

    /**
     * Removes validation status information for a metadata record.
View Full Code Here

Examples of org.fao.geonet.repository.OperationAllowedRepository.save()

                    OperationAllowedId id = new OperationAllowedId()
                            .setGroupId(targetGrp)
                            .setMetadataId(mdId)
                            .setOperationId(opId);
                    OperationAllowed operationAllowed = new OperationAllowed(id );
                    repository.save(operationAllowed);
                }
            }

            // Collect all metadata ids
            metadata.add(mdId);
View Full Code Here

Examples of org.fao.geonet.repository.SchematronRepository.save()

        final SchematronRepository repo = _applicationContext.getBean(SchematronRepository.class);
        Schematron schematron = new Schematron();
        schematron.setSchemaName(schemaName);
        schematron.setFile(schemaManager.getSchemaDir(schemaName) + File.separator + "schematron" + File.separator
                           + "schematron-rules-geonetwork.sch");
        repo.save(schematron);
    }
}
View Full Code Here

Examples of org.fao.geonet.repository.SettingRepository.save()

            }

            private boolean checkDBWrite() {
                SettingRepository settingsRepo = gc.getBean(SettingRepository.class);
                try {
                    Setting newSetting = settingsRepo.save(new Setting().setName("DBHeartBeat").setValue("value"));
                    settingsRepo.flush();
                    settingsRepo.delete(newSetting);
                    return true;
                } catch (Exception x) {
                    logger.info("DBHeartBeat Exception: " + x.getMessage());
View Full Code Here

Examples of org.fao.geonet.repository.SourceRepository.save()

        if (newUuid != null && !currentUuid.equals(newUuid)) {
            final MetadataRepository metadataRepository = context.getBean(MetadataRepository.class);
            final SourceRepository sourceRepository = context.getBean(SourceRepository.class);
            final Source source = sourceRepository.findOne(currentUuid);
            Source newSource = new Source(newUuid, source.getName(), source.isLocal());
            sourceRepository.save(newSource);

            PathSpec<Metadata, String> servicesPath = new PathSpec<Metadata, String>() {
                @Override
                public Path<String> getPath(Root<Metadata> root) {
                    return root.get(Metadata_.sourceInfo).get(MetadataSourceInfo_.sourceId);
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.