|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmaito.resource.Resource
public class Resource
An object representing a complete resource in the resource database. This object contains methods for loading & saving resources to database & setting resource fields
| Field Summary | |
|---|---|
static int |
IDLENGTH
|
| Constructor Summary | |
|---|---|
Resource(java.lang.String id,
java.lang.String type)
Initialize this resource. |
|
| Method Summary | |
|---|---|
java.lang.String |
findUniqueID(java.sql.Connection con)
Finds the unique id for this resource based on the current id. |
java.util.HashSet |
getExtIDs()
|
java.lang.String |
getID()
|
java.util.HashSet |
getKeywords()
|
boolean |
getOverwrite()
Get current overwrite status |
java.lang.String |
getSingleField(java.lang.String key)
|
java.lang.String |
getType()
|
boolean |
load(java.sql.Connection con)
Loads the resource data from database into this Resource object. |
boolean |
save(java.sql.Connection con)
Save this Resource object's state into the database |
boolean |
setField(java.lang.String key,
java.lang.String value)
Sets the value for a specified key in this resource. |
void |
setOverwrite(boolean which)
Set whether updates to this Record overwrite existing values or not. |
java.lang.StringBuffer |
toHTML()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int IDLENGTH
| Constructor Detail |
|---|
public Resource(java.lang.String id,
java.lang.String type)
id - a unique id for this resourcetype - the type of resource this is.
Allowed values: Actor, Document, Channel, Role| Method Detail |
|---|
public void setOverwrite(boolean which)
which - true of falsepublic boolean getOverwrite()
public java.lang.String findUniqueID(java.sql.Connection con)
con - connection to database
public java.lang.String getID()
public boolean setField(java.lang.String key,
java.lang.String value)
key - Resource field to be savedvalue - the value for the field
public boolean load(java.sql.Connection con)
con - Connection to database
public boolean save(java.sql.Connection con)
con -
public java.lang.String getSingleField(java.lang.String key)
public java.util.HashSet getKeywords()
public java.util.HashSet getExtIDs()
public java.lang.String getType()
public java.lang.StringBuffer toHTML()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||