org.opensubsystems.blog.persist.db.postgresql
Class PostgreSQLBlogDatabaseSchema
java.lang.Object
org.opensubsystems.core.persist.db.DatabaseSchemaImpl
org.opensubsystems.core.persist.db.ModifiableDatabaseSchemaImpl
org.opensubsystems.blog.persist.db.BlogDatabaseSchema
org.opensubsystems.blog.persist.db.postgresql.PostgreSQLBlogDatabaseSchema
- All Implemented Interfaces:
- org.opensubsystems.core.persist.db.DatabaseOperations, org.opensubsystems.core.persist.db.DatabaseSchema, org.opensubsystems.core.persist.db.ModifiableDatabaseSchema
public class PostgreSQLBlogDatabaseSchema
- extends BlogDatabaseSchema
Database specific operations related to persistence of blogs and their
entries. This class encapsulate functionality specific for Postgre SQL.
- Version:
- $Id: PostgreSQLBlogDatabaseSchema.java,v 1.8 2007/02/20 01:58:06 bastafidli Exp $
- Author:
- Julian Legeny
- Code reviewer:
- Miro Halas
- Code reviewed:
- 1.3 2006/07/21 00:54:58 jlegeny
| Fields inherited from class org.opensubsystems.blog.persist.db.BlogDatabaseSchema |
BLOG_CAPTION_MAXLENGTH, BLOG_COLUMNS, BLOG_COMMENTS_MAXLENGTH, BLOG_FOLDER_MAXLENGTH, BLOG_SCHEMA_NAME, BLOG_SCHEMA_VERSION, BLOG_TABLE_NAME, BLOGENTRY_CAPTION_MAXLENGTH, BLOGENTRY_COMMENTS_MAXLENGTH, BLOGENTRY_IMAGEURL_MAXLENGTH, BLOGENTRY_TABLE_NAME, BLOGENTRY_TARGETURL_MAXLENGTH, ENTRY_COLUMNS, TABLE_NAMES |
| Fields inherited from class org.opensubsystems.core.persist.db.ModifiableDatabaseSchemaImpl |
m_mapModifiableTableNames |
| Fields inherited from class org.opensubsystems.core.persist.db.DatabaseSchemaImpl |
DATABASE_SCHEMA_PREFIX, DATABASE_SCHEMA_PREFIX_DEFAULT, m_arrDependentSchemas, m_bIsInDomain, m_iSchemaVersion, m_strSchemaName, NL |
| Fields inherited from interface org.opensubsystems.core.persist.db.DatabaseOperations |
DBOP_DELETE, DBOP_INSERT, DBOP_SELECT, DBOP_UPDATE |
|
Method Summary |
void |
create(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
|
java.lang.String |
getInsertBlogAndFetchGeneratedValues()
Get query that inserts a blog to the database and fetches database
generated values such as the generated id and creation timestamp |
java.lang.String |
getInsertEntryAndFetchGeneratedValues()
Get query that inserts a entry to the database and fetches database
generated values such as the generated id and creation timestamp |
java.lang.String |
getUpdateBlogAndFetchGeneratedValues()
Get query that updates blog in the database and fetches database
generated values such as the updated modification timestamp |
java.lang.String |
getUpdateEntryAndFetchGeneratedValues()
Get query that updates entry in the database and fetches database
generated values such as the updated modification timestamp |
| Methods inherited from class org.opensubsystems.blog.persist.db.BlogDatabaseSchema |
getDeleteBlogById, getDeleteEntryById, getInsertBlog, getInsertEntry, getSelectAllBlogs, getSelectAllEntries, getSelectBlogByFolder, getSelectBlogById, getSelectEntryById, getSelectLastEntry, handleSQLException |
| Methods inherited from class org.opensubsystems.core.persist.db.ModifiableDatabaseSchemaImpl |
deleteRelatedData, getModifiableTableNames |
| Methods inherited from class org.opensubsystems.core.persist.db.DatabaseSchemaImpl |
getDependentSchemas, getJoinFromWhere, getName, getOwnerColumnNames, getSchemaPrefix, getVersion, isExistingIndex, isInDomain, upgrade, upgradeView |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensubsystems.core.persist.db.DatabaseSchema |
getDependentSchemas, getName, getVersion, isInDomain, upgrade |
BLOG_COMMENTS_MAXLENGTH_POSTGRES
public static final int BLOG_COMMENTS_MAXLENGTH_POSTGRES
- Maximal length of blog comments.
Restriction for VARCHAR type is max. 32768 characters for Postgre SQL database.
- See Also:
- Constant Field Values
BLOGENTRY_COMMENTS_MAXLENGTH_POSTGRES
public static final int BLOGENTRY_COMMENTS_MAXLENGTH_POSTGRES
- Maximal length of blog entry comments.
Restriction for VARCHAR type is max. 32768 characters for Postgre SQL database.
- See Also:
- Constant Field Values
PostgreSQLBlogDatabaseSchema
public PostgreSQLBlogDatabaseSchema()
throws org.opensubsystems.core.error.OSSException
- Default constructor.
- Throws:
org.opensubsystems.core.error.OSSException - - error occured.
create
public void create(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
getInsertBlogAndFetchGeneratedValues
public java.lang.String getInsertBlogAndFetchGeneratedValues()
throws org.opensubsystems.core.error.OSSException
- Get query that inserts a blog to the database and fetches database
generated values such as the generated id and creation timestamp
- Specified by:
getInsertBlogAndFetchGeneratedValues in class BlogDatabaseSchema
- Returns:
- String - query for simple insert or stored procedure call
- Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
getUpdateBlogAndFetchGeneratedValues
public java.lang.String getUpdateBlogAndFetchGeneratedValues()
throws org.opensubsystems.core.error.OSSException
- Get query that updates blog in the database and fetches database
generated values such as the updated modification timestamp
- Specified by:
getUpdateBlogAndFetchGeneratedValues in class BlogDatabaseSchema
- Returns:
- String - query for simple update or stored procedure call
- Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
getInsertEntryAndFetchGeneratedValues
public java.lang.String getInsertEntryAndFetchGeneratedValues()
throws org.opensubsystems.core.error.OSSException
- Get query that inserts a entry to the database and fetches database
generated values such as the generated id and creation timestamp
- Specified by:
getInsertEntryAndFetchGeneratedValues in class BlogDatabaseSchema
- Returns:
- String - query for simple insert or stored procedure call
- Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
getUpdateEntryAndFetchGeneratedValues
public java.lang.String getUpdateEntryAndFetchGeneratedValues()
throws org.opensubsystems.core.error.OSSException
- Get query that updates entry in the database and fetches database
generated values such as the updated modification timestamp
- Specified by:
getUpdateEntryAndFetchGeneratedValues in class BlogDatabaseSchema
- Returns:
- String - query for simple update or stored procedure call
- Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
Copyright © 2003 - 2007 OpenSubsystems s.r.o.