|
|||||||||
| 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.EntityMapper<T>
T - The entity type to be supported.public abstract class EntityMapper<T extends Entity>
Provides functionality common to all database entity builder implementations.
| Constructor Summary | |
|---|---|
EntityMapper()
|
|
| Method Summary | |
|---|---|
protected OsmUser |
buildUser(java.sql.ResultSet resultSet)
Creates a new user record based upon the current result set row. |
abstract java.lang.Class<T> |
getEntityClass()
Returns the class type for the entity. |
abstract java.lang.String |
getEntityName()
Returns the name of the entity to substitute into SQL statements. |
abstract ActionDataType |
getEntityType()
Returns the action data type of the entity. |
java.lang.String |
getSqlDelete(boolean filterByEntityId)
The SQL UPDATE statement for logically deleting entities. |
java.lang.String |
getSqlInsert(int rowCount)
The SQL INSERT statement for adding entities. |
java.lang.String |
getSqlSelect(boolean filterByEntityId,
boolean orderByEntityId)
The SQL SELECT statement for retrieving entity details. |
java.lang.String |
getSqlSelectCount(boolean filterByEntityId)
The SQL SELECT statement for counting entities. |
java.lang.String |
getSqlUpdate(boolean filterByEntityId)
The SQL UPDATE statement for updating entity details. |
protected abstract java.lang.String[] |
getTypeSpecificFieldNames()
Produces an array of additional column names specific to this entity type to be returned by entity queries. |
abstract T |
parseRecord(java.sql.ResultSet resultSet)
Creates a new entity based upon the current row in the result set. |
protected int |
populateCommonEntityParameters(java.sql.PreparedStatement statement,
int initialIndex,
Entity entity)
Sets common entity values as bind variable parameters to an entity insert query. |
abstract int |
populateEntityParameters(java.sql.PreparedStatement statement,
int initialIndex,
T entity)
Sets entity values as bind variable parameters to an entity insert query. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EntityMapper()
| Method Detail |
|---|
public abstract java.lang.String getEntityName()
public abstract ActionDataType getEntityType()
public abstract java.lang.Class<T> getEntityClass()
public java.lang.String getSqlSelectCount(boolean filterByEntityId)
filterByEntityId - If true, a WHERE clause will be added filtering by the entity
id column.
protected abstract java.lang.String[] getTypeSpecificFieldNames()
public java.lang.String getSqlSelect(boolean filterByEntityId,
boolean orderByEntityId)
filterByEntityId - If true, a WHERE clause will be added filtering by the entity
id column.orderByEntityId - If true, an ORDER BY clause will be added ordering by the
entity id column.
public java.lang.String getSqlInsert(int rowCount)
rowCount - The number of rows to insert in a single statement.
public java.lang.String getSqlUpdate(boolean filterByEntityId)
filterByEntityId - If true, a WHERE clause will be added filtering by the entity
id column.
public java.lang.String getSqlDelete(boolean filterByEntityId)
filterByEntityId - If true, a WHERE clause will be added filtering by the entity
id column.
public abstract T parseRecord(java.sql.ResultSet resultSet)
resultSet - The result set to read from.
protected OsmUser buildUser(java.sql.ResultSet resultSet)
resultSet - The result set to read from.
protected int populateCommonEntityParameters(java.sql.PreparedStatement statement,
int initialIndex,
Entity entity)
statement - The prepared statement to add the values to.initialIndex - The offset index of the first variable to set.entity - The entity containing the data to be inserted.
public abstract int populateEntityParameters(java.sql.PreparedStatement statement,
int initialIndex,
T entity)
statement - The prepared statement to add the values to.initialIndex - The offset index of the first variable to set.entity - The entity containing the data to be inserted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||