Package org.springframework.data.elasticsearch.annotations

Examples of org.springframework.data.elasticsearch.annotations.Parent


  @Override
  public void addPersistentProperty(ElasticsearchPersistentProperty property) {
    super.addPersistentProperty(property);

    if (property.getField() != null) {
      Parent parent = property.getField().getAnnotation(Parent.class);
      if (parent != null) {
        Assert.isNull(this.parentIdProperty, "Only one field can hold a @Parent annotation");
        Assert.isNull(this.parentType, "Only one field can hold a @Parent annotation");
        Assert.isTrue(property.getType() == String.class, "Parent ID property should be String");
        this.parentIdProperty = property;
        this.parentType = parent.type();
      }
    }

    if (property.isVersionProperty()) {
      Assert.isTrue(property.getType() == Long.class, "Version property should be Long");
View Full Code Here

TOP

Related Classes of org.springframework.data.elasticsearch.annotations.Parent

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.