|
|||||||||
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.EntityFeatureMapper<DbFeature<Tag>>
org.openstreetmap.osmosis.core.pgsql.v0_6.impl.TagMapper
public class TagMapper
Reads and writes tags to jdbc classes.
Constructor Summary | |
---|---|
TagMapper(java.lang.String parentEntityName)
Creates a new instance. |
Method Summary | |
---|---|
DbFeature<Tag> |
buildEntity(java.sql.ResultSet resultSet)
Creates a new entity based upon the current row in the result set. |
java.lang.String |
getEntityName()
Returns the name of the entity feature. |
java.lang.String |
getParentEntityName()
Returns the name of the entity features entity type. |
java.lang.String |
getSqlDelete(boolean filterByEntityId)
The SQL DELETE statement for deleting entity features. |
java.lang.String |
getSqlInsert(int rowCount)
The SQL INSERT statement for adding features. |
java.lang.String |
getSqlSelect(boolean filterByEntityId,
boolean orderBy)
The SQL SELECT statement for retrieving entity feature details. |
int |
populateEntityParameters(java.sql.PreparedStatement statement,
int initialIndex,
DbFeature<Tag> entityFeature)
Sets entity values as bind variable parameters to an entity insert query. |
Methods inherited from class org.openstreetmap.osmosis.core.pgsql.v0_6.impl.EntityFeatureMapper |
---|
getSqlDefaultOrderBy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TagMapper(java.lang.String parentEntityName)
parentEntityName
- The name of the parent entity. This is used to generate SQL
statements for the correct tag table name.Method Detail |
---|
public java.lang.String getParentEntityName()
getParentEntityName
in class EntityFeatureMapper<DbFeature<Tag>>
public java.lang.String getEntityName()
getEntityName
in class EntityFeatureMapper<DbFeature<Tag>>
public java.lang.String getSqlSelect(boolean filterByEntityId, boolean orderBy)
getSqlSelect
in class EntityFeatureMapper<DbFeature<Tag>>
filterByEntityId
- If true, a WHERE clause will be added filtering by the entity
id column.orderBy
- If true, a default ORDER BY clause will be added ordering by
the entity id column at a minimum and possibly other fields
depending on implementation.
public java.lang.String getSqlInsert(int rowCount)
getSqlInsert
in class EntityFeatureMapper<DbFeature<Tag>>
rowCount
- The number of rows to insert in a single statement.
public java.lang.String getSqlDelete(boolean filterByEntityId)
getSqlDelete
in class EntityFeatureMapper<DbFeature<Tag>>
filterByEntityId
- If true, a WHERE clause will be added filtering by the entity
id column.
public DbFeature<Tag> buildEntity(java.sql.ResultSet resultSet)
buildEntity
in class EntityFeatureMapper<DbFeature<Tag>>
resultSet
- The result set to read from.
public int populateEntityParameters(java.sql.PreparedStatement statement, int initialIndex, DbFeature<Tag> entityFeature)
populateEntityParameters
in class EntityFeatureMapper<DbFeature<Tag>>
statement
- The prepared statement to add the values to.initialIndex
- The offset index of the first variable to set.entityFeature
- The entity containing the data to be inserted.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |