Package org.openxava.calculators
Class IdentityCalculator
java.lang.Object
org.openxava.calculators.IdentityCalculator
- All Implemented Interfaces:
Serializable,ICalculator,IHibernateIdGeneratorCalculator
To use identity database id generation.
An example of use:
<property name="id" key="true" type="int" hidden="true">
<default-value-calculator class="org.openxava.calculators.IdentityCalculator" on-create="true"/>
</property>
It does not work with EJB2. It works with Hibernate and EJB3 JPA.- Author:
- Javier Paniza
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the xml code to insert inside 'id' element in .hbml file.
-
Constructor Details
-
IdentityCalculator
public IdentityCalculator()
-
-
Method Details
-
hbmGeneratorCode
Description copied from interface:IHibernateIdGeneratorCalculatorReturns the xml code to insert inside 'id' element in .hbml file.- Specified by:
hbmGeneratorCodein interfaceIHibernateIdGeneratorCalculator
-
calculate
- Specified by:
calculatein interfaceICalculator- Throws:
Exception
-