<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Experience with persistence classes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969983#M69452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, Stefan Gerschler  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I'm glad to tell you, that your superclass idea can help us to achieve the target you want.&lt;/P&gt;&lt;P&gt;I try is as following:&lt;/P&gt;&lt;P&gt;1. uncheck the 'Final' flag in the old class attribute. if not, the class can't be inherited.&lt;/P&gt;&lt;P&gt;2. create a class, with inherit from old class. Then the old method can be kept with no change.&lt;/P&gt;&lt;P&gt;3. change the defination of our table, E.G. add a new field. You can see as the SET/GET method inherit from superclass, when add new SET/GET in the subclass, the code in superclass won't be changed.&lt;/P&gt;&lt;P&gt;4. As the new class is defined as Persistent Class too, you should delete the IF_OS_STATE interface of itself, just left the inherited one. (an interface can't be implemented repeatly).&lt;/P&gt;&lt;P&gt;5. Now you can call the method of subclass and superclass.&lt;/P&gt;&lt;P&gt;As the inherit relation, the superclass method will be called smoothly. Your target achieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi, your idea is critical for solve this problem.&lt;/P&gt;&lt;P&gt;Thank a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will be helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: zhenglin gu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Aug 2005 09:52:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-15T09:52:19Z</dc:date>
    <item>
      <title>Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969973#M69442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we consider to use the Object Service for the developing.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Has anybody positive or negative experience with the Persistence Class?&lt;/P&gt;&lt;P&gt;- What's about bull processing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have make same tests with the persistence class:&lt;/P&gt;&lt;P&gt;- create a persistence class for a DB-table&lt;/P&gt;&lt;P&gt;- modify a generated SET-method with a validity check&lt;/P&gt;&lt;P&gt;- add a new field to the DB-table&lt;/P&gt;&lt;P&gt;- modify the persistence class by adding this field&lt;/P&gt;&lt;P&gt;-&amp;gt; the modify SET-method for the other field is overwritten&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i add own validly checks in the SET methods?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Stefan Gerschler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2005 07:35:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969973#M69442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-12T07:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969974#M69443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, you can enter into change mode and change the SET method which generated by system.&lt;/P&gt;&lt;P&gt;Where is your problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2005 07:57:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969974#M69443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-12T07:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969975#M69444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhenglin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I can change it. But when I expand my DB-table by adding a new field, I have also to enter this field in persistence class.&lt;/P&gt;&lt;P&gt;Unfortunately all SET- and GET- methods seems to be overwritten by the new generated code.&lt;/P&gt;&lt;P&gt;So I will losing the changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2005 08:05:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969975#M69444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-12T08:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969976#M69445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, as I know, the change on the Persistent table will impact on the class. So if the table changed, the class need to be regenerate definitely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the code lost is the point your concern, I think you can copy the class to a new one.&lt;/P&gt;&lt;P&gt;And change the table, regenerate the Persistence Class, and copy back the code of method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2005 08:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969976#M69445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-12T08:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969977#M69446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this weblog: /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Subramanian V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2005 09:24:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969977#M69446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-12T09:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969978#M69447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Subramanian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for this very interesting Weblog .&lt;/P&gt;&lt;P&gt;But I still don't understand if it is OK to change the generated SET-/GET Methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Aug 2005 17:37:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969978#M69447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-13T17:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969979#M69448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, It looks impossible to change associated TABLE/STRUCTURE of the Persistence Class. But if change the defination of the TABLE/STRUCTURE, can the change reflect into the Persistent Class? As some authority problem, I can't do a test on my server, maybe need to negotiate with my administrator. &lt;/P&gt;&lt;P&gt;When get the authority, I will have a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, what's the problem you are bored in?&lt;/P&gt;&lt;P&gt;Concern that if change the defination of TABLE, your code in the SET/GET method will lost?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Aug 2005 03:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969979#M69448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-14T03:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969980#M69449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot for your efforts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exactly your last sentence is my fear.&lt;/P&gt;&lt;P&gt;We are in an early stadium of modeling, but we will already realize some classes in the SE24.&lt;/P&gt;&lt;P&gt;When i code a validly-check in a generated SET-method for an existing attribute and the modeler expand the class with a new attribute, I have put this attribute in the table/structure and make a new generation of the persistent-class ... and will lose my code for the validly-check &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it by a better idea to use this class as a superclass and overwrite the SET-method in subclass?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure would be the practicable way to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Aug 2005 08:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969980#M69449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-14T08:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969981#M69450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Stefan Gerschler  &lt;/P&gt;&lt;P&gt;I have tried the test. It looks our code will lost after the new fields added on the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think we should copy the Persistent Class before change on the fields. After regenerate the Persistent Class, copy the method code back to the SET.&lt;/P&gt;&lt;P&gt;That's the solution in my opinion.&lt;/P&gt;&lt;P&gt;Hope it will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2005 06:04:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969981#M69450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-15T06:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969982#M69451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhenglin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer and your efforts.&lt;/P&gt;&lt;P&gt;This a workaround, but this is still a source of defect, when a developer forget to do this manually steps.&lt;/P&gt;&lt;P&gt;A missing validity check in the productive system can have bad effects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will close the quote next time, but i still hope that somebody have an official procedure without copying. Is something planned in the next releases?&lt;/P&gt;&lt;P&gt;Is is unusual to make validity checks in a SET-method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2005 08:10:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969982#M69451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-15T08:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Experience with persistence classes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969983#M69452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, Stefan Gerschler  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I'm glad to tell you, that your superclass idea can help us to achieve the target you want.&lt;/P&gt;&lt;P&gt;I try is as following:&lt;/P&gt;&lt;P&gt;1. uncheck the 'Final' flag in the old class attribute. if not, the class can't be inherited.&lt;/P&gt;&lt;P&gt;2. create a class, with inherit from old class. Then the old method can be kept with no change.&lt;/P&gt;&lt;P&gt;3. change the defination of our table, E.G. add a new field. You can see as the SET/GET method inherit from superclass, when add new SET/GET in the subclass, the code in superclass won't be changed.&lt;/P&gt;&lt;P&gt;4. As the new class is defined as Persistent Class too, you should delete the IF_OS_STATE interface of itself, just left the inherited one. (an interface can't be implemented repeatly).&lt;/P&gt;&lt;P&gt;5. Now you can call the method of subclass and superclass.&lt;/P&gt;&lt;P&gt;As the inherit relation, the superclass method will be called smoothly. Your target achieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi, your idea is critical for solve this problem.&lt;/P&gt;&lt;P&gt;Thank a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will be helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: zhenglin gu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2005 09:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/experience-with-persistence-classes/m-p/969983#M69452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-15T09:52:19Z</dc:date>
    </item>
  </channel>
</rss>

