IT.CappuccinoNet  
StrutsCX v0.8.1
   

com.cappuccinonet.strutscx.prototype.integration
Class InfoEJBDAO

java.lang.Object
  |
  +--com.cappuccinonet.strutscx.prototype.integration.InfoEJBDAO
All Implemented Interfaces:
InfoDAO

public class InfoEJBDAO
extends java.lang.Object
implements InfoDAO

NOT YET IMPLEMENTED! This is a Data Access Object DAO to access a datasource with Enterprise JavaBeans. The Constructor still takes the XMLProperties file we sent him from the client. Here a JNDI lookup would be better!

Version:
v0.2, 2002.10.15
Author:
Bernhard Woehrlin, IT.CappuccinoNet.com

Field Summary
private  java.lang.String languages
           
private static Logger logger
          The Logger we use to log JDK 1.4 conform.
private  java.lang.String THIS_CLASS
          A String with this Classname used for system messages
 
Constructor Summary
InfoEJBDAO(java.lang.String languages)
          Constructor for InfoDAOBean which takes the XMLProperties Object which contains the flags for the used languages.
 
Method Summary
 InfoIntegrationVO createValueObject()
          This method creates a new ValueObject.
 void delete(InfoIntegrationVO integrationVO)
          Method delete.
private  InfoIntegrationVO fillValueObject(Entry entry)
          Method fillValueObject.
 java.util.Collection findByLocale(java.util.Locale locale)
          This methods returns a HashMap with partly filled ValueObjects.
 InfoIntegrationVO findByPrimaryKey(int primaryKey, java.util.Locale locale)
          Method findByPrimaryKey.
 void insert(InfoIntegrationVO integrationVO)
          Method insert.
 void update(InfoIntegrationVO integrationVO)
          Method update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THIS_CLASS

private java.lang.String THIS_CLASS
A String with this Classname used for system messages


logger

private static Logger logger
The Logger we use to log JDK 1.4 conform.


languages

private java.lang.String languages
Constructor Detail

InfoEJBDAO

public InfoEJBDAO(java.lang.String languages)
Constructor for InfoDAOBean which takes the XMLProperties Object which contains the flags for the used languages.

Method Detail

findByPrimaryKey

public InfoIntegrationVO findByPrimaryKey(int primaryKey,
                                          java.util.Locale locale)
                                   throws StrutsCXDataException
Description copied from interface: InfoDAO
Method findByPrimaryKey. This finds the entry with the given primary key and locale.

Specified by:
findByPrimaryKey in interface InfoDAO
Parameters:
primaryKey -
locale -
Returns:
InfoIntegrationVO
StrutsCXDataException
See Also:
com.cappuccinonet.strutscx.domain.StrutsCXDAO#findByPrimaryKey(Object)

findByLocale

public java.util.Collection findByLocale(java.util.Locale locale)
                                  throws StrutsCXDataException
This methods returns a HashMap with partly filled ValueObjects. Each ValueObjects contains a title, the entryId, the locale, the flags for hide, new and archive. The HashMap key is the Entry EJBs PrimaryKey: A String out of the Integer entryId and the locale.

Specified by:
findByLocale in interface InfoDAO
Parameters:
locale -
Returns:
Collection
StrutsCXDataException
See Also:
com.cappuccinonet.strutscx.persist.StrutsCXDAO#findByLocale(String)

insert

public void insert(InfoIntegrationVO integrationVO)
            throws StrutsCXDataException
Description copied from interface: InfoDAO
Method insert. This inserts the given Value Object into the data source.

Specified by:
insert in interface InfoDAO
Parameters:
integrationVO -
StrutsCXDataException
See Also:
com.cappuccinonet.strutscx.domain.StrutsCXDAO#insert(StrutsCXDTO)

update

public void update(InfoIntegrationVO integrationVO)
            throws StrutsCXDataException
Description copied from interface: InfoDAO
Method update. This updates the data source with the values of the given Value Object.

Specified by:
update in interface InfoDAO
Parameters:
integrationVO -
StrutsCXDataException
See Also:
com.cappuccinonet.strutscx.domain.StrutsCXDAO#update(StrutsCXDTO)

delete

public void delete(InfoIntegrationVO integrationVO)
            throws StrutsCXDataException
Description copied from interface: InfoDAO
Method delete. This deletes an entry in a data source.

Specified by:
delete in interface InfoDAO
Parameters:
integrationVO -
StrutsCXDataException
See Also:
com.cappuccinonet.strutscx.domain.StrutsCXDAO#delete(StrutsCXDTO)

createValueObject

public InfoIntegrationVO createValueObject()
                                    throws StrutsCXDataException
This method creates a new ValueObject. Therefore it gets a new ID. The ValueObjcet then gets filled with default values.

The following feature is not implemented yet:
Note: The datasource gets updated in the insert() method! This way we do not waist much ressources to connect to the database right now.

Specified by:
createValueObject in interface InfoDAO
Returns:
StrutsCXValueObject
Throws:
DataException
StrutsCXDataException
See Also:
com.cappuccinonet.strutscx.domain.StrutsCXDAO#createStrutsCXDTO()

fillValueObject

private InfoIntegrationVO fillValueObject(Entry entry)
Method fillValueObject.

Parameters:
entry -
Returns:
PersistInfoVO

IT.CappuccinoNet  
StrutsCX v0.8.1
   

© 2002, IT.CappuccinoNet.com - compiled 20021015:2052