|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.apidb.v0_6.impl.EntityDao<T>
T
- The entity type to be supported.public abstract class EntityDao<T extends Entity>
Provides functionality common to all top level entity daos.
Constructor Summary | |
---|---|
protected |
EntityDao(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
java.lang.String entityName)
Creates a new instance. |
Method Summary | |
---|---|
protected abstract EntityContainerFactory<T> |
getContainerFactory()
Gets the entity container factory for the entity type. |
ReleasableIterator<EntityContainer> |
getCurrent()
Retrieves all current data in the database. |
protected abstract RowMapperListener<CommonEntityData> |
getEntityRowMapper(RowMapperListener<T> entityListener)
Creates a row mapper that receives common entity data objects and produces full entity objects. |
protected abstract java.util.List<FeatureHistoryPopulator<T,?,?>> |
getFeatureHistoryPopulators(java.lang.String selectedEntityStatement,
org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource)
Gets the history feature populators for the entity type. |
ReleasableIterator<ChangeContainer> |
getHistory()
Retrieves all changes in the database. |
ReleasableIterator<ChangeContainer> |
getHistory(java.util.Date intervalBegin,
java.util.Date intervalEnd)
Retrieves the changes that have were made between two points in time. |
ReleasableIterator<ChangeContainer> |
getHistory(ReplicationQueryPredicates predicates)
Retrieves the changes that have were made by a set of transactions. |
protected org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate |
getNamedParamJdbcTemplate()
Provides access to the named parameter jdbc template. |
protected abstract java.lang.String[] |
getTypeSpecificFieldNames()
Produces an array of additional column names specific to this entity type to be returned by entity queries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected EntityDao(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, java.lang.String entityName)
jdbcTemplate
- Used to access the database.entityName
- The name of the entity. Used for building dynamic sql queries.Method Detail |
---|
protected org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate getNamedParamJdbcTemplate()
protected abstract java.lang.String[] getTypeSpecificFieldNames()
protected abstract RowMapperListener<CommonEntityData> getEntityRowMapper(RowMapperListener<T> entityListener)
entityListener
- The full entity object listener.
protected abstract EntityContainerFactory<T> getContainerFactory()
protected abstract java.util.List<FeatureHistoryPopulator<T,?,?>> getFeatureHistoryPopulators(java.lang.String selectedEntityStatement, org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource)
selectedEntityStatement
- The statement for obtaining the id and version pairs of entity records selected.parameterSource
- The parameters required to execute the selected entity statement.
public ReleasableIterator<ChangeContainer> getHistory(ReplicationQueryPredicates predicates)
predicates
- Contains the predicates defining the transactions to be queried.
public ReleasableIterator<ChangeContainer> getHistory(java.util.Date intervalBegin, java.util.Date intervalEnd)
intervalBegin
- Marks the beginning (inclusive) of the time interval to be checked.intervalEnd
- Marks the end (exclusive) of the time interval to be checked.
public ReleasableIterator<ChangeContainer> getHistory()
public ReleasableIterator<EntityContainer> getCurrent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |