Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32341

Re: JPA and extra fields

From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.java.programmer
Subject Re: JPA and extra fields
Date 2015-08-17 21:24 +0200
Organization Decebal Computing
Message-ID <87bne5sopd.fsf@Equus.decebal.nl> (permalink)
References (1 earlier) <55cd52c4$0$298$14726298@news.sunsite.dk> <87r3n2sact.fsf@Equus.decebal.nl> <mqsh70$s82$1@dont-email.me> <87io8ert0x.fsf@Equus.decebal.nl> <mqt7uh$ga1$1@dont-email.me>

Show all headers | View raw


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

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-13 20:12 +0200
  Re: JPA and extra fields Eternal Hope <laughingspam99@gmail.com> - 2015-08-13 20:29 +0100
    Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-17 07:40 +0200
  Re: JPA and extra fields Arne Vajhøj <arne@vajhoej.dk> - 2015-08-13 22:30 -0400
    Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-17 08:22 +0200
      Re: JPA and extra fields Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-17 11:40 +0000
        Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-17 14:36 +0200
          Re: JPA and extra fields Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-17 18:08 +0000
            Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-17 21:24 +0200
              Re: JPA and extra fields Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-17 22:47 +0000
                Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-19 11:32 +0200
          Re: JPA and extra fields Arne Vajhøj <arne@vajhoej.dk> - 2015-08-17 19:48 -0400
        Re: JPA and extra fields Eternal Hope <laughingspam99@gmail.com> - 2015-08-18 06:25 +0100
          Re: JPA and extra fields Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-18 10:49 +0000
            Re: JPA and extra fields Eternal Hope <laughingspam99@gmail.com> - 2015-08-19 09:00 +0100
              Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-19 11:36 +0200
                Re: JPA and extra fields Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-19 10:48 +0000
      Re: JPA and extra fields Arne Vajhøj <arne@vajhoej.dk> - 2015-08-17 19:46 -0400
        Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-19 11:28 +0200
    Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-19 11:53 +0200
      Re: JPA and extra fields Martin Gregorie <martin@address-in-sig.invalid> - 2015-08-19 10:51 +0000
        Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-19 13:14 +0200
          Re: JPA and extra fields Cecil Westerhof <Cecil@decebal.nl> - 2015-08-19 14:19 +0200
      Re: JPA and extra fields Arne Vajhøj <arne@vajhoej.dk> - 2015-08-19 19:13 -0400
  Re: JPA and extra fields Silvio <silvio@internet.com> - 2015-08-20 03:49 +0200

csiph-web