|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.domain.v0_6.EntityBuilder<T>
T
- The type of entity to be built.
@Deprecated public abstract class EntityBuilder<T extends Entity>
Provides facilities to specify the contents of entity and create new instances. Entities themselves are immutable to support concurrent access, this class provides a means of manipulating them.
Field Summary | |
---|---|
protected int |
changesetId
Deprecated. The entity changeset identifier. |
protected long |
id
Deprecated. The unique entity identifier. |
protected java.util.Collection<Tag> |
tags
Deprecated. The tags describing the entity. |
protected TimestampContainer |
timestampContainer
Deprecated. The entity timestamp container. |
protected OsmUser |
user
Deprecated. The user who created the entity. |
protected int |
version
Deprecated. The current entity version. |
Constructor Summary | |
---|---|
EntityBuilder()
Deprecated. Creates a new instance. |
|
EntityBuilder(Entity entity)
Deprecated. Creates a new instance. |
|
EntityBuilder(long id,
int version,
java.util.Date timestamp,
OsmUser user,
long changesetId)
Deprecated. Creates a new instance. |
|
EntityBuilder(long id,
int version,
TimestampContainer timestampContainer,
OsmUser user,
long changesetId)
Deprecated. Creates a new instance. |
Method Summary | |
---|---|
EntityBuilder<T> |
addTag(Tag tag)
Deprecated. Adds a new tag. |
abstract T |
buildEntity()
Deprecated. Builds a new entity instance based on the current data. |
EntityBuilder<T> |
clearTags()
Deprecated. Remove all existing tags. |
long |
getChangesetId()
Deprecated. Gets the id of the changeset that this version of the entity was created by. |
long |
getId()
Deprecated. Gets the current id value. |
java.util.Collection<Tag> |
getTags()
Deprecated. Obtains the tags. |
java.util.Date |
getTimestamp()
Deprecated. Gets the current timestamp value. |
TimestampContainer |
getTimestampContainer()
Deprecated. Gets the current timestamp value. |
OsmUser |
getUser()
Deprecated. Gets the current user value. |
int |
getVersion()
Deprecated. Gets the current version value. |
protected EntityBuilder<T> |
initialize(Entity entity)
Deprecated. Initializes the contents of the builder to the specified data. |
protected EntityBuilder<T> |
initialize(long newId,
int newVersion,
java.util.Date newTimestamp,
OsmUser newUser,
long newChangesetId)
Deprecated. Initializes the contents of the builder to the specified data. |
protected EntityBuilder<T> |
initialize(long newId,
int newVersion,
TimestampContainer newTimestampContainer,
OsmUser newUser,
long newChangesetId)
Deprecated. Initializes the contents of the builder to the specified data. |
EntityBuilder<T> |
setChangesetId(long newChangesetId)
Deprecated. Sets the id of the changeset that this version of the entity was created by. |
EntityBuilder<T> |
setId(long newId)
Deprecated. Sets a new id value. |
EntityBuilder<T> |
setTags(java.util.Collection<Tag> newTags)
Deprecated. Sets a new tags value. |
EntityBuilder<T> |
setTimestamp(java.util.Date timestamp)
Deprecated. Sets a new timestamp value. |
EntityBuilder<T> |
setTimestamp(TimestampContainer newTimestampContainer)
Deprecated. Sets a new timestamp value. |
EntityBuilder<T> |
setUser(OsmUser newUser)
Deprecated. Sets a new user value. |
EntityBuilder<T> |
setVersion(int newVersion)
Deprecated. Sets a new version value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openstreetmap.osmosis.core.store.Storeable |
---|
store |
Field Detail |
---|
protected long id
protected int version
protected TimestampContainer timestampContainer
protected OsmUser user
protected int changesetId
protected java.util.Collection<Tag> tags
Constructor Detail |
---|
public EntityBuilder()
public EntityBuilder(Entity entity)
entity
- The entity to initialise to.public EntityBuilder(long id, int version, java.util.Date timestamp, OsmUser user, long changesetId)
id
- The unique identifier.version
- The version of the entity.timestamp
- The last updated timestamp.user
- The user that last modified this entity.changesetId
- The id of the changeset that this version of the entity was created by.public EntityBuilder(long id, int version, TimestampContainer timestampContainer, OsmUser user, long changesetId)
id
- The unique identifier.version
- The version of the entity.timestampContainer
- The container holding the timestamp in an alternative
timestamp representation.user
- The user that last modified this entity.changesetId
- The id of the changeset that this version of the entity was created by.Method Detail |
---|
protected EntityBuilder<T> initialize(Entity entity)
entity
- The entity to initialise to.
protected EntityBuilder<T> initialize(long newId, int newVersion, java.util.Date newTimestamp, OsmUser newUser, long newChangesetId)
newId
- The unique identifier.newVersion
- The version of the entity.newTimestamp
- The last updated timestamp.newUser
- The user that last modified this entity.newChangesetId
- The id of the changeset that this version of the entity was created by.
protected EntityBuilder<T> initialize(long newId, int newVersion, TimestampContainer newTimestampContainer, OsmUser newUser, long newChangesetId)
newId
- The unique identifier.newVersion
- The version of the entity.newTimestampContainer
- The container holding the timestamp in an alternative
timestamp representation.newUser
- The user that last modified this entity.newChangesetId
- The id of the changeset that this version of the entity was created by.
public EntityBuilder<T> setId(long newId)
newId
- The new id.
public long getId()
public EntityBuilder<T> setVersion(int newVersion)
newVersion
- The new version.
public int getVersion()
public EntityBuilder<T> setTimestamp(java.util.Date timestamp)
timestamp
- The new timestamp.
public java.util.Date getTimestamp()
public EntityBuilder<T> setTimestamp(TimestampContainer newTimestampContainer)
newTimestampContainer
- The timestamp wrapped within a container.
public TimestampContainer getTimestampContainer()
public EntityBuilder<T> setUser(OsmUser newUser)
newUser
- The new user.
public OsmUser getUser()
public long getChangesetId()
public EntityBuilder<T> setChangesetId(long newChangesetId)
newChangesetId
- The changeset id.
public java.util.Collection<Tag> getTags()
public EntityBuilder<T> clearTags()
public EntityBuilder<T> setTags(java.util.Collection<Tag> newTags)
newTags
- The new tags.
public EntityBuilder<T> addTag(Tag tag)
tag
- The new tag.
public abstract T buildEntity()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |