Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.domain.repository
Class RepositoryStrategy

    java.lang.Object
      com.gisgraphy.domain.repository.RepositoryStrategy

All Implemented Interfaces:
  IRepositoryStrategy

    @Component
    public class RepositoryStrategy

extends Object
implements IRepositoryStrategy

A class based on the stategy pattern

Author:
  David Masclet
See Also:
  Strategy pattern

Field Summary
`static Map<Class<? extends GisFeature>,IGisDao<? extends GisFeature>>` | `daoMap` A Map with GisFeature call as keys and Dao as Values.
`protected IGisDao<? extends GisFeature>[]` | `daos`
`protected static org.slf4j.Logger` | `logger` The logger

Constructor Summary
`RepositoryStrategy()`

Method Summary
`Collection<IGisDao<? extends GisFeature>>` | `getAvailablesDaos()`
`IGisDao<? extends GisFeature>` | `getDao(Class<?> placeType)`
`void` | `initMap()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### daos

    protected IGisDao<? extends GisFeature>[] daos

### logger

    protected static final org.slf4j.Logger logger

  The logger

### daoMap

    public static final Map<Class<? extends GisFeature>,IGisDao<? extends GisFeature>> daoMap

  A Map with GisFeature call as keys and Dao as Values. A (Gis)dao is associated to a Class

Constructor Detail

### RepositoryStrategy

    public RepositoryStrategy()

Method Detail

### initMap

    @PostConstruct
    public void initMap()
                 throws Exception

  Throws:
    `Exception`

### getDao

    public IGisDao<? extends GisFeature> getDao(Class<?> placeType)

  Specified by:
    `getDao` in interface `IRepositoryStrategy`
  Parameters:
    `placeType` - the placetype we'd like to retrieve the dao. if the place type is null the gisFeatureDao will be return
  Returns:
    the dao corresponding to the specified class

### getAvailablesDaos

    public Collection<IGisDao<? extends GisFeature>> getAvailablesDaos()

  Specified by:
    `getAvailablesDaos` in interface `IRepositoryStrategy`
  Returns:
    all the availables daos. never return null but an empty Arraylist if there is no dao

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.