|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.pgsql.v0_6.impl.PostgresSqlEntityManager<T>
T
- The entity type to be supported.public class PostgresSqlEntityManager<T extends Entity>
Provides postgres entity manager support allowing entities to be manipulated via a common dataset interface.
Constructor Summary | |
---|---|
PostgresSqlEntityManager(EntityDao<T> entityDao,
UserDao userDao)
Creates a new instance. |
Method Summary | |
---|---|
void |
addEntity(T entity)
Adds the specified entity to the database. |
boolean |
exists(long id)
Indicates if the specified entity exists in the database. |
T |
getEntity(long id)
Retrieves an entity by its identifier. |
ReleasableIterator<T> |
iterate()
Returns an iterator providing access to all entities in the database. |
void |
modifyEntity(T entity)
Updates the specified entity details in the database. |
void |
removeEntity(long entityId)
Removes the specified entity from the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PostgresSqlEntityManager(EntityDao<T> entityDao, UserDao userDao)
entityDao
- The dao allowing manipulation of a specific entity type.userDao
- The user dao allowing user entries to be updated or created.Method Detail |
---|
public void addEntity(T entity)
addEntity
in interface EntityManager<T extends Entity>
entity
- The entity to add.public boolean exists(long id)
exists
in interface EntityManager<T extends Entity>
id
- The id of the entity.
public T getEntity(long id)
getEntity
in interface EntityManager<T extends Entity>
id
- The id of the entity.
public ReleasableIterator<T> iterate()
iterate
in interface EntityManager<T extends Entity>
public void modifyEntity(T entity)
modifyEntity
in interface EntityManager<T extends Entity>
entity
- The entity to update.public void removeEntity(long entityId)
removeEntity
in interface EntityManager<T extends Entity>
entityId
- The id of the entity to remove.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |