biz.hammurapi.web.properties
Class PropertySetFactory

java.lang.Object
  extended bybiz.hammurapi.web.properties.PropertySetFactory
All Implemented Interfaces:
biz.hammurapi.config.Component, biz.hammurapi.sql.DataAccessObject

public class PropertySetFactory
extends java.lang.Object
implements biz.hammurapi.sql.DataAccessObject, biz.hammurapi.config.Component

Root class for managing property sets

Author:
Pavel

Constructor Summary
PropertySetFactory()
           
 
Method Summary
 PropertySet create(boolean isTransient)
          Creates property set
 PersistentPropertySet find(int id)
          Finds property set by id.
 java.util.Collection find(java.lang.String ownerType, java.lang.String ownerId)
          Finds all property sets for a given owner.
 PersistentPropertySet find(java.lang.String ownerType, java.lang.String ownerId, java.lang.String setName, boolean create)
          Finds property set by owner and name
 void setIdentityManager(biz.hammurapi.sql.IdentityManager identityManager)
           
 void setOwner(java.lang.Object owner)
           
 void setSQLProcessor(biz.hammurapi.sql.SQLProcessor processor)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySetFactory

public PropertySetFactory()
Method Detail

setSQLProcessor

public void setSQLProcessor(biz.hammurapi.sql.SQLProcessor processor)
                     throws java.sql.SQLException
Specified by:
setSQLProcessor in interface biz.hammurapi.sql.DataAccessObject
Throws:
java.sql.SQLException

create

public PropertySet create(boolean isTransient)
Creates property set

Parameters:
isTransient - If this paramter is true then property set returned is not backed by the database.
Returns:
New empty property set

find

public PersistentPropertySet find(int id)
                           throws java.sql.SQLException
Finds property set by id.

Parameters:
id -
Returns:
Throws:
java.sql.SQLException

find

public PersistentPropertySet find(java.lang.String ownerType,
                                  java.lang.String ownerId,
                                  java.lang.String setName,
                                  boolean create)
                           throws java.sql.SQLException
Finds property set by owner and name

Parameters:
ownerType -
ownerId -
setName -
create - If this parameter is true then this method creates property set if one doesn't already exist
Returns:
Throws:
java.sql.SQLException

find

public java.util.Collection find(java.lang.String ownerType,
                                 java.lang.String ownerId)
Finds all property sets for a given owner.

Parameters:
ownerType -
ownerId -
Returns:

setOwner

public void setOwner(java.lang.Object owner)
Specified by:
setOwner in interface biz.hammurapi.config.Component

start

public void start()
           throws biz.hammurapi.config.ConfigurationException
Specified by:
start in interface biz.hammurapi.config.Component
Throws:
biz.hammurapi.config.ConfigurationException

stop

public void stop()
          throws biz.hammurapi.config.ConfigurationException
Specified by:
stop in interface biz.hammurapi.config.Component
Throws:
biz.hammurapi.config.ConfigurationException

setIdentityManager

public void setIdentityManager(biz.hammurapi.sql.IdentityManager identityManager)


Copyright © 2006 Hammurapi Group. All Rights Reserved.