當前位置: 首頁>>代碼示例>>Java>>正文


Java Dirtyable類代碼示例

本文整理匯總了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;
}
 
開發者ID:jianglibo,項目名稱:gora-boot,代碼行數:18,代碼來源:PersistentBase.java

示例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();
}
 
開發者ID:jianglibo,項目名稱:gora-boot,代碼行數:9,代碼來源:DirtyCollectionWrapper.java

示例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();
}
 
開發者ID:jianglibo,項目名稱:gora-boot,代碼行數:9,代碼來源:DirtyCollectionWrapper.java

示例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();
  }
}
 
開發者ID:jianglibo,項目名稱:gora-boot,代碼行數:9,代碼來源:PersistentBase.java

示例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();
}
 
開發者ID:jianglibo,項目名稱:gora-boot,代碼行數:10,代碼來源:DirtyMapWrapper.java

示例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();
}
 
開發者ID:jianglibo,項目名稱:gora-boot,代碼行數:9,代碼來源:DirtyMapWrapper.java

示例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;
}
 
開發者ID:apache,項目名稱:gora,代碼行數:16,代碼來源:PersistentBase.java

示例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();
  }
}
 
開發者ID:apache,項目名稱:gora,代碼行數:7,代碼來源:PersistentBase.java


注:本文中的org.apache.gora.persistency.Dirtyable類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。