pl.edu.agh.cast.model.mapper.internal
Class AbstractSaver

java.lang.Object
  extended by pl.edu.agh.cast.model.mapper.internal.AbstractSaver
All Implemented Interfaces:
Saver
Direct Known Subclasses:
DBSaver, XMLSaver

public abstract class AbstractSaver
extends Object
implements Saver

Partial implementation of the Saver interface.

Author:
AGH CAST Team

Field Summary
protected  boolean force
          The force flag (should the save be forced?).
protected static org.apache.log4j.Logger log
          The logger.
protected  Map<Long,Node> nodes
          Mapping: node id - node
protected  Mappable primaryObject
          The object to be saved.
protected  LinkedList<Mappable> queue
          The queue of nodes to be saved.
protected  Set<Mappable> stored
          The saved nodes set.
protected  Set<Mappable> visited
          The visited nodes set.
 
Constructor Summary
AbstractSaver(Mappable object, boolean force2)
          Constructor takes the object to be saved and accepts the force flag (if set to true, the object is saved no matter if it was saved earlier.
 
Method Summary
protected  Mapping getMapping(Class<Mappable> klass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pl.edu.agh.cast.model.mapper.Saver
save
 

Field Detail

log

protected static org.apache.log4j.Logger log
The logger.


primaryObject

protected Mappable primaryObject
The object to be saved.


force

protected boolean force
The force flag (should the save be forced?).


visited

protected Set<Mappable> visited
The visited nodes set.


stored

protected Set<Mappable> stored
The saved nodes set.


queue

protected LinkedList<Mappable> queue
The queue of nodes to be saved.


nodes

protected Map<Long,Node> nodes
Mapping: node id - node

Constructor Detail

AbstractSaver

public AbstractSaver(Mappable object,
                     boolean force2)
Constructor takes the object to be saved and accepts the force flag (if set to true, the object is saved no matter if it was saved earlier.

Parameters:
object - The object to save
force2 - The force flag
Method Detail

getMapping

protected Mapping getMapping(Class<Mappable> klass)


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.