© 2001 BEA Systems, Inc.

com.beasys.commerce.foundation.property
Class SchemaSmartBMP

java.lang.Object
  |
  +--com.beasys.commerce.foundation.property.SchemaSmartBMP
All Implemented Interfaces:
SmartBMP

public class SchemaSmartBMP
extends java.lang.Object
implements SmartBMP

Implementation of SmartBMP interface for bean Schema. This class is responsible for persisting a Schema (Property Set) and it's associated property definitions.


Constructor Summary
SchemaSmartBMP()
           
 
Method Summary
 void create(SmartKey smartKey, EntityImpl entityImpl)
          Implements BMP functionality of ejbCreate() method.
 boolean exists(SmartKey smartKey, EntityImpl entityImpl)
          Indicates if a bean with the specified primary key exists in the persistent store.
 java.util.Enumeration findAll(EntityImpl entityImpl)
          Finds all the Schema beans in the persistent store.
 java.util.Enumeration findBySchemaGroupName(java.lang.String schemaGroupName, EntityImpl entityImpl)
          Finds the Schema beans that belong to the specified schemaGroupName from the persistent store.
 void refresh(SmartKey smartKey, EntityImpl entityImpl)
          Implements BMP functionality of ejbLoad() method.
 void remove(SmartKey smartKey, EntityImpl entityImpl)
          Implements BMP functionality of ejbRemove() method.
 void update(SmartKey smartKey, EntityImpl entityImpl)
          Implements BMP functionality of ejbStore() and ejbPostCreate() methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaSmartBMP

public SchemaSmartBMP()
Method Detail

findAll

public final java.util.Enumeration findAll(EntityImpl entityImpl)
                                    throws BMPException
Finds all the Schema beans in the persistent store.
Specified by:
findAll in interface SmartBMP
Parameters:
entityImpl - the instance of EntityImpl supplying the database connection
Returns:
an Enumeration of Schema
Throws:
BMPException - raised if the bean's record is not found or an SQL error occured.

findBySchemaGroupName

public final java.util.Enumeration findBySchemaGroupName(java.lang.String schemaGroupName,
                                                         EntityImpl entityImpl)
                                                  throws BMPException
Finds the Schema beans that belong to the specified schemaGroupName from the persistent store.
Parameters:
schemaGroupName - the SchemaGroupName
entityImpl - the EntityImpl instance supplying the database connection
Returns:
an Enumeration of Schema
Throws:
BMPException - raised if the bean's record is not found or an SQL error occured.

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,
                   EntityImpl entityImpl)
            throws BMPException
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
Parameters:
smartKey - the primary key of the bean
entityImpl - instance of the entity bean.
Throws:
BMPException - wrapper for provider exception

exists

public boolean exists(SmartKey smartKey,
                      EntityImpl entityImpl)
               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
entityImpl - READ ONLY instance of the entity bean.
Returns:
true if a bean with the specified primary key exists
Throws:
BMPException - wrapper for provider exception

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved