Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: JPA and extra fields Date: Mon, 17 Aug 2015 21:24:30 +0200 Organization: Decebal Computing Lines: 55 Message-ID: <87bne5sopd.fsf@Equus.decebal.nl> References: <87zj1v3vnq.fsf@Equus.decebal.nl> <55cd52c4$0$298$14726298@news.sunsite.dk> <87r3n2sact.fsf@Equus.decebal.nl> <87io8ert0x.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="18546"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NtpnOb6rvQ9rmhoZdXWNvC0xP7pyS0tE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:XG4cP+mQoq67PVgOPGNvv2uCggc= sha1:4aUBsilSpAj0wq2MKRcmzkdg7po= Xref: csiph.com comp.lang.java.programmer:32341 On Monday 17 Aug 2015 20:08 CEST, Martin Gregorie wrote: > On Mon, 17 Aug 2015 14:36:30 +0200, Cecil Westerhof wrote: > >> Another part of the problem that there is also Cobol code which >> maintains another part of the functionalities. So my hands are a >> bit tied. >> > Understood - see below for an obvious link to COBOL. > >> For example booleans are done with char of one long. I think I >> write an annotation for those. >> > That sounds like COBOL all right, which doesn't have a simple way of > defining booleans. The best you can do is set up a single character > variable (which can be character, numeric or alphabetic) and define > a set of level 88 values against it, something like this: > > 01 ERROR-CONTROL. > 05 ERROR-DESCRIPTION PIC X(50). > 05 ERROR-INDICATOR PIC X. > 88 ERROR_FOUND VALUE "Y". > > which you could use like this: > > * > * Clear both the error description and the error-indicator > * > MOVE SPACE TO ERROR-CONTROL. > ... > IF FIRST-NAME = SPACE > MOVE "Y" TO ERROR-INDICATOR > MOVE "Missing first name" to ERROR-DESCRIPTION. > ... > ... > IF ERROR-FOUND PERFORM REPORT-ERROR-TO-USER. > > If the system uses a COBOL copy library to define records and other > variables and/or commonly used procedure division sentences or > paragraphs, it would be worth looking there for constant > definitions. > > The only method of linking 88 levels to a data item is to write them > immediately after the data item that they test. Luckily I only have to take care of the Java code. ;-) By the way, through setter and getter functions I can work with a boolean in Java. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof