本文整理汇总了Java中org.apache.gora.persistency.Dirtyable类的典型用法代码示例。如果您正苦于以下问题:Java Dirtyable类的具体用法?Java Dirtyable怎么用?Java Dirtyable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Dirtyable类属于org.apache.gora.persistency包,在下文中一共展示了Dirtyable类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkIfMutableFieldAndDirty
import org.apache.gora.persistency.Dirtyable; //导入依赖的package包/类
private boolean checkIfMutableFieldAndDirty(Field field) {
if (field.pos() == 0)
return false;
switch (field.schema().getType()) {
case RECORD:
case MAP:
case ARRAY:
Object value = get(field.pos());
return !(value instanceof Dirtyable) || value==null ? false : ((Dirtyable) value).isDirty();
case UNION:
value = get(field.pos());
return !(value instanceof Dirtyable) || value==null ? false : ((Dirtyable) value).isDirty();
default:
break;
}
return false;
}
示例2: isDirty
import org.apache.gora.persistency.Dirtyable; //导入依赖的package包/类
@Override
public boolean isDirty() {
boolean anyDirty = false;
for (T value : this) {
anyDirty = anyDirty || (value instanceof Dirtyable) ? ((Dirtyable) value).isDirty():false;
}
return anyDirty || dirtyFlag.isDirty();
}
示例3: clearDirty
import org.apache.gora.persistency.Dirtyable; //导入依赖的package包/类
@Override
public void clearDirty() {
for (T value : this) {
if (value instanceof Dirtyable)
((Dirtyable) value).clearDirty();
}
dirtyFlag.clearDirty();
}
示例4: clearDirynessIfFieldIsDirtyable
import org.apache.gora.persistency.Dirtyable; //导入依赖的package包/类
private void clearDirynessIfFieldIsDirtyable(int fieldIndex) {
if (fieldIndex == 0)
return;
Object value = get(fieldIndex);
if (value instanceof Dirtyable) {
((Dirtyable) value).clearDirty();
}
}
示例5: isDirty
import org.apache.gora.persistency.Dirtyable; //导入依赖的package包/类
@Override
public boolean isDirty() {
boolean anyDirty = false;
for (V v : this.values()) {
anyDirty = anyDirty || (v instanceof Dirtyable) ? ((Dirtyable) v)
.isDirty() : false;
}
return anyDirty || dirtyFlag.isDirty();
}
示例6: clearDirty
import org.apache.gora.persistency.Dirtyable; //导入依赖的package包/类
@Override
public void clearDirty() {
for (V v : this.values()) {
if (v instanceof Dirtyable)
((Dirtyable) v).clearDirty();
}
dirtyFlag.clearDirty();
}
示例7: checkIfMutableFieldAndDirty
import org.apache.gora.persistency.Dirtyable; //导入依赖的package包/类
private boolean checkIfMutableFieldAndDirty(Field field) {
switch (field.schema().getType()) {
case RECORD:
case MAP:
case ARRAY:
Object value = get(field.pos());
return !(value instanceof Dirtyable) || value==null ? false : ((Dirtyable) value).isDirty();
case UNION:
value = get(field.pos());
return !(value instanceof Dirtyable) || value==null ? false : ((Dirtyable) value).isDirty();
default:
break;
}
return false;
}
示例8: clearDirynessIfFieldIsDirtyable
import org.apache.gora.persistency.Dirtyable; //导入依赖的package包/类
private void clearDirynessIfFieldIsDirtyable(int fieldIndex) {
Object value = get(fieldIndex);
if (value instanceof Dirtyable) {
((Dirtyable) value).clearDirty();
}
}