Java Code Examples for javax.persistence.TemporalType

The following are top voted examples for showing how to use javax.persistence.TemporalType. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: endpoint-health   File: EndPointCheckDao.java   Source Code and License 8 votes vote down vote up
public Collection<EndPointCheck> findByDateRange(final EndPoint endPoint, final Date startDate,
        final Date endDate) {
    final CriteriaBuilder criteriaBuilder = getEntityManager().getCriteriaBuilder();
    final CriteriaQuery<EndPointCheck> criteriaQuery = criteriaBuilder.createQuery(getEntityClass());
    final Root<EndPointCheck> root = criteriaQuery
            .from(getEntityManager().getMetamodel().entity(getEntityClass()));

    final ParameterExpression<EndPoint> endPointParameter = criteriaBuilder.parameter(EndPoint.class);
    final ParameterExpression<Date> startDateParameter = criteriaBuilder.parameter(Date.class);
    final ParameterExpression<Date> endDateParameter = criteriaBuilder.parameter(Date.class);

    final Predicate endPointIdPredicate = criteriaBuilder
            .equal(root.get("endPoint"), endPointParameter);

    final Path<Date> checkDatePath = root.<Date> get("checkDate");

    final Predicate startDatePredicate = criteriaBuilder
            .greaterThanOrEqualTo(checkDatePath, startDateParameter);

    final Predicate endDatePredicate = criteriaBuilder.lessThanOrEqualTo(
        checkDatePath,
        endDateParameter);

    criteriaQuery.where(criteriaBuilder.and(endPointIdPredicate, startDatePredicate, endDatePredicate));

    criteriaQuery.orderBy(Arrays.asList(criteriaBuilder.asc(checkDatePath)));

    return getEntityManager().createQuery(criteriaQuery)
            .setParameter(endPointParameter, endPoint)
            .setParameter(startDateParameter, startDate, TemporalType.DATE)
            .setParameter(endDateParameter, endDate, TemporalType.DATE)
            .getResultList();
}
 
Example 2
Project: spring-data   File: Profile.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.DATE)
@Column(name = "created_date", length = 10)
public Date getCreatedDate() {
	return this.createdDate;
}
 
Example 3
Project: lemon   File: PurchaseInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_TIME", length = 26)
public Date getCreateTime() {
    return this.createTime;
}
 
Example 4
Project: spring-data   File: Profile.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.DATE)
@Column(name = "last_request_failed_date", length = 10)
public Date getLastRequestFailedDate() {
	return this.lastRequestFailedDate;
}
 
Example 5
Project: tap17-muggl-javaee   File: MugglTypedQuery.java   Source Code and License 4 votes vote down vote up
@Override
public TypedQuery<X> setParameter(String name, Calendar value,
		TemporalType temporalType) {
	// TODO Auto-generated method stub
	return null;
}
 
Example 6
Project: OperatieBRP   File: CustomCountQueryWrapper.java   Source Code and License 4 votes vote down vote up
@Override
public TypedQuery<Long> setParameter(final Parameter<Calendar> param, final Calendar value, final TemporalType temporalType) {
    delegate.setParameter(param, value, temporalType);
    return this;
}
 
Example 7
Project: oscm   File: QueryStub.java   Source Code and License 4 votes vote down vote up
@Override
public Query setParameter(int arg0, Date arg1, TemporalType arg2) {
    throw new UnsupportedOperationException();
}
 
Example 8
Project: tap17-muggl-javaee   File: MugglTypedQuery.java   Source Code and License 4 votes vote down vote up
@Override
public TypedQuery<X> setParameter(Parameter<Date> param, Date value,
		TemporalType temporalType) {
	// TODO Auto-generated method stub
	return null;
}
 
Example 9
Project: oscm   File: QueryStub.java   Source Code and License 4 votes vote down vote up
@Override
public Query setParameter(Parameter<Calendar> arg0, Calendar arg1,
        TemporalType arg2) {
    return null;
}
 
Example 10
Project: borabeber-api   File: Promocao.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "data_fim", nullable = false)
public Date getDataFim() {
	return dataFim;
}
 
Example 11
Project: oscm   File: QueryStub.java   Source Code and License 4 votes vote down vote up
@Override
public Query setParameter(String arg0, Date arg1, TemporalType arg2) {
    return null;
}
 
Example 12
Project: ponto-inteligente-api   File: Lancamento.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "data", nullable = false)
public Date getData() {
	return data;
}
 
Example 13
Project: oscm   File: QueryStub.java   Source Code and License 4 votes vote down vote up
@Override
public Query setParameter(int arg0, Date arg1, TemporalType arg2) {
    return null;
}
 
Example 14
Project: lemon   File: ActivityInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "START_TIME", length = 26)
public Date getStartTime() {
    return this.startTime;
}
 
Example 15
Project: oscm   File: QueryStub.java   Source Code and License 4 votes vote down vote up
@Override
public Query setParameter(Parameter<Calendar> arg0, Calendar arg1,
        TemporalType arg2) {

    return null;
}
 
Example 16
Project: lemon   File: ExpenseInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "START_TIME", length = 26)
public Date getStartTime() {
    return this.startTime;
}
 
Example 17
Project: sjk   File: ComparableBaseApp.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "LastUpdateTime", length = 19)
public Date getLastUpdateTime() {
    return this.lastUpdateTime;
}
 
Example 18
Project: lemon   File: WhitelistPackage.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_TIME", length = 26)
public Date getCreateTime() {
    return this.createTime;
}
 
Example 19
Project: OperatieBRP   File: CustomCountQueryWrapper.java   Source Code and License 4 votes vote down vote up
@Override
public TypedQuery<Long> setParameter(final String name, final Date value, final TemporalType temporalType) {
    delegate.setParameter(name, value, temporalType);
    return this;
}
 
Example 20
Project: lemon   File: ContractInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "START_TIME", length = 26)
public Date getStartTime() {
    return this.startTime;
}
 
Example 21
Project: oscm   File: QueryStub.java   Source Code and License 4 votes vote down vote up
@Override
public Query setParameter(Parameter<Calendar> arg0, Calendar arg1,
        TemporalType arg2) {

    return null;
}
 
Example 22
Project: sjk   File: MonUserChannelApp.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "OptTime", nullable = false, length = 19)
public Date getOptTime() {
    return optTime;
}
 
Example 23
Project: sjk   File: Metro.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "OpTime", nullable = false, length = 19)
public Date getOpTime() {
    return this.opTime;
}
 
Example 24
Project: oscm   File: OrganizationData.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.DATE)
public Long getDeregistrationDate() {
    return deregistrationDate;
}
 
Example 25
Project: lemon   File: PimTask.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "END_TIME", length = 26)
public Date getEndTime() {
    return this.endTime;
}
 
Example 26
Project: lemon   File: TicketInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_TIME", length = 26)
public Date getCreateTime() {
    return this.createTime;
}
 
Example 27
Project: vertx-jpa   File: QueryImpl.java   Source Code and License 4 votes vote down vote up
@Override
public javax.persistence.Query setParameter(String name, Date value, TemporalType temporalType) {
  return _q.setParameter(name, value, temporalType);
}
 
Example 28
Project: lemon   File: TicketComment.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_TIME", length = 26)
public Date getCreateTime() {
    return this.createTime;
}
 
Example 29
Project: lemon   File: BookInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.DATE)
@Column(name = "PUBLISH_DATE", length = 10)
public Date getPublishDate() {
    return this.publishDate;
}
 
Example 30
Project: lemon   File: CmsArticle.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CLOSE_TIME", length = 26)
public Date getCloseTime() {
    return this.closeTime;
}
 
Example 31
Project: tap17-muggl-javaee   File: MugglTypedQuery.java   Source Code and License 4 votes vote down vote up
@Override
public TypedQuery<X> setParameter(Parameter<Calendar> param, Calendar value,
		TemporalType temporalType) {
	// TODO Auto-generated method stub
	return null;
}
 
Example 32
Project: lemon   File: DelegateInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "START_TIME", length = 26)
public Date getStartTime() {
    return this.startTime;
}
 
Example 33
Project: lemon   File: TaskLog.java   Source Code and License 4 votes vote down vote up
/** @return 事件事件. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "EVENT_TIME", length = 26)
public Date getEventTime() {
    return this.eventTime;
}
 
Example 34
Project: borabeber-api   File: Promocao.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "data_inicio", nullable = false)
public Date getDataInicio() {
	return dataInicio;
}
 
Example 35
Project: sjk   File: Metro.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.DATE)
@Column(name = "Time", length = 10)
public Date getTime() {
    return this.time;
}
 
Example 36
Project: sjk   File: AppHistory4Index.java   Source Code and License 4 votes vote down vote up
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "LastOpTime", nullable = false, length = 19)
public Date getLastOpTime() {
    return this.lastOpTime;
}
 
Example 37
Project: lemon   File: CustomerInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_TIME", length = 26)
public Date getCreateTime() {
    return this.createTime;
}
 
Example 38
Project: lemon   File: FeedbackInfo.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_TIME", length = 26)
public Date getCreateTime() {
    return this.createTime;
}
 
Example 39
Project: sbc-qsystem   File: QCustomer.java   Source Code and License 4 votes vote down vote up
@Column(name = "welcome_time")
@Temporal(TemporalType.TIMESTAMP)
public Date getWelcomeTime() {
    return welcomeTime;
}
 
Example 40
Project: lemon   File: BpmSequence.java   Source Code and License 4 votes vote down vote up
/** @return null. */
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_TIME", length = 26)
public Date getCreateTime() {
    return this.createTime;
}