de.uni_bremen.st.rcf.model
Class AbstractRCF

java.lang.Object
  extended by de.uni_bremen.st.rcf.model.AbstractRCF
Direct Known Subclasses:
RCF

public abstract class AbstractRCF
extends Object


Constructor Summary
AbstractRCF(AbstractRCFBinding binding)
          Please use the PersistenceManager of the desired persistence mechanism to obtain RCF objects!
AbstractRCF(AbstractRCFBinding binding, boolean create)
          Deprecated. 
 
Method Summary
 Relation<Entry> addRelation(String name)
           
 void close()
          Closes the RCF.
 File getFile()
          Get the RCF file.
 Relation<Entry> getRelation(String name)
           
 List<Relation<Entry>> getRelations()
           
 boolean hasRelation(String name)
           
 void save()
          Saves the rcf to its file.
 void saveAs(File f)
          Saves the rcf to the specified file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRCF

public AbstractRCF(AbstractRCFBinding binding)
Please use the PersistenceManager of the desired persistence mechanism to obtain RCF objects!

See Also:
AbstractPersistenceManager, PersistenceManagerFactory

AbstractRCF

@Deprecated
public AbstractRCF(AbstractRCFBinding binding,
                              boolean create)
Deprecated. 

Method Detail

addRelation

public Relation<Entry> addRelation(String name)

hasRelation

public boolean hasRelation(String name)

getRelation

public Relation<Entry> getRelation(String name)

getRelations

public List<Relation<Entry>> getRelations()

save

public void save()
Saves the rcf to its file. For database backed RCFs (default) this has no effect, as database backed RCF will always write changes immediately.


saveAs

public void saveAs(File f)
Saves the rcf to the specified file. For database backed RCFs (default) a copy of the RCF will be saved in the given location.

Parameters:
f - the file to save to

close

public void close()
Closes the RCF. This operation only has an effect on database backed RCFs (default). You should always call close() when you are done using the RCF. You will encounter error messages or loose data if you don't.


getFile

public File getFile()
Get the RCF file.

Returns:
the file


Copyright © 2011. All Rights Reserved.