I added the following to EmbeddedValues.vsl (just copying from EntityEmbeddable.vsl) I have been very optimistic and did not checked if all the feature the template will have will be supported by the EJB3 spec. Thinking about LOB, transient, version, fetch type. What I needed is the enumeration.type and temporal.type.
##
## If attribute is transient ONLY add Transient annotation
##
#* *##if ($attribute.transient)
@javax.persistence.Transient
#* *##else
#* *##if ($attribute.version)
@javax.persistence.Version
#* *##end
#* *##if ($attribute.lob)
##
## Add if LOB type is specified - do not set LOB type as of PFD Spec - inferred from type.
## Also sepcify Fetch type in Basic annotation if set to EAGER since
## default fetch type for LOB annotation is LAZY.
##
@javax.persistence.Lob
#* *##if ($attribute.eager)
@javax.persistence.Basic(fetch = javax.persistence.FetchType.EAGER)
#* *##end
#* *##end
@javax.persistence.Column(name = "${attribute.columnName}"#if ($attribute.unique), unique = ${attribute.unique}#end#if (!$attribute.columnNullable), nullable = ${attribute.columnNullable}#end#**#, insertable = ${attribute.insertEnabled}, updatable = ${attribute.updateEnabled}#if ($attribute.columnLength), length = ${attribute.columnLength}#end#if ($attribute.columnDefinition), columnDefinition = "${attribute.columnDefinition}"#end#if ($attribute.columnPrecision), precision = ${attribute.columnPrecision}#end#if ($attribute.columnScale), scale = ${attribute.columnScale}#end)
#* *##if (!$attribute.lob && $attribute.lazy)
##
## Only add the fetch type property for LAZY hints - default is EAGER
##
@javax.persistence.Basic(fetch = javax.persistence.FetchType.LAZY)
#* *##end
#* *##if ($stringUtils.isNotBlank($attribute.temporalType))
@javax.persistence.Temporal(javax.persistence.TemporalType.${attribute.temporalType})
#* *##end
#* *##if ($stringUtils.isNotBlank($attribute.enumerationType))
@javax.persistence.Enumerated(javax.persistence.EnumType.${attribute.enumerationType})
#* *##end
#* *##end
##
## Override attribute type if attribute is a LOB and lob type is specified
##
I forgot to mention, in the file i uploaded be aware that I also changed the constructor to public and removed the abstrac as a workaround for #
EJB-29.