private static void setVersionInformation(XProperty property, PropertyBinder propertyBinder) { propertyBinder.getSimpleValueBinder().setVersion( true ); if(property.isAnnotationPresent( Source.class )) { Source source = property.getAnnotation( Source.class ); propertyBinder.getSimpleValueBinder().setTimestampVersionType( source.value().typeName() ); } }
/** * @author Hardy Ferentschik */ @Entity public class VMTimestamped { @Id @GeneratedValue private int id; @Version @Source private Date lastUpdate; public int getId() { return id; } public void setId(int id) { this.id = id; } public Date getLastUpdate() { return lastUpdate; } public void setLastUpdate(Date lastUpdate) { this.lastUpdate = lastUpdate; } }
private static void setVersionInformation(XProperty property, PropertyBinder propertyBinder) { if ( property.isAnnotationPresent( Source.class ) ) { Source source = property.getAnnotation( Source.class ); propertyBinder.getBasicValueBinder().setTimestampVersionType( source.value().typeName() ); } }
@Source(value = SourceType.DB) private Date version;
private static void setVersionInformation(XProperty property, PropertyBinder propertyBinder) { propertyBinder.getSimpleValueBinder().setVersion( true ); if(property.isAnnotationPresent( Source.class )) { Source source = property.getAnnotation( Source.class ); propertyBinder.getSimpleValueBinder().setTimestampVersionType( source.value().typeName() ); } }
private static void setVersionInformation(XProperty property, PropertyBinder propertyBinder) { propertyBinder.getSimpleValueBinder().setVersion( true ); if(property.isAnnotationPresent( Source.class )) { Source source = property.getAnnotation( Source.class ); propertyBinder.getSimpleValueBinder().setTimestampVersionType( source.value().typeName() ); } }