com.opensymphony.module.propertyset.ejb.types
Class StringEntityEJB

java.lang.Object
  |
  +--com.opensymphony.module.propertyset.ejb.types.StringEntityEJB
All Implemented Interfaces:
javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable
Direct Known Subclasses:
PropertyStringCMP

public abstract class StringEntityEJB
extends java.lang.Object
implements javax.ejb.EntityBean

AbstractValueEntityEJB concrete implementation optimized for storing short Strings. This can be used to store STRING.

Version:
$Revision: 1.9 $
Author:
Joe Walnes
See Also:
com.opensymphony.module.propertyset.ejb.AbstractValueEntityEJB, com.opensymphony.module.propertyset.ejb.ValueEntity, PropertyStoreEJB, Serialized Form

Constructor Summary
StringEntityEJB()
           
 
Method Summary
protected  int[] allowedTypes()
          Returns { PropertySet.STRING }
 void ejbActivate()
           
 java.lang.Long ejbCreate(int type, long id)
           
 void ejbLoad()
           
 void ejbPassivate()
           
 void ejbPostCreate(int type, long id)
           
 void ejbRemove()
           
 void ejbStore()
           
abstract  java.lang.Long getId()
           
abstract  java.lang.String getString()
           
 java.lang.String getValue(int type)
          Return String based value.
 void setEntityContext(javax.ejb.EntityContext context)
           
abstract  void setId(java.lang.Long id)
           
abstract  void setString(java.lang.String string)
           
 void setValue(int type, java.lang.String value)
          Set the value.
 void unsetEntityContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringEntityEJB

public StringEntityEJB()
Method Detail

getId

public abstract java.lang.Long getId()

setId

public abstract void setId(java.lang.Long id)

getString

public abstract java.lang.String getString()

setString

public abstract void setString(java.lang.String string)

getValue

public java.lang.String getValue(int type)
Return String based value.

setValue

public void setValue(int type,
                     java.lang.String value)
Set the value. Only java.lang.String can be supplied.

allowedTypes

protected int[] allowedTypes()
Returns { PropertySet.STRING }
See Also:
com.opensymphony.module.propertyset.ejb.AbstractValueEntityEJB#allowedTypes()

ejbCreate

public java.lang.Long ejbCreate(int type,
                                long id)
                         throws javax.ejb.CreateException

ejbPostCreate

public void ejbPostCreate(int type,
                          long id)
                   throws javax.ejb.CreateException

setEntityContext

public void setEntityContext(javax.ejb.EntityContext context)
Specified by:
setEntityContext in interface javax.ejb.EntityBean

unsetEntityContext

public void unsetEntityContext()
Specified by:
unsetEntityContext in interface javax.ejb.EntityBean

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException
Specified by:
ejbRemove in interface javax.ejb.EntityBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.EntityBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.EntityBean

ejbLoad

public void ejbLoad()
Specified by:
ejbLoad in interface javax.ejb.EntityBean

ejbStore

public void ejbStore()
Specified by:
ejbStore in interface javax.ejb.EntityBean

See www.opensymphony.com for more information.