com.notuvy.xml
Class BaseStorage

java.lang.Object
  extended by com.notuvy.xml.BaseStorage
All Implemented Interfaces:
XmlStorable
Direct Known Subclasses:
FileStorage

public abstract class BaseStorage
extends Object
implements XmlStorable

The abstract base logic for persisting SimpleJdom.

Author:
murali

Field Summary
protected  SimpleJdom fObject
           
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
protected BaseStorage(SimpleJdom pObject)
           
 
Method Summary
 SimpleJdom getObject()
           
 boolean isOnlySaveIfChanged()
           
 void setOnlySaveIfChanged(boolean pOnlySaveIfChanged)
           
protected  boolean skipSave()
          There is one situatin where we do a NOOP.
protected  void takeContentSnapshot()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.notuvy.xml.XmlStorable
delete, exists, read, readIfStoredImageExists, readOrCreate, save
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG

fObject

protected final SimpleJdom fObject
Constructor Detail

BaseStorage

protected BaseStorage(SimpleJdom pObject)
Method Detail

getObject

public SimpleJdom getObject()

isOnlySaveIfChanged

public boolean isOnlySaveIfChanged()
Specified by:
isOnlySaveIfChanged in interface XmlStorable

setOnlySaveIfChanged

public void setOnlySaveIfChanged(boolean pOnlySaveIfChanged)
Specified by:
setOnlySaveIfChanged in interface XmlStorable

skipSave

protected boolean skipSave()
There is one situatin where we do a NOOP. That is if we are checking for changed content, and the contents have not changed. In that case just return 'success'. Otherwise return the status of the save operation.

Returns:
boolean flag whether the actual save operation should be skipped.

takeContentSnapshot

protected void takeContentSnapshot()


Copyright © 2013. All Rights Reserved.