Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » ObjectTransactions version
ObjectTransactions version [message #1518] Mon, 19 May 2008 15: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 10:35 Go to previous message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
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 10:35 Go to previous message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
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: Sun Jun 23 19:02:01 GMT 2024

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

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

Back to the top