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:gov.nih.nci.caarray.domain.MultiPartBlob.java
/** * @return the timestamp */ @Temporal(TemporalType.TIMESTAMP) @NotNull public Date getCreationTimestamp() { return this.creationTimestamp; }
From source file:org.syncope.core.persistence.dao.impl.UserDAOImpl.java
@Override public List<SyncopeUser> findByAttrValue(final String schemaName, final UAttrValue attrValue) { USchema schema = schemaDAO.find(schemaName, USchema.class); if (schema == null) { LOG.error("Invalid schema name '{}'", schemaName); return Collections.EMPTY_LIST; }/*from w ww .j a va2 s. c o m*/ final String entityName = schema.isUniqueConstraint() ? UAttrUniqueValue.class.getName() : UAttrValue.class.getName(); Query query = entityManager .createQuery("SELECT e FROM " + entityName + " e" + " WHERE e.attribute.schema.name = :schemaName " + " AND (e.stringValue IS NOT NULL" + " AND e.stringValue = :stringValue)" + " OR (e.booleanValue IS NOT NULL" + " AND e.booleanValue = :booleanValue)" + " OR (e.dateValue IS NOT NULL" + " AND e.dateValue = :dateValue)" + " OR (e.longValue IS NOT NULL" + " AND e.longValue = :longValue)" + " OR (e.doubleValue IS NOT NULL" + " AND e.doubleValue = :doubleValue)"); query.setParameter("schemaName", schemaName); query.setParameter("stringValue", attrValue.getStringValue()); query.setParameter("booleanValue", attrValue.getBooleanValue() == null ? null : attrValue.getBooleanAsInteger(attrValue.getBooleanValue())); if (attrValue.getDateValue() != null) { query.setParameter("dateValue", attrValue.getDateValue(), TemporalType.TIMESTAMP); } else { query.setParameter("dateValue", null); } query.setParameter("longValue", attrValue.getLongValue()); query.setParameter("doubleValue", attrValue.getDoubleValue()); List<SyncopeUser> result = new ArrayList<SyncopeUser>(); SyncopeUser user; for (AbstractAttrValue value : (List<AbstractAttrValue>) query.getResultList()) { user = (SyncopeUser) value.getAttribute().getOwner(); if (!result.contains(user)) { result.add(user); } } return result; }
From source file:com.syncnapsis.data.model.User.java
/** * Datum der Lschung des Kontos// w ww.jav a 2s .c om * * @return deleteDate */ @Temporal(TemporalType.TIMESTAMP) @Column(nullable = true) public Date getDeleteDate() { return deleteDate; }
From source file:gov.nih.nci.cabig.caaers.domain.report.ReportVersion.java
/** * Gets the submitted on. * * @return the submitted on */ @Temporal(value = TemporalType.TIMESTAMP) public Date getSubmittedOn() { return submittedOn; }
From source file:org.opennms.netmgt.model.OnmsNotification.java
/** * <p>getPageTime</p>//from w ww .ja va2 s. c o m * * @return a {@link java.util.Date} object. */ @XmlElement(name = "pageTime") @Temporal(TemporalType.TIMESTAMP) @Column(name = "pageTime") public Date getPageTime() { return m_pageTime; }
From source file:org.opennms.netmgt.model.OnmsNode.java
/** * Time node was added to the database.// ww w . j ava 2 s .c o m * * @hibernate.property column="nodecreatetime" length="8" not-null="true" * @return a {@link java.util.Date} object. */ @XmlElement(name = "createTime") @Temporal(TemporalType.TIMESTAMP) @Column(name = "nodeCreateTime", nullable = false) public Date getCreateTime() { return m_createTime; }
From source file:com.zl.bgec.basicapi.shop.po.Shop.java
@Temporal(TemporalType.TIMESTAMP) @Column(name = "license_Start_Time") public Date getLicenseStartTime() { return licenseStartTime; }
From source file:edu.duke.cabig.c3pr.domain.ScheduledEpoch.java
/** * Gets the start date. * * @return the start date */ @Temporal(TemporalType.TIMESTAMP) public Date getStartDate() { return startDate; }
From source file:gov.nih.nci.cabig.caaers.domain.report.ReportVersion.java
/** * Gets the withdrawn on. * * @return the withdrawn on */ @Temporal(value = TemporalType.TIMESTAMP) public Date getWithdrawnOn() { return withdrawnOn; }
From source file:gov.nih.nci.cabig.caaers.domain.AdverseEvent.java
@Temporal(TemporalType.TIMESTAMP) @Column(name = "created_date", nullable = true) public Date getCreatedDate() { return createdDate; }