Package org.springframework.data.elasticsearch.core.mapping

Examples of org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty


  }

  @SuppressWarnings("unchecked")
  @Override
  public ID getId(T entity) {
    ElasticsearchPersistentProperty id = entityMetadata.getIdProperty();
    try {
      return (ID) BeanWrapper.create(entity, null).getProperty(id);
    } catch (Exception e) {
      throw new IllegalStateException("ID could not be resolved", e);
    }
View Full Code Here


    return type != null ? type : entityMetadata.getIndexType();
  }

  @Override
  public Long getVersion(T entity) {
    ElasticsearchPersistentProperty versionProperty = entityMetadata.getVersionProperty();
    try {
      if (versionProperty != null) {
        return (Long) BeanWrapper.create(entity, null).getProperty(versionProperty);
      }
    } catch (Exception e) {
View Full Code Here

    return null;
  }

  @Override
  public String getParentId(T entity) {
    ElasticsearchPersistentProperty parentProperty = entityMetadata.getParentIdProperty();
    try {
      if (parentProperty != null) {
        return (String) BeanWrapper.create(entity, null).getProperty(parentProperty);
      }
    } catch (Exception e) {
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    @Override
    public ID getId(T entity) {
        ElasticsearchPersistentProperty id = entityMetadata.getIdProperty();
        try {
            return (ID) BeanWrapper.create(entity, null).getProperty(id);
        } catch (Exception e) {
            throw new IllegalStateException("ID could not be resolved", e);
        }
View Full Code Here

        return type != null? type : entityMetadata.getIndexType();
    }

    @Override
    public Long getVersion(T entity) {
        ElasticsearchPersistentProperty versionProperty = entityMetadata.getVersionProperty();
        try {
            if(versionProperty != null){
                return (Long) BeanWrapper.create(entity, null).getProperty(versionProperty);
            }
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty

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.