Polished Javadoc in repository subsystem.

This commit is contained in:
Oliver Gierke
2012-05-07 12:06:11 +02:00
parent 77478fe0b6
commit f3cf6f013e
6 changed files with 20 additions and 14 deletions

View File

@@ -49,7 +49,7 @@ public class GemfirePersistentEntity<T> extends BasicPersistentEntity<T, Gemfire
/**
* Returns the name of the region the entity shall be stored in.
*
* @return
* @return the name of the region the entity shall be stored in.
*/
public String getRegionName() {
return this.regionName;

View File

@@ -62,7 +62,7 @@ public class Regions implements Iterable<Region<?, ?>> {
* name in case no mapping information is found.
*
* @param type must not be {@literal null}.
* @return
* @return the {@link Region} the given type is mapped to.
*/
@SuppressWarnings("unchecked")
public <T> Region<?, T> getRegion(Class<T> type) {
@@ -74,10 +74,10 @@ public class Regions implements Iterable<Region<?, ?>> {
}
/**
* Returns the region with the given name.
* Returns the {@link Region} with the given name.
*
* @param name must not be {@literal null}.
* @return
* @return the {@link Region} with the given name.
*/
@SuppressWarnings("unchecked")
public <S, T> Region<S, T> getRegion(String name) {
@@ -87,7 +87,7 @@ public class Regions implements Iterable<Region<?, ?>> {
return (Region<S, T>) regions.get(name);
}
/*
/*
* (non-Javadoc)
* @see java.lang.Iterable#iterator()
*/

View File

@@ -27,21 +27,21 @@ import org.springframework.data.repository.core.support.ReflectionEntityInformat
* @author Oliver Gierke
*/
public class DefaultGemfireEntityInformation<T, ID extends Serializable> extends DelegatingEntityInformation<T, ID>
implements GemfireEntityInformation<T, ID> {
implements GemfireEntityInformation<T, ID> {
private final GemfirePersistentEntity<T> entity;
/**
* Creates a new {@link DefaultGemfireEntityInformation}.
*
* @param domainClass must not be {@literal null}.
* @param entity must not be {@literal null}.
*/
public DefaultGemfireEntityInformation(GemfirePersistentEntity<T> entity) {
super(new ReflectionEntityInformation<T, ID>(entity.getType()));
this.entity = entity;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.gemfire.repository.query.GemfireEntityInformation#getRegionName()
*/

View File

@@ -31,7 +31,7 @@ public interface GemfireEntityInformation<T, ID extends Serializable> extends En
/**
* Returns the name of the {@link Region} the entity is held in.
*
* @return
* @return the name of the {@link Region} the entity is held in.
*/
String getRegionName();
}

View File

@@ -58,14 +58,16 @@ public class GemfireQueryMethod extends QueryMethod {
/**
* Returns whether the query method contains an annotated, non-empty query.
*
* @return
* @return whether the query method contains an annotated, non-empty query.
*/
public boolean hasAnnotatedQuery() {
return StringUtils.hasText(getAnnotatedQuery());
}
/**
* @return the entity
* Returns the {@link GemfirePersistentEntity} the method deals with.
*
* @return the {@link GemfirePersistentEntity} the method deals with.
*/
public GemfirePersistentEntity<?> getPersistentEntity() {
return entity;

View File

@@ -19,6 +19,7 @@ import java.io.Serializable;
import java.util.Collection;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.data.gemfire.mapping.GemfirePersistentEntity;
@@ -32,16 +33,17 @@ import com.gemstone.bp.edu.emory.mathcs.backport.java.util.Collections;
import com.gemstone.gemfire.cache.Region;
/**
* {@link FactoryBean} adapter for {@link GemfireRepositoryFactory}.
*
* @author Oliver Gierke
*/
public class GemfireRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable> extends
RepositoryFactoryBeanSupport<T, S, ID> implements ApplicationContextAware {
RepositoryFactoryBeanSupport<T, S, ID> implements ApplicationContextAware {
private MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> context;
private Iterable<Region<?, ?>> regions;
/*
/*
* (non-Javadoc)
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
*/
@@ -53,13 +55,15 @@ public class GemfireRepositoryFactoryBean<T extends Repository<S, ID>, S, ID ext
}
/**
* Configures the {@link MappingContext} to be used.
*
* @param context the context to set
*/
public void setMappingContext(MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> context) {
this.context = context;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#createRepositoryFactory()
*/