BEA Systems, Inc.

com.beasys.commerce.axiom.document.fast
Class SPIFastDocumentManagerImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.SessionImpl
        |
        +--com.beasys.commerce.axiom.content.ContentManagerImpl
              |
              +--com.beasys.commerce.axiom.document.DocumentManagerImpl
                    |
                    +--com.beasys.commerce.axiom.document.fast.SPIFastDocumentManagerImpl

public class SPIFastDocumentManagerImpl
extends DocumentManagerImpl

An implementation of DocumentManager that doesn't delagate to the Entity Document EJBs but instead uses the DocMgmt SPI.

In its EJB environment, the case of property names for Document objects coming from this is controlled by the "PropertyCase" environment variable. If this is "lower", all property names will be lower case; if this is "upper", all property names will be upper case; if this is anything else or not set, property names will be untouched.

This uses the DataSourceHelper to gain access to get connections to the document JDBC connection.

Since:
2.0.1 sp1
See Also:
Serialized Form

Field Summary
protected  int propertyCase
          The property case for Content object we create.
 
Fields inherited from class com.beasys.commerce.axiom.content.ContentManagerImpl
contentHome, schemaHome
 
Fields inherited from class com.beasys.commerce.foundation.SessionImpl
_ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty
 
Constructor Summary
SPIFastDocumentManagerImpl()
          Constructor.
 
Method Summary
 void close(java.sql.Connection con)
          Helper method to close a connection, ignoring any exceptions.
static void close(DocumentIterator iterator)
          Close a document iterator, ignoring any exceptions.
static void close(java.io.InputStream in)
          Close an InputStream, ignoring any exceptions.
static void close(java.sql.Statement stmt)
           
 void ejbCreate()
          Override to initialize the Property Case from the EJB environment as well.
protected  java.sql.Connection getConnection()
          Get a connection to the docPool.
 java.util.Enumeration getContent(Search params)
          Override to assume readOnly access.
 java.util.Enumeration getContent(Search params, boolean readOnly)
          Override to obey the readOnly flag.
 byte[] getContentBlock(DocumentPk key, long start, long length)
          Get the block of bytes for the specified document.
static void setProperty(FastContentImpl c, java.lang.String name, java.lang.Object val)
          Set a property on a FastContentImpl object.
 
Methods inherited from class com.beasys.commerce.axiom.document.DocumentManagerImpl
getDefaultContentHomeName, getDefaultContentSchemaHomeName
 
Methods inherited from class com.beasys.commerce.axiom.content.ContentManagerImpl
ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove, getAllSchemas, getContentHome, getJNDIContext, getSchema, getSchemaHome, lookupHome, setSessionContext, verifyHome
 
Methods inherited from class com.beasys.commerce.foundation.SessionImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, getEnvironmentNamingContext, getEnvironmentProperty, getEnvironmentProperty, getEnvironmentPropertyCache, getPersistenceHelperPlugin, getSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyCase

protected int propertyCase
The property case for Content object we create.
See Also:
FastContentImpl.PROPERTY_CASE_LOWER, FastContentImpl.PROPERTY_CASE_UPPER, FastContentImpl.PROPERTY_CASE_NONE
Constructor Detail

SPIFastDocumentManagerImpl

public SPIFastDocumentManagerImpl()
                           throws javax.ejb.CreateException
Constructor.
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Override to initialize the Property Case from the EJB environment as well.
Overrides:
ejbCreate in class ContentManagerImpl
Tags copied from class: ContentManagerImpl
Throws:
javax.ejb.EJBException - thrown on an error.
javax.ejb.CreateException - thrown on an error.

getConnection

protected java.sql.Connection getConnection()
                                     throws java.sql.SQLException
Get a connection to the docPool.
See Also:
DataSourceHelper.getConnection(com.beasys.commerce.foundation.SessionImpl)

getContent

public java.util.Enumeration getContent(Search params)
                                 throws java.rmi.RemoteException
Override to assume readOnly access.
Overrides:
getContent in class ContentManagerImpl
Tags copied from class: ContentManagerImpl
Throws:
java.rmi.RemoteException - thrown on an error.
See Also:
ContentManagerImpl.getContentHome()

getContent

public java.util.Enumeration getContent(Search params,
                                        boolean readOnly)
                                 throws java.rmi.RemoteException
Override to obey the readOnly flag.
Overrides:
getContent in class ContentManagerImpl
Tags copied from class: ContentManagerImpl
Throws:
java.rmi.RemoteException - thrown on an error.

getContentBlock

public byte[] getContentBlock(DocumentPk key,
                              long start,
                              long length)
                       throws java.rmi.RemoteException
Get the block of bytes for the specified document.
Overrides:
getContentBlock in class DocumentManagerImpl
Parameters:
key - the document primary key.
start - the starting index.
length - the number of bytes to return (less than 0 for all).

setProperty

public static void setProperty(FastContentImpl c,
                               java.lang.String name,
                               java.lang.Object val)
Set a property on a FastContentImpl object.

close

public static final void close(java.io.InputStream in)
Close an InputStream, ignoring any exceptions.

close

public static final void close(DocumentIterator iterator)
Close a document iterator, ignoring any exceptions.

close

public static void close(java.sql.Statement stmt)

close

public final void close(java.sql.Connection con)
Helper method to close a connection, ignoring any exceptions.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved