org.jcoderz.commons.config
Class ConfigEntityHelper

java.lang.Object
  extended by org.jcoderz.commons.config.ConfigEntityHelper

public final class ConfigEntityHelper
extends Object

Static access methods for the ConfigEntity Entity Bean. With this helper Configuration Entries (ConfigEntity) can be found by there primary key, or all entries will be selected. For performance issues the ConfigEntities are available as common Entity Beans that are readable and writable, and as ReadOnly EntityBeans (ConfigReaderEntity) which are only readable and will be automatically by the application server. Therefore the different finders are provided for both types. The ReadOnly Pattern is generated by ant target 'add-readonly-entities' and its generator task 'make-readonly-beans'.


Method Summary
static Collection findAll()
          Returns all participants data.
static Collection findAll(boolean readOnly)
          Returns all participants data.
static Collection findAllReadOnly()
          Returns all participants data as Read Only instances.
static ConfigEntity findByPrimaryKey(String id)
          Finds a ConfigEntity by String (primary key).
static ConfigEntity findReadOnlyByPrimaryKey(String id)
          Finds a ConfigEntity as ReadOnly by String (primary key).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findByPrimaryKey

public static ConfigEntity findByPrimaryKey(String id)
                                     throws EntityNotFoundException,
                                            InternalErrorException
Finds a ConfigEntity by String (primary key).

Parameters:
id - the configuration key id.
Returns:
the ConfigEntity denoted by the given PK.
Throws:
EntityNotFoundException - if no entity can be found by the given primary key
InternalErrorException - if a Remote, Finder or Naming exception occurs

findReadOnlyByPrimaryKey

public static ConfigEntity findReadOnlyByPrimaryKey(String id)
                                             throws EntityNotFoundException,
                                                    InternalErrorException
Finds a ConfigEntity as ReadOnly by String (primary key). Remark that this instance is only a ReadOnly entity bean!

Parameters:
id - the configuration key id.
Returns:
the ConfigEntity denoted by the given PK.
Throws:
EntityNotFoundException - if no entity can be found by the given primary key
InternalErrorException - if a Remote, Finder or Naming exception occurs

findAll

public static Collection findAll()
                          throws InternalErrorException
Returns all participants data.

Returns:
a collection with all all participants data.
Throws:
InternalErrorException - if a Remote, Finder or Naming exception occurs

findAllReadOnly

public static Collection findAllReadOnly()
                                  throws InternalErrorException
Returns all participants data as Read Only instances. Remark that retrieved instances are ReadOnly!

Returns:
a collection with all all participants data.
Throws:
InternalErrorException - if a Remote, Finder or Naming exception occurs

findAll

public static Collection findAll(boolean readOnly)
                          throws InternalErrorException
Returns all participants data.

Parameters:
readOnly - true, if Entity Beans should be ReadOnly. False for read-write instances.
Returns:
a collection with all all participants data.
Throws:
InternalErrorException - if a Remote, Finder or Naming exception occurs


Copyright 2007 The jCoderZ Project.