org.opensubsystems.blog.persist.db.sapdb
Class SapDBBlogDatabaseSchema

java.lang.Object
  extended by org.opensubsystems.core.persist.db.DatabaseSchemaImpl
      extended by org.opensubsystems.core.persist.db.ModifiableDatabaseSchemaImpl
          extended by org.opensubsystems.blog.persist.db.BlogDatabaseSchema
              extended by org.opensubsystems.blog.persist.db.sapdb.SapDBBlogDatabaseSchema
All Implemented Interfaces:
org.opensubsystems.core.persist.db.DatabaseOperations, org.opensubsystems.core.persist.db.DatabaseSchema, org.opensubsystems.core.persist.db.ModifiableDatabaseSchema
Direct Known Subclasses:
MaxDBBlogDatabaseSchema

public class SapDBBlogDatabaseSchema
extends BlogDatabaseSchema

Database specific operations related to persistence of blogs and their entries. This class encapsulate functionality specific for SapDB.

Version:
$Id: SapDBBlogDatabaseSchema.java,v 1.8 2007/02/20 01:58:05 bastafidli Exp $
Author:
Julian Legeny
Code reviewer:
Miro Halas
Code reviewed:
1.4 2006/07/21 00:54:57 jlegeny

Field Summary
static int BLOG_COMMENTS_MAXLENGTH_SAPDB
          Maximal length of blog comments.
static int BLOGENTRY_COMMENTS_MAXLENGTH_SAPDB
          Maximal length of blog entry comments.
 
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
 
Constructor Summary
SapDBBlogDatabaseSchema()
          Default constructor.
 
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
 

Field Detail

BLOG_COMMENTS_MAXLENGTH_SAPDB

public static final int BLOG_COMMENTS_MAXLENGTH_SAPDB
Maximal length of blog comments. Restriction for VARCHAR type is max. 8000 characters for SapDB/MaxDB. There are also next restrictions for columns: 1. The total length of the output columns cannot exceed 8084 bytes. 2. The total length of the output columns, together with the columns specified in the ORDER or GROUP clause, cannot exceed 8084 bytes. 3. The total length of the output columns, together with the correlated columns and columns of predicates that contain a subquery, cannot exceed 4048 bytes in an SQL statement with correlated subqueries. read more at: http://dev.mysql.com/doc/maxdb/en/be/9970fc050e11d2a96c00a0c9449261/content.htm

See Also:
Constant Field Values

BLOGENTRY_COMMENTS_MAXLENGTH_SAPDB

public static final int BLOGENTRY_COMMENTS_MAXLENGTH_SAPDB
Maximal length of blog entry comments. Restriction for VARCHAR type is max. 8000 characters for SapDB/MaxDB. There are also next restrictions for columns: 1. The total length of the output columns cannot exceed 8084 bytes. 2. The total length of the output columns, together with the columns specified in the ORDER or GROUP clause, cannot exceed 8084 bytes. 3. The total length of the output columns, together with the correlated columns and columns of predicates that contain a subquery, cannot exceed 4048 bytes in an SQL statement with correlated subqueries. read more at: http://dev.mysql.com/doc/maxdb/en/be/9970fc050e11d2a96c00a0c9449261/content.htm

See Also:
Constant Field Values
Constructor Detail

SapDBBlogDatabaseSchema

public SapDBBlogDatabaseSchema()
                        throws org.opensubsystems.core.error.OSSException
Default constructor.

Throws:
org.opensubsystems.core.error.OSSException - - error occured.
Method Detail

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.