本文整理汇总了Java中org.springframework.data.annotation.CreatedBy类的典型用法代码示例。如果您正苦于以下问题:Java CreatedBy类的具体用法?Java CreatedBy怎么用?Java CreatedBy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CreatedBy类属于org.springframework.data.annotation包,在下文中一共展示了CreatedBy类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MybatisMetamodelEntityInformation
import org.springframework.data.annotation.CreatedBy; //导入依赖的package包/类
/**
* Creates a new {@link AbstractEntityInformation} from the given domain class.
*
* @param domainClass must not be {@literal null}.
*/
protected MybatisMetamodelEntityInformation(PersistentEntity<T, ?> persistentEntity,
AuditorAware<?> auditorAware, AuditDateAware<?> auditDateAware, Class<T> domainClass) {
super(persistentEntity, auditorAware, auditDateAware, domainClass);
createdDateProperty = persistentEntity.getPersistentProperty(CreatedDate.class);
lastModifiedDateProperty = persistentEntity.getPersistentProperty(LastModifiedDate.class);
createdByProperty = persistentEntity.getPersistentProperty(CreatedBy.class);
lastModifiedByProperty = persistentEntity.getPersistentProperty(LastModifiedBy.class);
}
示例2: setCreatedBy
import org.springframework.data.annotation.CreatedBy; //导入依赖的package包/类
@CreatedBy
public void setCreatedBy(final String createdBy) {
if (isController()) {
this.createdBy = "CONTROLLER_PLUG_AND_PLAY";
return;
}
this.createdBy = createdBy;
}
示例3: getCreatedBy
import org.springframework.data.annotation.CreatedBy; //导入依赖的package包/类
@CreatedBy
@Column(name = "CREATED_BY", nullable = true)
public String getCreatedBy() {
return createdBy;
}