当前位置: 首页>>代码示例>>Java>>正文


Java OnSave类代码示例

本文整理汇总了Java中com.googlecode.objectify.annotation.OnSave的典型用法代码示例。如果您正苦于以下问题:Java OnSave类的具体用法?Java OnSave怎么用?Java OnSave使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OnSave类属于com.googlecode.objectify.annotation包,在下文中一共展示了OnSave类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setAuditableFieldsOnSave

import com.googlecode.objectify.annotation.OnSave; //导入依赖的package包/类
@OnSave
private void setAuditableFieldsOnSave() {
    if (!skipSettingAuditableFields) {
        updated = DateTime.now();
        updatedBy = getCurrentUserRef();

        if (created == null) {
            created = updated;
            createdBy = updatedBy;
        }
    }
}
 
开发者ID:3wks,项目名称:generator-thundr-gae-react,代码行数:13,代码来源:BaseEntity.java

示例2: disallowUnshardedSaves

import com.googlecode.objectify.annotation.OnSave; //导入依赖的package包/类
/** As a safety mechanism, fail if someone tries to save this class directly. */
@OnSave
void disallowUnshardedSaves() {
  if (!isShard) {
    throw new UnshardedSaveException();
  }
}
 
开发者ID:google,项目名称:nomulus,代码行数:8,代码来源:ClaimsListShard.java

示例3: onSave

import com.googlecode.objectify.annotation.OnSave; //导入依赖的package包/类
/**
 * On save update the date added
 */
@OnSave
void onSave() {
	if(this.dateAdded == null) {
		this.dateAdded = new Date();
	}
}
 
开发者ID:omerio,项目名称:appstart,代码行数:10,代码来源:Todo.java

示例4: save

import com.googlecode.objectify.annotation.OnSave; //导入依赖的package包/类
@OnSave
public void save() {
  onSaveCalled = true;
}
 
开发者ID:google,项目名称:nomulus,代码行数:5,代码来源:OfyTest.java

示例5: updateLastUpdateTimestamp

import com.googlecode.objectify.annotation.OnSave; //导入依赖的package包/类
@OnSave
public void updateLastUpdateTimestamp() {
    this.setLastUpdate(new Date());
}
 
开发者ID:TEAMMATES,项目名称:teammates,代码行数:5,代码来源:FeedbackQuestion.java

示例6: onPersist

import com.googlecode.objectify.annotation.OnSave; //导入依赖的package包/类
@OnSave
void onPersist() {
  // TODO: Move this method to a superclass that implements a persistence layer
  ++this.version;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:6,代码来源:Task.java

示例7: invalidateInCache

import com.googlecode.objectify.annotation.OnSave; //导入依赖的package包/类
/**
 * Invalidates the cache entry.
 *
 * <p>This is called automatically when the registry is saved. One should also call it when a
 * registry is deleted.
 */
@OnSave
public void invalidateInCache() {
  CACHE.invalidate(tldStr);
}
 
开发者ID:google,项目名称:nomulus,代码行数:11,代码来源:Registry.java


注:本文中的com.googlecode.objectify.annotation.OnSave类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。