本文整理汇总了Java中org.springframework.data.jpa.domain.AbstractPersistable类的典型用法代码示例。如果您正苦于以下问题:Java AbstractPersistable类的具体用法?Java AbstractPersistable怎么用?Java AbstractPersistable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractPersistable类属于org.springframework.data.jpa.domain包,在下文中一共展示了AbstractPersistable类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equals
import org.springframework.data.jpa.domain.AbstractPersistable; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (null == obj) {
return false;
}
if (this == obj) {
return true;
}
if (!getClass().equals(ClassUtils.getUserClass(obj))) {
return false;
}
AbstractPersistable<?> that = (AbstractPersistable<?>) obj;
return null != this.getId() && this.getId().equals(that.getId());
}
示例2: equals
import org.springframework.data.jpa.domain.AbstractPersistable; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (null == obj) {
return false;
}
if (this == obj) {
return true;
}
if (!getClass().equals(obj.getClass())) {
return false;
}
AbstractPersistable<?> that = (AbstractPersistable<?>) obj;
return null == this.getId() ? false : this.getId().equals(that.getId());
}
示例3: CsvStreamingOutput
import org.springframework.data.jpa.domain.AbstractPersistable; //导入依赖的package包/类
/**
* Constructor for database offline data.
*
* @param slaComputations
* SLA computations with issues.
*/
public CsvStreamingOutput(final JiraSlaComputations slaComputations) {
super(slaComputations.getPriorityText(), slaComputations.getResolutionText(), slaComputations.getStatusText(), slaComputations.getTypeText());
this.slaComputations = slaComputations;
// Sort the computation by identifier instead of creation date
slaComputations.getIssues().sort(Comparator.comparing(AbstractPersistable::getId));
}