org.opensubsystems.inventory.persist.db.sybase
Class SybaseIdentificationDatabaseSchema

java.lang.Object
  extended by org.opensubsystems.core.persist.db.DatabaseSchemaImpl
      extended by org.opensubsystems.core.persist.db.ModifiableDatabaseSchemaImpl
          extended by org.opensubsystems.patterns.listdata.persist.db.impl.ModifiableListDatabaseSchemaImpl
              extended by org.opensubsystems.inventory.persist.db.IdentificationDatabaseSchema
                  extended by org.opensubsystems.inventory.persist.db.sybase.SybaseIdentificationDatabaseSchema
All Implemented Interfaces:
org.opensubsystems.core.persist.db.DatabaseOperations, org.opensubsystems.core.persist.db.DatabaseSchema, org.opensubsystems.core.persist.db.ModifiableDatabaseSchema, org.opensubsystems.patterns.listdata.persist.db.ListDatabaseSchema

public class SybaseIdentificationDatabaseSchema
extends IdentificationDatabaseSchema

Database specific operations related to persistence of identifications in Sybase ASE.

Version:
$Id: SybaseIdentificationDatabaseSchema.java,v 1.9 2007/01/07 06:14:53 bastafidli Exp $
Author:
Julian Legeny
Code reviewer:
TODO: Review this code
Code reviewed:

Field Summary
 
Fields inherited from class org.opensubsystems.inventory.persist.db.IdentificationDatabaseSchema
IDENTIFICATION_COMMENTS_MAXLENGTH, IDENTIFICATION_EXTERNALNUMBER_MAXLENGTH, IDENTIFICATION_INTERNALNUMBER_MAXLENGTH, IDENTIFICATION_MANDATORY_RETRIEVE_COLUMNS, IDENTIFICATION_SCHEMA_NAME, IDENTIFICATION_SCHEMA_VERSION, IDENTIFICATION_SORT_COLUMNS
 
Fields inherited from class org.opensubsystems.patterns.listdata.persist.db.impl.ModifiableListDatabaseSchemaImpl
m_mapFilterableColumns, m_mapListableTableNames, m_mapMandatoryRetrieveColumns, m_mapSortableColumns
 
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
SybaseIdentificationDatabaseSchema()
          Default constructor.
 
Method Summary
 void create(java.sql.Connection cntDBConnection, java.lang.String strUserName)
          
 java.lang.String getInsertIdentificationAndFetchGeneratedValues()
          Get query that inserts a identification to the database and fetches database generated values such as the generated id and creation timestamp
protected  java.lang.String getSelectNextInternalNumberOrderedNumbersSql()
          Get sql statemnet used in function getNextIdentification to retrieve ordered list of identifications
 java.lang.String getUpdateIdentificationAndFetchGeneratedValues()
          Get query that updates identification in the database and fetches database generated values such as the updated modification timestamp
 
Methods inherited from class org.opensubsystems.inventory.persist.db.IdentificationDatabaseSchema
createListIndexes, delete, getColumns, getDeleteIdentificationById, getExistingSerialNumbersData, getInsertIdentification, getSelectAllDataForInventory, getSelectExternalNumberExist, getSelectForItem, getSelectIdentificationById, getSelectIdentificationByInternalNumber, getSelectInternalNumberForExternalNumber, getSelectInternalNumberForNotUniquelyTracked, getSelectInternalNumberUsed, getSelectLastCreated, getSetAllRetired, getUpdateIdentification, handleSQLException, setRetired
 
Methods inherited from class org.opensubsystems.patterns.listdata.persist.db.impl.ModifiableListDatabaseSchemaImpl
getFilterbleColumns, getMandatoryRetrieveColumns, getSelectList, getSortableColumns
 
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.patterns.listdata.persist.db.ListDatabaseSchema
getJoinFromWhere, isExistingIndex
 
Methods inherited from interface org.opensubsystems.core.persist.db.DatabaseSchema
getDependentSchemas, getName, getVersion, isInDomain, upgrade
 

Constructor Detail

SybaseIdentificationDatabaseSchema

public SybaseIdentificationDatabaseSchema()
                                   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,
                   org.opensubsystems.core.error.OSSException

Throws:
java.sql.SQLException
org.opensubsystems.core.error.OSSException

getInsertIdentificationAndFetchGeneratedValues

public java.lang.String getInsertIdentificationAndFetchGeneratedValues()
                                                                throws org.opensubsystems.core.error.OSSException
Get query that inserts a identification to the database and fetches database generated values such as the generated id and creation timestamp

Specified by:
getInsertIdentificationAndFetchGeneratedValues in class IdentificationDatabaseSchema
Returns:
String - query for simple insert or stored procedure call
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured

getUpdateIdentificationAndFetchGeneratedValues

public java.lang.String getUpdateIdentificationAndFetchGeneratedValues()
                                                                throws org.opensubsystems.core.error.OSSException
Get query that updates identification in the database and fetches database generated values such as the updated modification timestamp

Specified by:
getUpdateIdentificationAndFetchGeneratedValues in class IdentificationDatabaseSchema
Returns:
String - query for simple update or stored procedure call
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured

getSelectNextInternalNumberOrderedNumbersSql

protected java.lang.String getSelectNextInternalNumberOrderedNumbersSql()
Get sql statemnet used in function getNextIdentification to retrieve ordered list of identifications

Overrides:
getSelectNextInternalNumberOrderedNumbersSql in class IdentificationDatabaseSchema
Returns:
String with sql statement


Copyright © 2003 - 2006 OpenSubsystems s.r.o.