BEA Systems, Inc.

com.beasys.commerce.axiom.document
Class SPISchemaSmartBMP

java.lang.Object
  |
  +--com.beasys.commerce.axiom.document.SPISchemaSmartBMP

public class SPISchemaSmartBMP
extends java.lang.Object
implements SmartBMP

A SmartBMP for a SchemeImpl which can pull the information from the DocMgmt Component's SPI JDBC driver.


Field Summary
static java.util.Map defaultPropertyMetaData
          The map of attribute name to PropertyMetaData for the explicit document objects.
 
Constructor Summary
SPISchemaSmartBMP()
           
 
Method Summary
 void close(java.sql.Connection con)
          Helper method to close a connection, ignoring any exceptions.
static void close(com.beasys.commerce.axiom.document.spi.DocumentIterator iterator)
          Close a document iterator, ignoring any exceptions.
static void close(java.sql.Statement stmt)
          Helper method to close a statement, ignoring any sql exceptions.
 void create(SmartKey smartKey, EntityImpl entityImpl)
          Implements BMP functionality of ejbCreate() method.
static PropertyMetaData createExplicitPropertyMetaData(java.lang.String desc, int type)
          Create a PropertyMetaData for an explicit non-multi-valued attribute.
 boolean exists(SmartKey smartKey)
          Indicates if a bean with the specified primary key exists in the persistent store.
 java.util.Enumeration findAll()
          Implements BMP functionality of ejbFindAll() method.
 java.util.Enumeration findBySchemaGroupName(java.lang.String groupName)
          Find all the schema by a schema group name.
 void refresh(SmartKey smartKey, EntityImpl entityImpl)
          Implements BMP functionality of ejbLoad() method.
 void remove(SmartKey smartKey)
          Implements BMP functionality of ejbRemove() method.
 void remove(SmartKey key, EntityImpl impl)
          Implements BMP functionality of ejbRemove() method.
 void setJNDIContext(javax.naming.Context ctx)
          Inform provider of ejb JNDI Context for environment.
 void update(SmartKey smartKey, EntityImpl entityImpl)
          Implements BMP functionality of ejbStore() and ejbPostCreate() methods.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultPropertyMetaData

public static final java.util.Map defaultPropertyMetaData
The map of attribute name to PropertyMetaData for the explicit document objects.

This map can be used to populate Schema objects with the explicit property information for a Document.

Constructor Detail

SPISchemaSmartBMP

public SPISchemaSmartBMP()
Method Detail

createExplicitPropertyMetaData

public static PropertyMetaData createExplicitPropertyMetaData(java.lang.String desc,
                                                              int type)
Create a PropertyMetaData for an explicit non-multi-valued attribute.
Parameters:
desc - the description.
type - the TypesHelper type of the attribute.

setJNDIContext

public void setJNDIContext(javax.naming.Context ctx)
                    throws BMPException
Inform provider of ejb JNDI Context for environment. The implementation of this interface has have a public, default no-args constructor. The provider relies on properties in the bean's deployment descriptor as documented in a provider or Theory Center specified protocol.
Specified by:
setJNDIContext in interface SmartBMP
Parameters:
ctx - the bean's ejb Context.

create

public void create(SmartKey smartKey,
                   EntityImpl entityImpl)
            throws BMPException
Implements BMP functionality of ejbCreate() method. Initialize the representation of the entity bean in persistent store using the smartKey as primary key. Attributes of the entity bean in persistent store should be set to the implementation's equivalent of default or null values. The entity is invalid at this point. The metadata may be useful to the implementation.
Specified by:
create in interface SmartBMP
Parameters:
smartKey - the primary key of the bean
entityImpl - READ ONLY, invalid, uninitialized instance of the entity bean.
Throws:
BMPException - wrapper for provider exception

refresh

public void refresh(SmartKey smartKey,
                    EntityImpl entityImpl)
             throws BMPException
Implements BMP functionality of ejbLoad() method. Copies attributes from persistent store to the entity bean using the smartKey as primary key.
Specified by:
refresh in interface SmartBMP
Parameters:
smartKey - the primary key of the bean
entityImpl - READ/WRITE instance of the entity bean.
Throws:
BMPException - wrapper for provider exception

update

public void update(SmartKey smartKey,
                   EntityImpl entityImpl)
            throws BMPException
Implements BMP functionality of ejbStore() and ejbPostCreate() methods. Copies attributes of entity bean to persistent store using the smartKey as primary key.
Specified by:
update in interface SmartBMP
Parameters:
smartKey - the primary key of the bean
entityImpl - READ ONLY instance of the entity bean.
Throws:
BMPException - wrapper for provider exception

remove

public void remove(SmartKey smartKey)
            throws BMPException
Implements BMP functionality of ejbRemove() method. Remove the entity bean from persistent store using the smartKey as primary key.
Parameters:
smartKey - the primary key of the bean
Throws:
BMPException - wrapper for provider exception

remove

public void remove(SmartKey key,
                   EntityImpl impl)
Description copied from interface: SmartBMP
Implements BMP functionality of ejbRemove() method. Remove the entity bean from persistent store using the smartKey as primary key.
Specified by:
remove in interface SmartBMP
Tags copied from interface: SmartBMP
Parameters:
smartKey - the primary key of the bean
Throws:
BMPException - wrapper for provider exception

exists

public boolean exists(SmartKey smartKey)
               throws BMPException
Indicates if a bean with the specified primary key exists in the persistent store.
Specified by:
exists in interface SmartBMP
Parameters:
smartKey - the primary key of the bean
Returns:
true if a bean with the specified primary key exists
Throws:
BMPException - wrapper for provider exception

findAll

public java.util.Enumeration findAll()
                              throws BMPException
Implements BMP functionality of ejbFindAll() method.
Specified by:
findAll in interface SmartBMP
Returns:
an enumeration of all instances of a type of bean.
Throws:
BMPException - wrapper for provider exception

findBySchemaGroupName

public java.util.Enumeration findBySchemaGroupName(java.lang.String groupName)
                                            throws BMPException
Find all the schema by a schema group name.

close

public static final void close(java.sql.Statement stmt)
Helper method to close a statement, ignoring any sql exceptions.

close

public static final void close(com.beasys.commerce.axiom.document.spi.DocumentIterator iterator)
Close a document iterator, ignoring any exceptions.

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