Skip to main content



      Home
Home » Archived » Riena » ObjectTransactions version
ObjectTransactions version [message #1518] Mon, 19 May 2008 11:41 Go to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

I've seen that the version attribute of a business object has to be a
String for Riena ObjectTransactions.
I already have a version attribute like
@Version
@Column(name = "CONT_VERSION")
private int version;
and I have no setter, because the version will only be set from the JPA
persistence framework (hibernate in this case).

can I use my JPA version attribute and perhaps only provide a
String getVersion()
to get the version as String ?

or do I need an extra OT version attribute ?

ekke
Re: ObjectTransactions version [message #1605 is a reply to message #1518] Tue, 20 May 2008 06:35 Go to previous message
Eclipse UserFriend
Version is a String so that you can return "1.1" or "a12" as a version. The purpose is to distinguish
different versions of the same object. However that is the returned value. If you already have an int, that
fullfils the same version (the version is modified each time the object is store), you are fine to convert
that int to a String in the getVersion() method.

christian


ekke schrieb:
> I've seen that the version attribute of a business object has to be a
> String for Riena ObjectTransactions.
> I already have a version attribute like
> @Version
> @Column(name = "CONT_VERSION")
> private int version;
> and I have no setter, because the version will only be set from the JPA
> persistence framework (hibernate in this case).
>
> can I use my JPA version attribute and perhaps only provide a
> String getVersion()
> to get the version as String ?
>
> or do I need an extra OT version attribute ?
>
> ekke
>
Re: ObjectTransactions version [message #570636 is a reply to message #1518] Tue, 20 May 2008 06:35 Go to previous message
Eclipse UserFriend
Version is a String so that you can return "1.1" or "a12" as a version. The purpose is to distinguish
different versions of the same object. However that is the returned value. If you already have an int, that
fullfils the same version (the version is modified each time the object is store), you are fine to convert
that int to a String in the getVersion() method.

christian


ekke schrieb:
> I've seen that the version attribute of a business object has to be a
> String for Riena ObjectTransactions.
> I already have a version attribute like
> @Version
> @Column(name = "CONT_VERSION")
> private int version;
> and I have no setter, because the version will only be set from the JPA
> persistence framework (hibernate in this case).
>
> can I use my JPA version attribute and perhaps only provide a
> String getVersion()
> to get the version as String ?
>
> or do I need an extra OT version attribute ?
>
> ekke
>
Previous Topic:IObjectTransaction.addReference()
Next Topic:ITransactedObject
Goto Forum:
  


Current Time: Mon May 05 23:25:21 EDT 2025

Powered by FUDForum. Page generated in 0.03707 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top