javax.persistence.Temporal.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中javax.persistence.Temporal.<init>()方法的一些代码示例,展示了Temporal.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Temporal.<init>()方法的具体详情如下:
包路径:javax.persistence.Temporal
类名称:Temporal
方法名:<init>

Temporal.<init>介绍

暂无

代码示例

代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server

/**
 * @return the createdAt
 */
@Temporal(TemporalType.TIMESTAMP)
@Column(name="created_at")
public Date getCreatedAt() {
  return createdAt;
}

代码示例来源:origin: spring-projects/spring-data-examples

/**
 * @author Oliver Gierke
 */
@Entity
public class Account {

  @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id;

  @ManyToOne private Customer customer;

  @Temporal(TemporalType.DATE) private Date expiryDate;

  public Long getId() {
    return id;
  }

  public Customer getCustomer() {
    return customer;
  }

  public Date getExpiryDate() {
    return expiryDate;
  }
}

代码示例来源:origin: hibernate/hibernate-orm

/**
 * @author Emmanuel Bernard
 */
@Entity
public class FinancialHistory implements Serializable {
  @Id
  //@JoinColumn(name = "FK")
  @ManyToOne
  Person patient;

  @Temporal(TemporalType.DATE)
  Date lastUpdate;

  public FinancialHistory() {
  }

  public FinancialHistory(Person patient) {
    this.patient = patient;
  }
}

代码示例来源:origin: hibernate/hibernate-orm

/**
 * @author Emmanuel Bernard
 */
@Entity
@AssociationOverrides({
@AssociationOverride(name = "id.channel", joinColumns = @JoinColumn(name = "chan_id", nullable = false)),
@AssociationOverride(name = "id.presenter", joinColumns = @JoinColumn(name = "presenter_name", nullable = false))})
public class TvMagazin {
  @EmbeddedId
  public TvMagazinPk id;
  @Temporal(TemporalType.TIME)
  @Column(name="`time`")
  Date time;
}

代码示例来源:origin: hibernate/hibernate-orm

@MappedSuperclass
public static class DBObject {
  @Id
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq")
  protected Integer id;
  @Temporal(TemporalType.TIMESTAMP)
  protected Date correctDate;
  public Integer getId() {
    return id;
  }
  public void setId(Integer id) {
    this.id = id;
  }
  public Date getCorrectDate() {
    return correctDate;
  }
  public void setCorrectDate(Date correctDate) {
    this.correctDate = correctDate;
  }
}

代码示例来源:origin: hibernate/hibernate-orm

@Entity
@Table( name = "PROC_ITEM" )
public static class Item {
  @Id
  private Integer id;
  private String stockCode;
  private String name;
  private BigDecimal unitCost;
  @Temporal( TemporalType.TIMESTAMP )
  private Date availabilityStartDate;
  @Temporal( TemporalType.TIMESTAMP )
  private Date availabilityEndDate;
}

代码示例来源:origin: hibernate/hibernate-orm

/**
 * @author Emmanuel Bernard
 */
@Entity
public class MedicalHistory implements Serializable {
  @Id
  @JoinColumn(name = "FK")
  @OneToOne
  Person patient;

  @Temporal(TemporalType.DATE)
  Date lastupdate;

  public MedicalHistory() {
  }

  public MedicalHistory(Person patient) {
    this.patient = patient;
  }
}

代码示例来源:origin: kiegroup/jbpm

@Column(name="ERROR_DATE")
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
@Override
public Date getErrorDate() {
  return super.getErrorDate();
}

代码示例来源:origin: hibernate/hibernate-orm

/**
 * @author Chandra Patni
 */
@Entity
@SecondaryTable( name = "TV_PROGRAM_EXT", pkJoinColumns = {
@PrimaryKeyJoinColumn( name = "CHANNEL_ID" ),
@PrimaryKeyJoinColumn( name = "PRESENTER_NAME" )
    } )
@AssociationOverrides({
@AssociationOverride(name = "id.channel", joinColumns = @JoinColumn(name = "chan_id", nullable = false)),
@AssociationOverride(name = "id.presenter", joinColumns = @JoinColumn(name = "presenter_name", nullable = false))})
public class TvProgram {
  @EmbeddedId
  public TvMagazinPk id;

  @Temporal( TemporalType.TIME )
  @Column(name="`time`")
  Date time;

  @Column( name = "TXT", table = "TV_PROGRAM_EXT" )
  public String text;

}

代码示例来源:origin: hibernate/hibernate-orm

@Entity( name = "Person" )
@Table( name = "person" )
public static class Person {
  @Id
  public Integer id;
  String name;
  @Temporal( TemporalType.DATE )
  Date dob;
}

代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server

@Override
@Basic
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
@Column(name = "expiration")
public Date getExpiration() {
  return expiration;
}

代码示例来源:origin: hibernate/hibernate-orm

@javax.persistence.Entity
  @Table(name = "entity")
  public static class Entity {
    @GeneratedValue
    @Id
    private long id;

    @Temporal( value = TemporalType.TIME )
    private java.util.Date tAsDate;
  }
}

代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server

/**
 * @return the expiration
 */
@Basic
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "expiration")
public Date getExpiration() {
  return expiration;
}

代码示例来源:origin: BroadleafCommerce/BroadleafCommerce

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "BLC_CUSTOMER_PASSWORD_TOKEN")
public class CustomerForgotPasswordSecurityTokenImpl implements CustomerForgotPasswordSecurityToken {
  private static final long serialVersionUID = 1L;
  @Id
  @Column(name = "PASSWORD_TOKEN", nullable = false)
  protected String token;
  @Column(name = "CREATE_DATE", nullable = false)
  @Temporal(TemporalType.TIMESTAMP)
  protected Date createDate;
  @Column(name = "TOKEN_USED_DATE")
  @Temporal(TemporalType.TIMESTAMP)
  protected Date tokenUsedDate;

代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server

/**
 * @return the timeoutDate
 */
@Basic
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
@Column(name="timeout_date")
public Date getTimeoutDate() {
  return timeoutDate;
}

代码示例来源:origin: BroadleafCommerce/BroadleafCommerce

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "BLC_ADMIN_PASSWORD_TOKEN")
public class ForgotPasswordSecurityTokenImpl implements ForgotPasswordSecurityToken {
  private static final long serialVersionUID = 1L;
  @Id
  @Column(name = "PASSWORD_TOKEN", nullable = false)
  protected String token;
  @Column(name = "CREATE_DATE", nullable = false)
  @Temporal(TemporalType.TIMESTAMP)
  protected Date createDate;
  @Column(name = "TOKEN_USED_DATE")
  @Temporal(TemporalType.TIMESTAMP)
  protected Date tokenUsedDate;

代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server

@Basic
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
@Column(name = "expiration")
public Date getExpiration() {
  return expiration;
}

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table(name = "ORDER_ACCOUNT", schema = SchemaConstant.SALESMANAGER_SCHEMA)
public class OrderAccount extends SalesManagerEntity<Long, OrderAccount> {
private static final long serialVersionUID = -2429388347536330540L;
  @Id
  @Column(name = "ORDER_ACCOUNT_ID", unique = true, nullable = false)
  @TableGenerator(name = "TABLE_GEN", table = "SM_SEQUENCER", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "ORDER_ACCOUNT_ID_NEXT_VALUE")
  @GeneratedValue(strategy = GenerationType.TABLE, generator = "TABLE_GEN")
  private Long id;
  private Order order;
  @Temporal(TemporalType.DATE)
  @Column(name = "ORDER_ACCOUNT_START_DATE", nullable = false, length = 0)
  private Date orderAccountStartDate;
  @Temporal(TemporalType.DATE)
  @Column(name = "ORDER_ACCOUNT_END_DATE", length = 0)
  private Date orderAccountEndDate;

代码示例来源:origin: mitreid-connect/OpenID-Connect-Java-Spring-Server

@Basic
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
@Column(name = "expiration")
public Date getExpiration() {
  return expiration;
}

代码示例来源:origin: shopizer-ecommerce/shopizer

@Entity
@Table (name="FILE_HISTORY", schema=SchemaConstant.SALESMANAGER_SCHEMA, uniqueConstraints={
    @UniqueConstraint(
      columnNames={
  private static final long serialVersionUID = 1321251632883237664L;
  private MerchantStore store;
  @Column(name = "FILE_ID")
  private Long fileId;
  @Column ( name="FILESIZE", nullable=false )
  private Integer filesize;
  @Temporal(TemporalType.TIMESTAMP )
  @Column ( name="DATE_ADDED", length=0, nullable=false )
  private Date dateAdded;
  @Temporal(TemporalType.TIMESTAMP)
  @Column ( name="DATE_DELETED", length=0 )
  private Date dateDeleted;
  @Temporal(TemporalType.TIMESTAMP)
  @Column ( name="ACCOUNTED_DATE", length=0 )
  private Date accountedDate;

相关文章