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. * 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() { public String getRegionName() {
return this.regionName; return this.regionName;

View File

@@ -62,7 +62,7 @@ public class Regions implements Iterable<Region<?, ?>> {
* name in case no mapping information is found. * name in case no mapping information is found.
* *
* @param type must not be {@literal null}. * @param type must not be {@literal null}.
* @return * @return the {@link Region} the given type is mapped to.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public <T> Region<?, T> getRegion(Class<T> type) { 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}. * @param name must not be {@literal null}.
* @return * @return the {@link Region} with the given name.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public <S, T> Region<S, T> getRegion(String name) { public <S, T> Region<S, T> getRegion(String name) {

View File

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

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. * 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(); String getRegionName();
} }

View File

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

View File

@@ -19,6 +19,7 @@ import java.io.Serializable;
import java.util.Collection; import java.util.Collection;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; import org.springframework.context.ApplicationContextAware;
import org.springframework.data.gemfire.mapping.GemfirePersistentEntity; import org.springframework.data.gemfire.mapping.GemfirePersistentEntity;
@@ -32,11 +33,12 @@ import com.gemstone.bp.edu.emory.mathcs.backport.java.util.Collections;
import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.Region;
/** /**
* {@link FactoryBean} adapter for {@link GemfireRepositoryFactory}.
* *
* @author Oliver Gierke * @author Oliver Gierke
*/ */
public class GemfireRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable> extends 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 MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> context;
private Iterable<Region<?, ?>> regions; private Iterable<Region<?, ?>> regions;
@@ -53,6 +55,8 @@ public class GemfireRepositoryFactoryBean<T extends Repository<S, ID>, S, ID ext
} }
/** /**
* Configures the {@link MappingContext} to be used.
*
* @param context the context to set * @param context the context to set
*/ */
public void setMappingContext(MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> context) { public void setMappingContext(MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> context) {