com.knowgate.dataxslt.db
Class MicrositeDB
java.lang.Object
com.knowgate.dataobjs.DBPersist
com.knowgate.dataxslt.db.MicrositeDB
- All Implemented Interfaces:
- java.io.Serializable, java.util.Map
public class MicrositeDB
- extends DBPersist
Microsite database index
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
|
Method Summary |
boolean |
existsFile()
|
static java.lang.String |
filePath(JDCConnection oConn,
java.lang.String sMicrositeGUID)
Get relative path to XML metadata file
Relative path is readed from field path_metadata of table k_microsites. |
boolean |
load(JDCConnection oConn,
java.lang.Object[] aPK)
Load the internal value set from a register at a database table |
boolean |
store(JDCConnection oConn)
Store a register at database representing this instance of DBPersist
Insertions and updates : The store method automatically manages
register insertions and updates. |
| Methods inherited from class com.knowgate.dataobjs.DBPersist |
allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, delete, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
ClassId
public static final short ClassId
- See Also:
- Constant Field Values
TYPE_XSL
public static final short TYPE_XSL
- See Also:
- Constant Field Values
TYPE_HTML
public static final short TYPE_HTML
- See Also:
- Constant Field Values
TYPE_SURVEY
public static final short TYPE_SURVEY
- See Also:
- Constant Field Values
MicrositeDB
public MicrositeDB()
MicrositeDB
public MicrositeDB(JDCConnection oConn,
java.lang.String sMicrositeGUID)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
load
public boolean load(JDCConnection oConn,
java.lang.Object[] aPK)
throws java.sql.SQLException
- Description copied from class:
DBPersist
Load the internal value set from a register at a database table
- Overrides:
load in class DBPersist
- Parameters:
oConn - Database ConnectionaPK - Primary key values in order of appearance
- Returns:
- true if a register was found, false if no register was
found with such primary key.
- Throws:
java.sql.SQLException
store
public boolean store(JDCConnection oConn)
throws java.sql.SQLException
- Description copied from class:
DBPersist
Store a register at database representing this instance of DBPersist
Insertions and updates : The store method automatically manages
register insertions and updates. If the stored object already exists at
database then it is updated, if it does not exists then it is inserted.
A primary key violation error is never thrown so ther is no need to call
delete() method before re-writing an existing object.
NULL fields : All values not set calling put() methods for DBPersist
will be assumed to be NULL. If a not nullable field is not set then an
SQLException will be raised.
On storing an already existing object all values will we overwrited,
so is a DBPersist is not fully loaded before storing it, values not set
by calling put() methods that already were present at database will be lost.
- Overrides:
store in class DBPersist
- Parameters:
oConn - Database Connection
- Returns:
- boolean true if register was stored for the first time,
false if register already existed.
- Throws:
java.sql.SQLException
existsFile
public boolean existsFile()
filePath
public static java.lang.String filePath(JDCConnection oConn,
java.lang.String sMicrositeGUID)
throws java.sql.SQLException
Get relative path to XML metadata file
Relative path is readed from field path_metadata of table k_microsites.
For example: xslt/templates/Basic.xml
Slashes or backsclashes are used as file separators depending on the value of
System.getProperty("file.separator") and independently of what separator is
used at path_metadata field.
- Parameters:
oConn - Database ConnectionsMicrositeGUID - GUID of Microsite witch metadata file relative path is to be retrieved
- Returns:
- Relative path to XML metadata file or null if no Microsite with such GUID was found at k_microsites table.
- Throws:
java.sql.SQLException