Package org.fao.geonet.repository

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


      OperationAllowedRepository operationAllowedRepository = context.getBean(OperationAllowedRepository.class);

        final Specification<OperationAllowed> hasGroupId = OperationAllowedSpecs.hasGroupId(ReservedGroup.all.getId());
        final Specification<OperationAllowed> hasMetadataId = OperationAllowedSpecs.hasMetadataId(id);
        final Specifications<OperationAllowed> spec = Specifications.where(hasGroupId).and(hasMetadataId);
        List<OperationAllowed> opsAllowed = operationAllowedRepository.findAll(spec);
    return !opsAllowed.isEmpty();
  }

  //--------------------------------------------------------------------------
View Full Code Here


    }

    private SetMultimap<Integer, ReservedOperation> loadOperationsAllowed(ServiceContext context, Specification<OperationAllowed>
            operationAllowedSpec) {
        final OperationAllowedRepository operationAllowedRepo= context.getBean(OperationAllowedRepository.class);
        List<OperationAllowed> operationsAllowed = operationAllowedRepo.findAll(operationAllowedSpec);
        SetMultimap<Integer, ReservedOperation> operationsPerMetadata = HashMultimap.create();
        for (OperationAllowed allowed : operationsAllowed) {
            final OperationAllowedId id = allowed.getId();
            operationsPerMetadata.put(id.getMetadataId(), ReservedOperation.lookup(id.getOperationId()));
        }
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.