List of usage examples for javax.persistence TemporalType TIMESTAMP
TemporalType TIMESTAMP
To view the source code for javax.persistence TemporalType TIMESTAMP.
Click Source Link
java.sql.Timestamp
From source file:com.zl.bgec.basicapi.shop.po.Shop.java
@Temporal(TemporalType.TIMESTAMP) @Column(name = "shop_create_time") public Date getShopCreateTime() { return shopCreateTime; }
From source file:com.testing26thjuly_.db123testing.NewTypesUser.java
@Temporal(TemporalType.TIMESTAMP) @Column(name = "`Datetime Col`", nullable = true) public Date getDatetimeCol() { return this.datetimeCol; }
From source file:com.silverpeas.notification.delayed.repository.DelayedNotificationRepositoryImpl.java
@Override public List<DelayedNotificationData> findDelayedNotification( final DelayedNotificationData delayedNotification) { // Parameters final List<TypedParameter<?>> parameters = new ArrayList<TypedParameter<?>>(); // Query// ww w .ja va 2s. c o m final StringBuilder query = new StringBuilder("from DelayedNotificationData where"); query.append(" userId = :"); query.append(TypedParameterUtil.addNamedParameter(parameters, "userId", delayedNotification.getUserId())); query.append(" and fromUserId = :"); query.append(TypedParameterUtil.addNamedParameter(parameters, "fromUserId", delayedNotification.getFromUserId())); query.append(" and channel = :"); query.append(TypedParameterUtil.addNamedParameter(parameters, "channel", delayedNotification.getChannel().getId())); query.append(" and action = :"); query.append(TypedParameterUtil.addNamedParameter(parameters, "action", delayedNotification.getAction().getId())); query.append(" and language = :"); query.append( TypedParameterUtil.addNamedParameter(parameters, "language", delayedNotification.getLanguage())); Date date = delayedNotification.getCreationDate(); if (date == null) { date = new Date(); } query.append(" and creationDate between :"); query.append(TypedParameterUtil.addNamedParameter(parameters, "creationDateMin", DateUtils.setSeconds(DateUtils.setMilliseconds(date, 0), 0), TemporalType.TIMESTAMP)); query.append(" and :"); query.append(TypedParameterUtil.addNamedParameter(parameters, "creationDateMax", DateUtils.setSeconds(DateUtils.setMilliseconds(date, 999), 59), TemporalType.TIMESTAMP)); query.append(" and notificationResourceId = :"); query.append( TypedParameterUtil.addNamedParameter(parameters, "resourceId", delayedNotification.getResource())); // resourceDescription parameter if (StringUtils.isNotBlank(delayedNotification.getMessage())) { query.append(" and message = :"); query.append( TypedParameterUtil.addNamedParameter(parameters, "message", delayedNotification.getMessage())); } else { query.append(" and message is null"); } // Typed query final TypedQuery<DelayedNotificationData> typedQuery = em.createQuery(query.toString(), DelayedNotificationData.class); // Parameters TypedParameterUtil.computeNamedParameters(typedQuery, parameters); // Result return typedQuery.getResultList(); }
From source file:com.testing26thjuly_.db123testing.V1.java
@Id @Temporal(TemporalType.TIMESTAMP) @Column(name = "`Datetime Col`", nullable = true) public Date getDatetimeCol() { return this.datetimeCol; }
From source file:com.hive.surveymanage.entity.IndustryEntity.java
@Temporal(TemporalType.TIMESTAMP) @Column(name = "CAUDITTIME", length = 7) @JsonSerialize(using = JsonDateSerializer.class) public Date getCaudittime() { return caudittime; }
From source file:it.jugpadova.po.Participant.java
@Temporal(value = TemporalType.TIMESTAMP) public Date getCreationDate() { return creationDate; }
From source file:it.jugpadova.po.Participant.java
@Temporal(value = TemporalType.TIMESTAMP) public Date getLastCertificateSentDate() { return lastCertificateSentDate; }
From source file:it.jugpadova.po.Participant.java
@Temporal(value = TemporalType.TIMESTAMP) public Date getConfirmationDate() { return confirmationDate; }
From source file:com.netxforge.oss2.model.OnmsAtInterface.java
@Temporal(TemporalType.TIMESTAMP) @Column(name = "lastPollTime", nullable = false) @XmlElement(name = "lastPollTime") public Date getLastPollTime() { return m_lastPollTime; }
From source file:it.jugpadova.po.Participant.java
@Temporal(TemporalType.TIMESTAMP) public Date getCancellationDate() { return cancellationDate; }