Class TestItem

All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
GeneratedTestItem3

public class TestItem extends LocalizableItem
This class represents an item, which will be used by the HJMPTest and some other test classes.
See Also:
  • Constructor Details

    • TestItem

      public TestItem()
  • Method Details

    • createItem

      protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
      Description copied from class: Item
      Has to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) during ComposedType.newInstance(Map).

      In case this method uses any of the attribute values during creation it is required to override Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
      Sn example:

      
       public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
       ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
       man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
       // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
       SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
       super.getNonInitialAttributes( ctx, allAttributes );
       // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
      
       
      Specified by:
      createItem in class Item
      Parameters:
      ctx - the current session context which this item is created within
      type - the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )
      Returns:
      the new item instance
      Throws:
      JaloBusinessException - indicates an error during creation - any changes will be rollbacked
    • getA

      public String getA()
    • getA

      public String getA(SessionContext ctx)
    • setA

      public void setA(String a)
    • setA

      public void setA(SessionContext ctx, String a)
    • getB

      public String getB()
    • getB

      public String getB(SessionContext ctx)
    • setB

      public void setB(String b)
    • setB

      public void setB(SessionContext ctx, String b)
    • getBoolean

      public Boolean getBoolean(SessionContext ctx)
    • setBoolean

      public void setBoolean(SessionContext ctx, Boolean b)
    • getByte

      public Byte getByte(SessionContext ctx)
    • setByte

      public void setByte(SessionContext ctx, Byte b)
    • getCharacter

      public Character getCharacter(SessionContext ctx)
    • setCharacter

      public void setCharacter(SessionContext ctx, Character c)
    • getDate

      public Date getDate(SessionContext ctx)
    • setDate

      public void setDate(SessionContext ctx, Date d)
    • getDouble

      public Double getDouble(SessionContext ctx)
    • setDouble

      public void setDouble(SessionContext ctx, Double d)
    • getFloat

      public Float getFloat(SessionContext ctx)
    • setFloat

      public void setFloat(SessionContext ctx, Float f)
    • getInteger

      public Integer getInteger(SessionContext ctx)
    • setInteger

      public void setInteger(SessionContext ctx, Integer i)
    • getLong

      public Long getLong(SessionContext ctx)
    • setLong

      public void setLong(SessionContext ctx, Long l)
    • getPrimitiveBoolean

      public boolean getPrimitiveBoolean(SessionContext ctx)
    • setPrimitiveBoolean

      public void setPrimitiveBoolean(SessionContext ctx, boolean b)
    • getPrimitiveByte

      public byte getPrimitiveByte(SessionContext ctx)
    • setPrimitiveByte

      public void setPrimitiveByte(SessionContext ctx, byte b)
    • getPrimitiveChar

      public char getPrimitiveChar(SessionContext ctx)
    • setPrimitiveChar

      public void setPrimitiveChar(SessionContext ctx, char c)
    • getPrimitiveDouble

      public double getPrimitiveDouble(SessionContext ctx)
    • setPrimitiveDouble

      public void setPrimitiveDouble(SessionContext ctx, double d)
    • getPrimitiveFloat

      public float getPrimitiveFloat(SessionContext ctx)
    • setPrimitiveFloat

      public void setPrimitiveFloat(SessionContext ctx, float f)
    • getPrimitiveInteger

      public int getPrimitiveInteger(SessionContext ctx)
    • setPrimitiveInteger

      public void setPrimitiveInteger(SessionContext ctx, int i)
    • getPrimitiveLong

      public long getPrimitiveLong(SessionContext ctx)
    • setPrimitiveLong

      public void setPrimitiveLong(SessionContext ctx, long l)
    • getPrimitiveShort

      public short getPrimitiveShort(SessionContext ctx)
    • setPrimitiveShort

      public void setPrimitiveShort(SessionContext ctx, short s)
    • getSerializable

      public Serializable getSerializable(SessionContext ctx)
    • setSerializable

      public void setSerializable(SessionContext ctx, Serializable s)
    • getString

      public String getString(SessionContext ctx)
    • setString

      public void setString(SessionContext ctx, String s)
    • getLongString

      public String getLongString(SessionContext ctx)
    • setLongString

      public void setLongString(SessionContext ctx, String s)
    • getBoolean

      public Boolean getBoolean()
    • setBoolean

      public void setBoolean(Boolean b)
    • getByte

      public Byte getByte()
    • setByte

      public void setByte(Byte b)
    • getCharacter

      public Character getCharacter()
    • setCharacter

      public void setCharacter(Character c)
    • getDate

      public Date getDate()
    • setDate

      public void setDate(Date d)
    • getDouble

      public Double getDouble()
    • setDouble

      public void setDouble(Double d)
    • getFloat

      public Float getFloat()
    • setFloat

      public void setFloat(Float f)
    • getInteger

      public Integer getInteger()
    • setInteger

      public void setInteger(Integer i)
    • getLong

      public Long getLong()
    • setLong

      public void setLong(Long l)
    • getPrimitiveBoolean

      public boolean getPrimitiveBoolean()
    • setPrimitiveBoolean

      public void setPrimitiveBoolean(boolean b)
    • getPrimitiveByte

      public byte getPrimitiveByte()
    • setPrimitiveByte

      public void setPrimitiveByte(byte b)
    • getPrimitiveChar

      public char getPrimitiveChar()
    • setPrimitiveChar

      public void setPrimitiveChar(char c)
    • getPrimitiveDouble

      public double getPrimitiveDouble()
    • setPrimitiveDouble

      public void setPrimitiveDouble(double d)
    • getPrimitiveFloat

      public float getPrimitiveFloat()
    • setPrimitiveFloat

      public void setPrimitiveFloat(float f)
    • getPrimitiveInteger

      public int getPrimitiveInteger()
    • setPrimitiveInteger

      public void setPrimitiveInteger(int i)
    • getPrimitiveLong

      public long getPrimitiveLong()
    • setPrimitiveLong

      public void setPrimitiveLong(long l)
    • getPrimitiveShort

      public short getPrimitiveShort()
    • setPrimitiveShort

      public void setPrimitiveShort(short s)
    • getSerializable

      public Serializable getSerializable()
    • setSerializable

      public void setSerializable(Serializable s)
    • getString

      public String getString()
    • setString

      public void setString(String s)