All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quhaodian.data.entity.AbstractEntity Maven / Gradle / Ivy

There is a newer version: 1.8.7
Show newest version
package com.quhaodian.data.entity;

import com.quhaodian.data.listener.EntityListener;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;


@EntityListeners(EntityListener.class)
@MappedSuperclass
public abstract class AbstractEntity extends LongEntity implements Serializable {
  
  
  /**
   * 添加时间
   */
  private Date addDate;
  
  /**
   * 最新修改时间
   */
  private Date lastDate;
  
  public AbstractEntity() {
    inittime();
    
  }
  
  
  private void inittime() {
    addDate = new Date();
    lastDate = new Date();
  }
  
  
  public Date getAddDate() {
    return addDate;
  }
  
  public void setAddDate(Date addDate) {
    this.addDate = addDate;
  }
  
  public Date getLastDate() {
    return lastDate;
  }
  
  public void setLastDate(Date lastDate) {
    this.lastDate = lastDate;
  }
  
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy