81,092
社区成员
发帖
与我相关
我的任务
分享
The type com.louis.domain.DomainObject must implement the inherited abstract method org.springframework.beans.factory.aspectj.AbstractInterfaceDrivenDependencyInjectionAspect$ConfigurableDeserializationSupport.readResolve()
package com.louis.domain;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import com.louis.annotation.Json;
import com.louis.dao.GeneralDao;
import com.louis.util.JodaUtil;
import org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect;
/**
* <p>
* DomainObject
* </p>
*
* @author
* @DateTime Jul 26, 2011 9:10:03 AM
* @version 1.0.0
*/
@MappedSuperclass
@Json(transientField = false, nullField = false)
@Configurable(autowire = Autowire.BY_NAME)
public class DomainObject implements Serializable{
private static final long serialVersionUID = 3531893584644895799L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@Version
private int version;
@Column(name = "createtime", columnDefinition = "datetime")
@Type(type = "org.joda.time.contrib.hibernate.PersistentDateTime")
private DateTime createTime = JodaUtil.now();
@Column(name = "updatetime", columnDefinition = "datetime")
@Type(type = "org.joda.time.contrib.hibernate.PersistentDateTime")
private DateTime updateTime;
private transient GeneralDao generalDao;
public DomainObject() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
public DateTime getCreateTime() {
return createTime;
}
public void setCreateTime(DateTime createTime) {
this.createTime = createTime;
}
public DateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(DateTime updateTime) {
this.updateTime = updateTime;
}
/**
* @return the generalDao
*/
public GeneralDao getGeneralDao() {
return this.generalDao;
}
/**
* @param generalDao
* the generalDao to set
*/
@Autowired(required = true)
public void setGeneralDao(GeneralDao generalDao) {
this.generalDao = generalDao;
}
@Override
public String toString() {
return "DomainObject [createTime=" + createTime + ", id=" + id + ", updateTime=" + updateTime + ", version=" + version + "]";
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (this.getClass() != obj.getClass()) {
return false;
}
if (this == obj) {
return true;
}
DomainObject that = (DomainObject) obj;
return this.getId() == that.getId();
}
@Override
public int hashCode() {
return getId();
}
}