FileDocCategorySizeDatePackage
Counter.javaAPI DocJBoss 4.2.11539Fri Jul 13 20:56:00 BST 2007xpetstore.util.uidgen.ejb

Counter

public class Counter extends Object
ejb.bean name="Counter" type="CMP" view-type="local" primkey-field="name" schema="Counter" cmp-version="${ejb.cmp.version}"
ejb.transaction type="Required"
ejb.persistence table-name="T_COUNTER"
jboss.persistence create-table="${jboss.create.table}" remove-table="${jboss.remove.table}"

Fields Summary
private String
name
private int
value
Constructors Summary
public Counter(String name)

      setName(name);
      setValue(0);
   
Methods Summary
public voidejbLoad()

   
public voidejbRemove()


   
public voidejbStore()

   
protected java.lang.StringgetName()

      return name;
   
protected intgetValue()

      return value;
   
public intnextValue()

ejb.interface-method

      int value = getValue() + 1;
      setValue(value);

      return value;
   
protected voidsetName(java.lang.String name)

      this.name = name;
   
protected voidsetValue(int value)

      this.value = value;