Package org.springframework.data.mongodb.repository

Examples of org.springframework.data.mongodb.repository.Meta


   * @return never {@literal null}.
   * @since 1.6
   */
  public org.springframework.data.mongodb.core.query.Meta getQueryMetaAttributes() {

    Meta meta = getMetaAnnotation();
    if (meta == null) {
      return new org.springframework.data.mongodb.core.query.Meta();
    }

    org.springframework.data.mongodb.core.query.Meta metaAttributes = new org.springframework.data.mongodb.core.query.Meta();
    if (meta.maxExcecutionTime() > 0) {
      metaAttributes.setMaxTimeMsec(meta.maxExcecutionTime());
    }

    if (meta.maxScanDocuments() > 0) {
      metaAttributes.setMaxScan(meta.maxScanDocuments());
    }

    if (StringUtils.hasText(meta.comment())) {
      metaAttributes.setComment(meta.comment());
    }

    if (meta.snapshot()) {
      metaAttributes.setSnapshot(meta.snapshot());
    }

    return metaAttributes;
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.repository.Meta

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.