public class DBObject extends Object
Methods to add to, update in and remove from a database are called anyway for XML projects, and can thus be used to perform tasks on updating a specific object.
Modifier and Type | Field and Description |
---|---|
protected long |
id |
protected Project |
project |
Constructor and Description |
---|
DBObject(Loader loader)
For the Project
|
DBObject(Project project)
Create new and later add it to the database.
|
DBObject(Project project,
long id)
Reconstruct from database.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addToDatabase() |
void |
exportXML(StringBuilder sb_body,
String indent,
XMLOptions options)
Subclasses can override this method to store the instance as XML.
|
long |
getId() |
String |
getInfo()
Returns id and project name; this method is meant to be overriden by any of the subclasses.
|
Project |
getProject() |
String |
getShortTitle()
Sublcasses can override this method to provide a proper String, otherwise calls getTitle()
|
String |
getTitle()
Sublcasses can override this method to provide a proper String, otherwise calls toString()
|
String |
getUniqueIdentifier()
Create a unique String identifier for this object instance.
|
boolean |
remove(boolean check)
Subclasses can override this method to perform other tasks before removing itself from the database.
|
boolean |
removeFromDatabase() |
boolean |
updateInDatabase(Set<String> keys) |
boolean |
updateInDatabase(String key) |
protected long id
protected Project project
public DBObject(Project project)
public DBObject(Project project, long id)
public DBObject(Loader loader)
public final long getId()
public String getUniqueIdentifier()
public final Project getProject()
public boolean addToDatabase()
public boolean updateInDatabase(String key)
public boolean removeFromDatabase()
public boolean remove(boolean check)
public void exportXML(StringBuilder sb_body, String indent, XMLOptions options)
public String getTitle()
public String getShortTitle()
public String getInfo()
Copyright © 2015–2021 Fiji. All rights reserved.