ewe.database
Class MetaFlag
java.lang.Object
ewe.database.MetaFlag
- public class MetaFlag
- extends Object
This represents a single integer value that can be stored in a Database using
its MetaData facilities. After creating it you can call getValue() and saveValue()
to read and write it to the database.
|
Constructor Summary |
MetaFlag(String name,
Database db)
Create a MetaFlag with the specified name for the specified database. |
MetaFlag
public MetaFlag(String name,
Database db)
throws IOException
- Create a MetaFlag with the specified name for the specified database. Note that
if the db is open for read write this will automatically create and save the MetaData if
it does not already exist.
isSaved
public boolean isSaved()
getValue
public int getValue()
canWrite
public boolean canWrite()
setValue
public void setValue(int value)
throws IOException
- This sets the current value. It is kept locally in a field and will only
be written to the DB if it is different from what is stored on the DB.
- Throws:
IOException