本文整理了Java中com.datastax.driver.core.Row.getDate
方法的一些代码示例,展示了Row.getDate
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Row.getDate
方法的具体详情如下:
包路径:com.datastax.driver.core.Row
类名称:Row
方法名:getDate
[英]Returns the ith value of this row as a date.
[中]返回此行的第i个值作为日期。
代码示例来源:origin: apache/nifi
return row.getDate(i);
代码示例来源:origin: pulsarIO/realtime-analytics
@Override
public List<Counter> apply(ResultSet resultSet) {
List<Counter> counters = new ArrayList<Counter>();
for (Row row : resultSet) {
try{
counters.add(new Counter(row.getString(0), row.getString(1), row.getDate(2).getTime(), row.getLong(3)));
}catch(Exception ex){
ex.printStackTrace();
}
}
return counters;
}
};
代码示例来源:origin: pulsarIO/realtime-analytics
public RawNumericMetric map(Row row) {
RawNumericMetric metricRow = new RawNumericMetric(row.getString(0), row.getString(1), row.getDate(2).getTime(), row.getInt(3));
ColumnDefinitions columeDef = row.getColumnDefinitions();
List<Definition> columeDefList = columeDef.asList();
Map<String, String> tagMap = new HashMap<String, String>();
for(Definition def: columeDefList){
if(def.getName().startsWith("tag_")){
tagMap.put(def.getName(), row.getString(def.getName()));
}
}
if(tagMap.size()>0){
metricRow.setTagMap(tagMap);
}
return metricRow;
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
public LocalDate getDate(String s)
{
return row.getDate(s);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
public LocalDate getDate(int i)
{
return row.getDate(i);
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server
@Override
public Date getDate(String name)
{
return row.getDate(name);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
public LocalDate getDate(String s)
{
return row.getDate(s);
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
@Override
public LocalDate getDate(int i)
{
return row.getDate(i);
}
代码示例来源:origin: org.springframework.data/spring-data-cassandra
@Override
public LocalDate convert(Row row) {
return row.getDate(0);
}
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server
@Override
public Date getDate(int i)
{
return row.getDate(i);
}
代码示例来源:origin: net.oneandone/troilus-core-java7
@Override
public Date getDate(String name) {
return row.getDate(name);
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
public LocalDate getDate(int i)
{
return row.getDate(i);
}
代码示例来源:origin: com.tuplejump/calliope-core
@Override
public Date getDate(int i) {
return row.getDate(i);
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
@Override
public LocalDate getDate(String s)
{
return row.getDate(s);
}
代码示例来源:origin: adejanovski/cassandra-jdbc-wrapper
public Date getDate(int index) throws SQLException
{
checkIndex(index);
if(currentRow.getDate(index - 1)==null){
return null;
}
return new java.sql.Date(currentRow.getTimestamp(index - 1).getTime());
}
代码示例来源:origin: com.moz.fiji.schema/fiji-schema-cassandra
/** {@inheritDoc} */
@Override
public void removeRecentTableLayoutVersions(String table, int numVersions) throws IOException {
Preconditions.checkArgument(numVersions >= 1, "numVersions must be positive");
// Unclear how to do this in C* without first reading about the most-recent versions
// Get a list of versions to delete
List<Row> rows = getRows(table, numVersions);
Preconditions.checkNotNull(mRemoveRecentTableLayoutVersionsStatement);
for (Row row: rows) {
Long timestamp = row.getDate(QUALIFIER_TIME).getTime();
mAdmin.execute(
mRemoveRecentTableLayoutVersionsStatement.bind(table, new Date(timestamp)));
}
}
代码示例来源:origin: gengstrand/clojure-news-feed
public List<Inbound> fetch(long id) {
return fetchMulti(b -> {
b.setInt(0, new Long(id).intValue());
}, r -> {
return new Inbound.InboundBuilder()
.withFrom(new Integer(r.getInt(FROM_PARTICIPANT_ID_COLUMN)).longValue())
.withTo(id)
.withOccurred(new DateTime(r.getDate(OCCURRED_COLUMN)))
.withSubject(r.getString(SUBJECT_COLUMN))
.withStory(r.getString(STORY_COLUMN))
.build();
});
}
代码示例来源:origin: gengstrand/clojure-news-feed
public List<Outbound> fetch(long id) {
return fetchMulti(b -> {
b.setInt(0, new Long(id).intValue());
}, r -> {
return new Outbound.OutboundBuilder()
.withFrom(id)
.withOccurred(new DateTime(r.getDate(OCCURRED_COLUMN)))
.withSubject(r.getString(SUBJECT_COLUMN))
.withStory(r.getString(STORY_COLUMN))
.build();
});
}
代码示例来源:origin: com.opencredo/concursus-cassandra
private void createEvent(Row row, String aggregateType, VersionedName versionedName, TupleSchema tupleSchema) {
Map<String, String> parameterData = row.getMap(PARAMETERS, String.class, String.class);
Tuple parameters = tupleSchema.deserialise(deserialiser, parameterData);
Event event = Event.of(
AggregateId.of(aggregateType, row.getString(AGGREGATE_ID)),
StreamTimestamp.of(row.getString(STREAM_ID), row.getDate(EVENT_TIMESTAMP).toInstant()),
row.getUUID(PROCESSING_ID),
versionedName,
parameters,
row.getInt(CHARACTERISTICS));
eventCollector.accept(event);
}
代码示例来源:origin: com.opencredo/concourse-cassandra
private void createEvent(Row row, String aggregateType, VersionedName versionedName, TupleSchema tupleSchema) {
Map<String, String> parameterData = row.getMap(PARAMETERS, String.class, String.class);
Tuple parameters = tupleSchema.deserialise(deserialiser, parameterData);
Event event = Event.of(
AggregateId.of(aggregateType, row.getUUID(AGGREGATE_ID)),
StreamTimestamp.of(row.getString(STREAM_ID), row.getDate(EVENT_TIMESTAMP).toInstant()),
row.getUUID(PROCESSING_ID),
versionedName,
parameters,
row.getInt(CHARACTERISTICS));
eventCollector.accept(event);
}
内容来源于网络,如有侵权,请联系作者删除!