本文整理了Java中org.openstreetmap.osmosis.core.domain.v0_6.Relation.getTimestamp
方法的一些代码示例,展示了Relation.getTimestamp
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Relation.getTimestamp
方法的具体详情如下:
包路径:org.openstreetmap.osmosis.core.domain.v0_6.Relation
类名称:Relation
方法名:getTimestamp
暂无
代码示例来源:origin: openstreetmap/osmosis
/**
* Sets relation values as bind variable parameters to a relation insert query.
*
* @param statement The prepared statement to add the values to.
* @param initialIndex The offset index of the first variable to set.
* @param relation The way containing the data to be inserted.
*/
private void populateRelationParameters(PreparedStatement statement, int initialIndex, Relation relation) {
int prmIndex;
prmIndex = initialIndex;
assertEntityHasTimestamp(relation);
try {
statement.setLong(prmIndex++, relation.getId());
statement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
statement.setInt(prmIndex++, relation.getVersion());
statement.setBoolean(prmIndex++, true);
statement.setLong(prmIndex++, relation.getChangesetId());
} catch (SQLException e) {
throw new OsmosisRuntimeException("Unable to set a prepared statement parameter for a relation.", e);
}
}
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb
/**
* Sets relation values as bind variable parameters to a relation insert query.
*
* @param statement The prepared statement to add the values to.
* @param initialIndex The offset index of the first variable to set.
* @param relation The way containing the data to be inserted.
*/
private void populateRelationParameters(PreparedStatement statement, int initialIndex, Relation relation) {
int prmIndex;
prmIndex = initialIndex;
assertEntityHasTimestamp(relation);
try {
statement.setLong(prmIndex++, relation.getId());
statement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
statement.setInt(prmIndex++, relation.getVersion());
statement.setBoolean(prmIndex++, true);
statement.setLong(prmIndex++, relation.getChangesetId());
} catch (SQLException e) {
throw new OsmosisRuntimeException("Unable to set a prepared statement parameter for a relation.", e);
}
}
代码示例来源:origin: openstreetmap/osmosis
if (this.getTimestamp() == null && comparisonRelation.getTimestamp() != null) {
return -1;
if (this.getTimestamp() != null && comparisonRelation.getTimestamp() == null) {
return 1;
if (this.getTimestamp() != null && comparisonRelation.getTimestamp() != null) {
int result;
result = this.getTimestamp().compareTo(comparisonRelation.getTimestamp());
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-core
if (this.getTimestamp() == null && comparisonRelation.getTimestamp() != null) {
return -1;
if (this.getTimestamp() != null && comparisonRelation.getTimestamp() == null) {
return 1;
if (this.getTimestamp() != null && comparisonRelation.getTimestamp() != null) {
int result;
result = this.getTimestamp().compareTo(comparisonRelation.getTimestamp());
代码示例来源:origin: openstreetmap/osmosis
updateRelationStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
updateRelationStatement.setBoolean(prmIndex++, visible);
updateRelationStatement.setLong(prmIndex++, relation.getChangesetId());
insertRelationStatement.setLong(prmIndex++, relation.getId());
insertRelationStatement.setInt(prmIndex++, relation.getVersion());
insertRelationStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
insertRelationStatement.setBoolean(prmIndex++, visible);
insertRelationStatement.setLong(prmIndex++, relation.getChangesetId());
prmIndex = 1;
updateRelationCurrentStatement.setInt(prmIndex++, relation.getVersion());
updateRelationCurrentStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp()
.getTime()));
updateRelationCurrentStatement.setBoolean(prmIndex++, visible);
insertRelationCurrentStatement.setLong(prmIndex++, relation.getId());
insertRelationCurrentStatement.setInt(prmIndex++, relation.getVersion());
insertRelationCurrentStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp()
.getTime()));
insertRelationCurrentStatement.setBoolean(prmIndex++, visible);
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb
updateRelationStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
updateRelationStatement.setBoolean(prmIndex++, visible);
updateRelationStatement.setLong(prmIndex++, relation.getChangesetId());
insertRelationStatement.setLong(prmIndex++, relation.getId());
insertRelationStatement.setInt(prmIndex++, relation.getVersion());
insertRelationStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
insertRelationStatement.setBoolean(prmIndex++, visible);
insertRelationStatement.setLong(prmIndex++, relation.getChangesetId());
prmIndex = 1;
updateRelationCurrentStatement.setInt(prmIndex++, relation.getVersion());
updateRelationCurrentStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp()
.getTime()));
updateRelationCurrentStatement.setBoolean(prmIndex++, visible);
insertRelationCurrentStatement.setLong(prmIndex++, relation.getId());
insertRelationCurrentStatement.setInt(prmIndex++, relation.getVersion());
insertRelationCurrentStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp()
.getTime()));
insertRelationCurrentStatement.setBoolean(prmIndex++, visible);
代码示例来源:origin: openstreetmap/osmosis
/**
* {@inheritDoc}
*/
public void process(RelationContainer relationContainer) {
Relation relation;
int memberSequenceId;
relation = relationContainer.getEntity();
relationWriter.writeField(relation.getId());
relationWriter.writeField(relation.getVersion());
relationWriter.writeField(relation.getUser().getId());
relationWriter.writeField(relation.getTimestamp());
relationWriter.writeField(relation.getChangesetId());
relationWriter.writeField(buildTags(relation));
relationWriter.endRecord();
memberSequenceId = 0;
for (RelationMember member : relation.getMembers()) {
relationMemberWriter.writeField(relation.getId());
relationMemberWriter.writeField(member.getMemberId());
relationMemberWriter.writeField(memberTypeValueMapper.getMemberType(member.getMemberType()));
relationMemberWriter.writeField(member.getMemberRole());
relationMemberWriter.writeField(memberSequenceId++);
relationMemberWriter.endRecord();
}
}
代码示例来源:origin: openstreetmap/osmosis
relationWriter.writeField(relation.getVersion());
relationWriter.writeField(relation.getUser().getId());
relationWriter.writeField(relation.getTimestamp());
relationWriter.writeField(relation.getChangesetId());
relationWriter.endRecord();
内容来源于网络,如有侵权,请联系作者删除!