Example usage for javax.persistence TemporalType TIMESTAMP

List of usage examples for javax.persistence TemporalType TIMESTAMP

Introduction

In this page you can find the example usage for javax.persistence TemporalType TIMESTAMP.

Prototype

TemporalType TIMESTAMP

To view the source code for javax.persistence TemporalType TIMESTAMP.

Click Source Link

Document

Map as java.sql.Timestamp

Usage

From source file:org.lightadmin.core.persistence.metamodel.PersistentPropertyType.java

private static boolean isOfDateTimeType(PersistentProperty persistentProperty) {
    Class<?> attrType = persistentProperty.getType();

    if (Timestamp.class.equals(attrType)) {
        return true;
    }/*from   w  ww  . j  a v a2  s.  co  m*/

    if (DateTime.class.equals(attrType) || LocalDateTime.class.equals(attrType)) {
        return true;
    }

    if (Date.class.equals(attrType) || Calendar.class.equals(attrType)) {
        return hasTemporalType(persistentProperty, TemporalType.TIMESTAMP);
    }

    return false;
}

From source file:com.hive.surveymanage.entity.IndustryEntity.java

@Temporal(TemporalType.TIMESTAMP)
@Column(name = "FOUNDTIME", nullable = false, length = 7)
@JsonSerialize(using = JsonDateSerializer.class)
public Date getFoundtime() {
    return foundtime;
}

From source file:com.dhenton9000.birt.persistence.entities.Orders.java

/**
 * @return the requiredDate//from  w  w w  .j a v a 2  s . c o  m
 */
@Column(name = "REQUIREDDATE")
@Temporal(TemporalType.TIMESTAMP)
@ApiModelProperty(example = "2/22/2013", required = true)
@Basic(optional = false)
public Date getRequiredDate() {
    return requiredDate;
}

From source file:it.volaconnoi.bean.RouteManagerBean.java

@Override
public List<Route> getRoutesByInputParameters(String source, String destination, String date,
        String travel_class, String date_flexi) {
    TypedQuery<Route> query = em.createNamedQuery("Route.findByInputParameters", Route.class);

    List<Route> routes_list = query.setParameter("source", StringUtils.trim(WordUtils.capitalizeFully(source)))
            .setParameter("dest", StringUtils.trim(WordUtils.capitalizeFully(destination)))
            .setParameter("startDate",
                    utilBean.getFormattedDate(date, "00", "00", !StringUtils.isNotEmpty(date_flexi) ? 0 : +2),
                    TemporalType.TIMESTAMP)
            .setParameter("endDate",
                    utilBean.getFormattedDate(date, "23", "59", !StringUtils.isNotEmpty(date_flexi) ? 0 : +2),
                    TemporalType.TIMESTAMP)
            .setParameter("travel_class", travel_class).getResultList();

    //la flessibilit si intende due giorni avanti la data inserita dall'utente

    return routes_list;
}

From source file:com.testing26thjuly_.wmstudio.Alltypes.java

@Temporal(TemporalType.TIMESTAMP)
@Column(name = "`TIMESTAMPCOL`", nullable = false)
public Date getTimestampcol() {
    return this.timestampcol;
}

From source file:com.nec.harvest.model.AbstractEntity.java

@Column(name = "TimeC")
@Temporal(TemporalType.TIMESTAMP)
public Calendar getTimeC() {
    return timeC;
}

From source file:edu.duke.cabig.c3pr.domain.User.java

/**
 * Gets the last failed login attempt time.
 *
 * @return the last failed login attempt time
 *///from w w w  .  ja v  a  2s  .  com
@Temporal(value = TemporalType.TIMESTAMP)
@Column(name = "last_login")
public Date getLastFailedLoginAttemptTime() {
    return lastLoginAttemptTime;
}

From source file:be.fedict.trust.service.entity.RevokedCertificateEntity.java

@Temporal(TemporalType.TIMESTAMP)
public Date getRevocationDate() {
    return this.revocationDate;
}

From source file:com.cubeia.backoffice.accounting.core.entity.CurrencyRate.java

@Column(nullable = false)
@Temporal(TemporalType.TIMESTAMP)
public Date getTimestamp() {
    return timestamp;
}

From source file:com.infinities.skyport.entity.TaskEventLog.java

@Temporal(TemporalType.TIMESTAMP)
@Column(name = "LOGDATE", length = 30)
public Date getLogdate() {
    return this.logdate;
}