本文整理匯總了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();
}
}