|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tentackle.db.DbObject
org.tentackle.db.DbPreferencesNode
public class DbPreferencesNode
Preferences Node stored in the database.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.tentackle.db.DbObject |
|---|
DbObject.CopyAllToDbLogger, DbObject.IdComparator<T extends DbObject>, DbObject.NameComparator<T extends DbObject>, DbObject.NameIdComparator<T extends DbObject> |
| Field Summary | |
|---|---|
static String |
FIELD_NAME
database column name for name |
static String |
FIELD_PARENTID
database column name for parentId |
static String |
FIELD_USER
database column name for user |
static String |
TABLENAME
database tablename |
| Fields inherited from class org.tentackle.db.DbObject |
|---|
BEGIN, COMMIT, DELETE, DELETEALL, FIELD_ID, FIELD_SERIAL, FIELD_TABLESERIAL, idComparator, INSERT, lazyMethodInterval, nameComparator, nameIdComparator, TX_DELETE_LIST, TX_DELETE_MISSING_IN_LIST, TX_DELETE_OBJECT, TX_DUMMY_UPDATE, TX_INSERT_OBJECT, TX_INSERT_PLAIN, TX_SAVE, TX_SAVE_LIST, TX_UPDATE_OBJECT, TX_UPDATE_PLAIN, TX_UPDATE_SERIAL, TX_UPDATE_SERIAL_AND_TABLESERIAL, TX_UPDATE_TABLESERIAL, UPDATE |
| Constructor Summary | |
|---|---|
DbPreferencesNode()
Creates a node (without db). |
|
DbPreferencesNode(Db db)
Creates a node. |
|
| Method Summary | |
|---|---|
String |
getBaseName()
Gets the basename of the node. |
DbObjectClassVariables |
getDbObjectClassVariables()
Gets the some attributes and variables common to all objects of the same class. |
boolean |
getFields(ResultSetWrapper rs)
Retrieves the values of all fields (all columns of the database table) in the given ResultSetWrapper and stores them in the object's attributes. |
ImageIcon |
getIcon()
Gets the icon of this object. |
String |
getName()
Gets the db attribute name |
long |
getParentId()
Gets the db attribute parentId |
String |
getUser()
Gets the db attribute user |
boolean |
isCountingModification(int modType)
Determines whether modifications of this object are counted in the modification table. |
boolean |
isTableSerialValid()
By default objects don't need to include the tableSerial in the database table. |
int |
prepareInsertStatement()
Prepares the insert statement. |
int |
prepareUpdateStatement()
Prepare the update statement. |
DbPreferencesNode |
select(long id)
Selects a node by its ID. |
List<DbPreferencesNode> |
selectByParentId(long parentId)
Gets all nodes belonging to a parent node. |
DbPreferencesNode |
selectByUserAndName(String user,
String name)
Selects a node by user and name. |
Set<Long> |
selectChildIds()
Selects the object IDs of all childs nodes. |
int |
setFields(PreparedStatementWrapper st)
Sets the values of all fields (all columns of the database table) in the given PreparedStatementWrapper from the object's attributes. |
void |
setName(String name)
Sets the db attribute name |
void |
setParentId(long parentId)
Sets the db attribute parentId |
void |
setUser(String user)
Sets the db attribute user |
String |
toString()
Gets the default string value. The default implementation invokes DbObject.toGenericString(). |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TABLENAME
public static final String FIELD_USER
public static final String FIELD_NAME
public static final String FIELD_PARENTID
| Constructor Detail |
|---|
public DbPreferencesNode(Db db)
db - the db connectionpublic DbPreferencesNode()
| Method Detail |
|---|
public boolean isCountingModification(int modType)
DbObject
isCountingModification in class DbObjectmodType - is one of the modtypes INSERT, UPDATE, DELETE, ...
ModificationCounterpublic boolean isTableSerialValid()
DbObject
isTableSerialValid in class DbObjectpublic ImageIcon getIcon()
DbObjectPlafGlobal.getIcon(java.lang.String, java.lang.String)("unknown").
getIcon in class DbObjectpublic DbObjectClassVariables getDbObjectClassVariables()
DbObjectDbObjectClassVariables.
getDbObjectClassVariables in class DbObjectpublic boolean getFields(ResultSetWrapper rs)
DbObjectResultSetWrapper and stores them in the object's attributes.
getFields in class DbObjectrs - the result set
public int setFields(PreparedStatementWrapper st)
DbObjectPreparedStatementWrapper from the object's attributes.
setFields in class DbObjectst - the statement
public DbPreferencesNode select(long id)
select in class DbObjectid - is the object id
public int prepareInsertStatement()
DbObject
prepareInsertStatement in class DbObjectpublic int prepareUpdateStatement()
DbObject
prepareUpdateStatement in class DbObjectpublic List<DbPreferencesNode> selectByParentId(long parentId)
parentId - the ID of the parent node, 0 = rootnode
public Set<Long> selectChildIds()
public DbPreferencesNode selectByUserAndName(String user,
String name)
user - is the username, null = systemname - is the absolute pathname of the node, ""=root
public String getUser()
public void setUser(String user)
user - name of user, null = systempublic String getName()
public void setName(String name)
name - name of the nodepublic long getParentId()
public void setParentId(long parentId)
parentId - ID of parent node, 0 = rootnodepublic String getBaseName()
public String toString()
DbObjectDbObject.toGenericString().
toString in class DbObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||