本文整理了Java中org.hibernate.query.Query.setTimestamp
方法的一些代码示例,展示了Query.setTimestamp
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setTimestamp
方法的具体详情如下:
包路径:org.hibernate.query.Query
类名称:Query
方法名:setTimestamp
[英]Bind a positional Date-valued parameter using the full Timestamp.
[中]使用完整时间戳绑定位置日期值参数。
代码示例来源:origin: hibernate/hibernate-orm
final Query queryWithTimestamp = s.createQuery( "from TimestampPropertyTest$Entity where ts=?1" ).setTimestamp( 1, eOrig.ts );
final Entity eQueriedWithTimestamp = (Entity) queryWithTimestamp.uniqueResult();
assertNotNull( eQueriedWithTimestamp );
代码示例来源:origin: hibernate/hibernate-orm
final Query queryWithTimestamp = s.createQuery( "from Entity where ts= ?1" ).setTimestamp( 1, eOrig.ts );
final Entity eQueriedWithTimestamp = (Entity) queryWithTimestamp.uniqueResult();
assertNotNull( eQueriedWithTimestamp );
代码示例来源:origin: hibernate/hibernate-orm
final Query queryWithTimestamp =
s.createQuery( "from Entity where tsColumnDefault= ?1" )
.setTimestamp( 1, eOrig.tsColumnDefault );
final Entity eQueriedWithTimestamp = (Entity) queryWithTimestamp.uniqueResult();
assertNotNull( eQueriedWithTimestamp );
代码示例来源:origin: hibernate/hibernate-orm
final Query queryWithTimestamp =
s.createQuery( "from TimestampPropertyTest$Entity where tsColumnDefault=?1" )
.setTimestamp( 1, eOrig.tsColumnDefault );
final Entity eQueriedWithTimestamp = (Entity) queryWithTimestamp.uniqueResult();
assertNotNull( eQueriedWithTimestamp );
代码示例来源:origin: hibernate/hibernate-orm
final Query queryWithTimestamp =
s.createQuery( "from Entity where tsColumnDefinition= ?1" )
.setTimestamp( 1, eOrig.tsColumnDefinition );
final Entity eQueriedWithTimestamp = (Entity) queryWithTimestamp.uniqueResult();
assertNotNull( eQueriedWithTimestamp );
代码示例来源:origin: com.atlassian.hibernate/hibernate.adapter
@Override
@SuppressWarnings("deprecation")
public Query setTimestamp(final String name, final Date date) {
if (queryV2ForCompare != null) {
queryV2ForCompare.setTimestamp(name, date);
}
query.setTimestamp(name, date);
return this;
}
代码示例来源:origin: com.atlassian.hibernate/hibernate.adapter
@Override
@SuppressWarnings("deprecation")
public Query setTimestamp(final int position, final Date date) {
if (queryV2ForCompare != null) {
queryV2ForCompare.setTimestamp(position, date);
}
query.setTimestamp(adjustParameterPosition(position), date);
return this;
}
代码示例来源:origin: jpos/jPOS-EE
@SuppressWarnings("unchecked")
public List<Thing> listByTimestampValue (String type, Date value) {
Query query = db.session().getNamedQuery ("list-by-timestamp-value")
.setString ("type", type)
.setTimestamp ("value", value);
return (List<Thing>) query.list();
}
@SuppressWarnings("unchecked")
代码示例来源:origin: jpos/jPOS-EE
@SuppressWarnings("unchecked")
public List<Thing> listByTimestampNameValue (String type, String name, Date value) {
Query query = db.session().getNamedQuery ("list-by-timestamp-name-value")
.setString ("type", type)
.setString ("name", name)
.setTimestamp ("value", value);
return (List<Thing>) query.list();
}
内容来源于网络,如有侵权,请联系作者删除!