|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.sdsc.inca.depot.persistent.PersistentObject
public abstract class PersistentObject
This is an abstract base class that defines common behavior for all objects that the Depot stores in the database.
Field Summary | |
---|---|
static java.lang.String |
DB_EMPTY_STRING
Value used to store null/empty strings in the database. |
protected static org.apache.log4j.Logger |
logger
|
static int |
MAX_DB_LONG_STRING_LENGTH
|
static int |
MAX_DB_STRING_LENGTH
Maximum length for string DB fields. |
Constructor Summary | |
---|---|
PersistentObject()
|
Method Summary | |
---|---|
abstract PersistentObject |
fromBean(org.apache.xmlbeans.XmlObject o)
Copies information from an Inca schema XmlBean object so that this object contains equivalent information. |
abstract org.apache.xmlbeans.XmlObject |
toBean()
Returns a Inca schema XmlBean object that contains information equivalent to this object. |
java.lang.String |
toXml()
Returns XML that represents the information in this object. |
java.lang.String |
truncate(java.lang.String s,
int max,
java.lang.String label)
A convenience function for implementations that checks the length of a string and truncates with a warning if it's too long. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
public static final int MAX_DB_STRING_LENGTH
public static final int MAX_DB_LONG_STRING_LENGTH
public static final java.lang.String DB_EMPTY_STRING
Constructor Detail |
---|
public PersistentObject()
Method Detail |
---|
public abstract PersistentObject fromBean(org.apache.xmlbeans.XmlObject o)
o
- the XmlBean object to copy
public abstract org.apache.xmlbeans.XmlObject toBean()
public java.lang.String toXml()
public java.lang.String truncate(java.lang.String s, int max, java.lang.String label)
s
- the string to checkmax
- the maximum lengthlabel
- included in the warning message if truncation occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |