re-adding javadoc generation

This commit is contained in:
Lasse Westh-Nielsen
2012-07-31 15:08:00 +01:00
parent 62f0e980ff
commit 5c5723f04a
17 changed files with 602 additions and 626 deletions

1151
pom.xml

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@ package org.springframework.data.neo4j.aspects.core;
import org.neo4j.graphdb.Relationship;
/**
* concrete interface introduced onto Relationship entities by the {@link org.springframework.data.neo4j.support.relationship.Neo4jRelationshipBacking}
* concrete interface introduced onto Relationship entities by the Neo4jRelationshipBacking
* aspect, encapsulates a neo4j relationship as backing state
*/
public interface RelationshipBacked extends GraphBacked<Relationship,RelationshipBacked>{

View File

@@ -49,9 +49,7 @@ public class CrossStoreNodeEntityInstantiator implements EntityInstantiator<Node
* this node is created by the original {@link org.springframework.data.neo4j.mapping.EntityInstantiator}.
* @param n Node to instantiate an entity for
* @param entityClass type of the entity
* @param mappingPolicy
* @param <T> generic type of the entity
* @return
*/
public <T> T createEntityFromState(Node n, Class<T> entityClass, final MappingPolicy mappingPolicy) {
if (n.hasProperty(CrossStoreNodeEntityState.FOREIGN_ID)) {

View File

@@ -46,7 +46,7 @@ public @interface NodeEntity {
* Currently, only JPA storage is supported for partial node entities.
* </p>
*
* @return true if the entity is only partially managed by the {@link org.springframework.data.neo4j.support.node.Neo4jNodeBacking} aspect.
* @return true if the entity is only partially managed by the Neo4jNodeBacking aspect.
*/
boolean partial() default false;

View File

@@ -28,7 +28,7 @@ import org.springframework.data.annotation.Reference;
/**
* Annotation for {@link org.springframework.data.neo4j.annotation.NodeEntity} fields that relate to other entities via
* relationships. The fields represent read only iterators that provide the relationship-entities
* {@link org.springframework.persistence.RelatedEntity} of the relationships. The iterator reflects the underlying relationships.
* {@link RelationshipEntity} of the relationships. The iterator reflects the underlying relationships.
*
* <pre>
* &#64;RelatedToVia([type=&quot;roles&quot;], elementClass=Role.class)

View File

@@ -22,8 +22,7 @@ import java.lang.annotation.*;
/**
* Annotation to declare a Pojo-Entity as graph backed relationship entity.
* It is used by the {@link org.springframework.data.neo4j.support.relationship.Neo4jRelationshipBacking} aspect to add
* field advices as well as the {@link org.springframework.data.neo4j.core.RelationshipBacked} interface.
* It is used by the Neo4jRelationshipBacking aspect to add field advices as well as the RelationshipBacked interface.
*
* Relationship entities cannot be instantiated directly. The will be provided by relationship fields and the
* methods relatedTo and getRelationshipTo introduced to the node entities.

View File

@@ -75,40 +75,30 @@ public @interface EnableNeo4jRepositories {
* Returns the postfix to be used when looking up custom repository implementations. Defaults to {@literal Impl}. So
* for a repository named {@code PersonRepository} the corresponding implementation class will be looked up scanning
* for {@code PersonRepositoryImpl}.
*
* @return
*/
String repositoryImplementationPostfix() default "Impl";
/**
* Configures the location of where to find the Spring Data named queries properties file. Will default to
* {@code META-INFO/neo4j-named-queries.properties}.
*
* @return
*/
String namedQueriesLocation() default "";
/**
* Returns the key of the {@link QueryLookupStrategy} to be used for lookup queries for query methods. Defaults to
* {@link Key#CREATE_IF_NOT_FOUND}.
*
* @return
*/
Key queryLookupStrategy() default Key.CREATE_IF_NOT_FOUND;
/**
* Returns the {@link FactoryBean} class to be used for each repository instance. Defaults to
* {@link GraphRepositoryFactoryBean}.
*
* @return
*/
Class<?> repositoryFactoryBeanClass() default GraphRepositoryFactoryBean.class;
/**
* Returns the name of the {@link Neo4jTemplate} bean to be used with the repository factory. Defaults to
* {@value Neo4jRepositoryConfigurationExtension#DEFAULT_NEO4J_TEMPLATE_REF}.
*
* @return
* {@link Neo4jRepositoryConfigurationExtension#DEFAULT_NEO4J_TEMPLATE_REF}.
*/
String neo4jTemplateRef() default Neo4jRepositoryConfigurationExtension.DEFAULT_NEO4J_TEMPLATE_REF;
}

View File

@@ -35,35 +35,29 @@ public interface EntityState<STATE> {
void setPersistentState(STATE state);
/**
*
* @param property@return a default value for the given field by its {@link FieldAccessor} or {@code null} if none is provided.
* @return a default value for the given field by its {@link FieldAccessor} or {@code null} if none is provided.
*/
Object getDefaultValue(Neo4jPersistentProperty property);
/**
*
* @param field
* @param mappingPolicy
* @return value of the field either from the state and/or the entity
*/
Object getValue(Field field, MappingPolicy mappingPolicy);
/**
* @return value of the property either from the state and/or the entity
*/
Object getValue(Neo4jPersistentProperty property, MappingPolicy mappingPolicy);
/**
*
* @param property@return true if the field can be written
* @return true if the field can be written
*/
boolean isWritable(Neo4jPersistentProperty property);
/**
*
*
* @param field
* @param newVal
* @param mappingPolicy
* @return sets the value in the entity and/or the state
*/
Object setValue(Field field, Object newVal, MappingPolicy mappingPolicy);

View File

@@ -92,7 +92,6 @@ public interface GraphDatabase {
/**
* creates a index
* @param type type of index requested - either Node.class or Relationship.class
* @param indexName, not null
* @param indexType SIMPLE, FULLTEXT or POINT declaring the requested index-type
* @return node index {@link Index}
*/

View File

@@ -45,19 +45,20 @@ public interface TypeRepresentationStrategy<S extends PropertyContainer> {
/**
*
*
* @param type@return lazy Iterable over all instances of the given type
* @param type
* @return lazy Iterable over all instances of the given type
*/
<U> ClosableIterable<S> findAll(final StoredEntityType type);
/**
*
* @param type@return number of instances of this class contained in the graph
* @param type
* @return number of instances of this class contained in the graph
*/
long count(final StoredEntityType type);
/**
*
* @param state
* @return java type that of the node entity of this node
*/
Object readAliasFrom(S state);

View File

@@ -27,7 +27,7 @@ import org.springframework.data.neo4j.fieldaccess.DynamicPropertiesFieldAccessor
* This dynamic property only is available inside a transaction, i.e. when the entity has been saved.
* <p>
* The key/value pairs of the {@link DynamicProperties} property are stored on the node with the keys
* prefixed with the property name that is returned by {@link DelegatingFieldAccessorFactory#getNeo4jPropertyName(Field)}.
* prefixed with the property name that is returned by {@link org.springframework.data.neo4j.mapping.Neo4jPersistentProperty#getNeo4jPropertyName()}.
* <pre>
* &#064;NodeEntity
* class Person {
@@ -87,7 +87,6 @@ public interface DynamicProperties {
/**
* Removes the property with the given key
*
* @param key
* @return the property that has been removed or null if no such property exists and {@link #hasProperty} returns
* <tt>false</tt>
*/

View File

@@ -28,13 +28,15 @@ import org.springframework.data.neo4j.mapping.Neo4jPersistentProperty;
public interface FieldAccessorListenerFactory {
/**
*
* @param property@return true if this factory is able to create a listener for the field
* @param property
* @return true if this factory is able to create a listener for the field
*/
boolean accept(Neo4jPersistentProperty property);
/**
*
* @param property@return newly created field listener
* @param property
* @return newly created field listener
*/
FieldAccessListener forField(Neo4jPersistentProperty property);
}

View File

@@ -33,8 +33,6 @@ public interface Neo4jPersistentProperty extends PersistentProperty<Neo4jPersist
/**
* Returns whether the property represents a relationship. If this returns {@literal true}, clients can expect
* {@link #getRelationshipInfo()} to return a non-{@literal null} value.
*
* @return
*/
boolean isRelationship();
@@ -42,7 +40,6 @@ public interface Neo4jPersistentProperty extends PersistentProperty<Neo4jPersist
* Returns the {@link RelationshipInfo} for the given property if it is a relationship or {@literal null} otherwise.
*
* @see #isRelationship()
* @return
*/
RelationshipInfo getRelationshipInfo();
@@ -56,7 +53,7 @@ public interface Neo4jPersistentProperty extends PersistentProperty<Neo4jPersist
/**
* Returns {@code true} if the type of this property is a natively supported neo4j property type. Supported type are listed here:
* {@link PropertyContainer#setProperty(String, Object)}.
* {@link org.neo4j.graphdb.PropertyContainer#setProperty(String, Object)}.
*/
boolean isNeo4jPropertyType();

View File

@@ -20,10 +20,13 @@ import org.springframework.data.neo4j.conversion.EndResult;
/**
* Repository for spatial queries.
*
* WKT is well known text format like POINT( LON LAT ) POLYGON (( LON1 LAT1 LON2 LAT2 LON3 LAT3 LON1 LAT1 ))
* @see <a href="http://en.wikipedia.org/wiki/Well-known_text">Well Known Text Spatial Format</a>
*
* Right now requires a field: @Indexed(type = POINT, indexName = "...") String wkt;
* inside the entity.
*
* @see <a href="http://en.wikipedia.org/wiki/Well-known_text">Well Known Text Spatial Format</a>
*/
public interface SpatialRepository<T> {
EndResult<T> findWithinBoundingBox(String indexName, double lowerLeftLat,

View File

@@ -29,12 +29,6 @@ public class DoReturn<T> {
this.value = value;
}
/**
* static factory method
* @param value
* @param <T>
* @return
*/
public static <T> DoReturn<T> doReturn(T value) {
return new DoReturn<T>(value);
}

View File

@@ -198,9 +198,6 @@ public class Neo4jTemplate implements Neo4jOperations {
/**
* just sets the persistent state (i.e. Node or id) to the entity, doesn't copy any values/properties.
* @param entity
* @param <S>
* @return
*/
@Override
public <S extends PropertyContainer> S getPersistentState(Object entity) {

View File

@@ -44,18 +44,12 @@ public interface IndexProvider {
/**
* adjust your indexName for the "__types__" indices
*
*
* @param type
* @return prefixed indexName for Type
*/
String createIndexValueForType(Object type);
/**
* possibility to do something with the high level index name
*
* @param indexName
* @param type
* @return
*/
String customizeIndexName(String indexName, Class<?> type);