Re: Parameterizing table name

anthony berglas <[email protected]> Thu, 24 Nov 2011 10:58:40 +1000
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <CA+_PZMdYHGHj64JuhrxAyW6JaNOkLi1bdwedoiD_aMDiSMk1Dg@mail.gmail.com>
--20cf307d060ef6281c04b2708bca
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 24, 2011 at 10:44 AM, John Abraham <[email protected]> wrote:

> **
>
>
>
> On 2011-11-23, at 5:14 PM, anthony berglas wrote:
>
> The "final" is only a matter of style and you could certainly remove it.
>
>
> Thanks.  I wrote a static class initialization routine and call it right
> after reading my properties file.  I have no idea why I thought the "fina=
l"
> was important.
>
> I would suggest you think about the order of the static initializations.
>  What is causing the class to load before the ResourceUtil one?
>
>
> It's that we read the .properties file to determine runtime properties
> (such as table names) from the main() method, not from a static
> initializer.
>

Yes, but the static initializer is only run when you first touch the
SimpleOrm class.


> --
> John Abraham
> [email protected]
>
>=20=20
>



--=20

Dr Anthony Berglas, [email protected]       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that that is the best way to collect firewood.

--20cf307d060ef6281c04b2708bca
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable





<head>

<style type=3D"text/css">
<!--

/* start of attachment style */
       .ygrp-photo-title{
         clear: both;
         font-size: smaller;
         height: 15px;
         overflow: hidden;
         text-align: center;
         width: 75px;
       }
       div.ygrp-photo{
         background-position: center;
         background-repeat: no-repeat;
         background-color: white;
         border: 1px solid black;
         height: 62px;
         width: 62px;
       }

       div.photo-title=20
         a,
         div.photo-title a:active,
         div.photo-title a:hover,
         div.photo-title a:visited {
           text-decoration: none;=20
       }

       div.attach-table div.attach-row {
         clear: both;
       }

       div.attach-table div.attach-row div {
         float: left;
         /* margin: 2px;*/
       }

       p {
         clear: both;
         padding: 15px 0 3px 0;
	 overflow: hidden;
       }

       div.ygrp-file {
         width: 30px;
         valign: middle;
       }
       div.attach-table div.attach-row div div a {
         text-decoration: none;
       }

       div.attach-table div.attach-row div div span {
         font-weight: normal;
       }

       div.ygrp-file-title {
         font-weight: bold;
       }
 /* end of attachment style */
        -->
        </style>
        </head>
<html>
<head>
<style type=3D"text/css">
<!--
#ygrp-mkp {
  border: 1px solid #d8d8d8;
  font-family: Arial;
  margin: 10px 0;
  padding: 0 10px;
}

#ygrp-mkp hr {
  border: 1px solid #d8d8d8;
}

#ygrp-mkp #hd {
  color: #628c2a;
  font-size: 85%;
  font-weight: 700;
  line-height: 122%;
  margin: 10px 0;
}

#ygrp-mkp #ads {
  margin-bottom: 10px;
}

#ygrp-mkp .ad {
  padding: 0 0;
}

#ygrp-mkp .ad p {
  margin: 0;
}

#ygrp-mkp .ad a {
  color: #0000ff;
  text-decoration: none;
}
-->
</style>
</head>
<body>





<br><br><div class=3D"gmail_quote">On Thu, Nov 24, 2011 at 10:44 AM, John A=
braham <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">jea@hbasp=
ecto.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<u></u>










<div style=3D"background-color:#fff">
<span>=A0</span>


<div>
  <div>


    <div>
=20=20=20=20=20=20
=20=20=20=20=20=20
      <p></p><div class=3D"im"><br><div><div>On 2011-11-23, at 5:14 PM, ant=
hony berglas wrote:</div><br><blockquote type=3D"cite"><span style=3D"borde=
r-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:no=
rmal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px"><span style=3D"font-family:Geor=
gia;font-size:13px">The &quot;final&quot; is only a matter of style and you=
 could certainly remove it.<span>=A0</span></span></span></blockquote>

<br></div></div><div>Thanks. =A0I wrote a static class initialization routi=
ne and call it right after reading my properties file. =A0I have no idea wh=
y I thought the &quot;final&quot; was important.</div><div class=3D"im"><di=
v>

<br></div><div><blockquote type=3D"cite"><span style=3D"font-family:Georgia=
;font-size:13px">I would suggest you think about the order of the static in=
itializations. =A0What is causing the class to load before the ResourceUtil=
 one?=A0</span></blockquote>

<br></div></div><div>It&#39;s that we read the .properties file to determin=
e runtime properties (such as table names) from the main() method, not from=
 a static initializer. =A0</div></div></div></div></div></blockquote><div>

<br></div><div>Yes, but the static initializer is only run when you first t=
ouch the SimpleOrm class. =A0</div><div><br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex;">

<div style=3D"background-color:#fff"><div><div><div><div><br></div><div>--<=
/div><div>John Abraham</div><div><a href=3D"mailto:[email protected]" targe=
t=3D"_blank">[email protected]</a></div><br><p></p>

    </div>
=20=20=20=20=20

=20=20=20=20
    <div style=3D"color:#fff;min-height:0"></div>


</div>



=20=20






</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><p>
</p><p>Dr Anthony Berglas, <a href=3D"mailto:[email protected]" target=3D=
"_blank">[email protected]</a>=A0=A0=A0=A0=A0=A0 Mobile: +61 4 4838 8874<=
br>
Just because it is possible to push twigs along the ground with ones nose<b=
r>
does not necessarily mean that that is the best way to collect firewood.</p=
><br>




<!-- |**|begin egp html banner|**| -->

<br>

=20=20=20=20
=20=20=20=20
<br>

<!-- |**|end egp html banner|**| -->


<div width=3D"1" style=3D"color: white; clear: both;"/>__._,_.___</div>

<!-- Start Recommendations -->
<!-- End Recommendations -->



<!-- |**|begin egp html banner|**| -->

  <img src=3D"http://geo.yahoo.com/serv?s=3D97476590/grpId=3D7360226/grpspI=
d=3D1705006905/msgId=3D2041/stime=3D1322096362" width=3D"1" height=3D"1"> <=
br>

<!-- |**|end egp html banner|**| -->

=20=20
<!-- |**|begin egp html banner|**| -->

<br>
      <div style=3D"font-family: verdana; font-size: 77%; border-top: 1px s=
olid #666; padding: 5px 0;" >
      Your email settings: Individual Email|Traditional <br>
      <a href=3D"http://groups.yahoo.com/group/SimpleORM/join;_ylc=3DX3oDMT=
JmdGJrZ3RyBF9TAzk3NDc2NTkwBGdycElkAzczNjAyMjYEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlY=
wNmdHIEc2xrA3N0bmdzBHN0aW1lAzEzMjIwOTYzNjI-">Change settings via the Web</a=
> (Yahoo! ID required) <br>
      Change settings via email: <a href=3D"mailto:SimpleORM-digest@yahoogr=
oups.com?subject=3DEmail Delivery: Digest">Switch delivery to Daily Digest<=
/a> | <a href =3D "mailto:[email protected]?subject=3D=
Change Delivery Format: Fully Featured">Switch to Fully Featured</a> <br>
           <a href=3D"http://groups.yahoo.com/group/SimpleORM;_ylc=3DX3oDMT=
JkNDI2b3FwBF9TAzk3NDc2NTkwBGdycElkAzczNjAyMjYEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlY=
wNmdHIEc2xrA2hwZgRzdGltZQMxMzIyMDk2MzYy">
        Visit Your Group=20
      </a> |
      <a href=3D"http://docs.yahoo.com/info/terms/">
        Yahoo! Groups Terms of Use
      </a> |
      <a href=3D"mailto:[email protected]?subject=3DUns=
ubscribe">
       Unsubscribe=20
      </a>=20
 <br>
    </div>
  <br>

<!-- |**|end egp html banner|**| -->


<div style=3D"color: white; clear: both;"/>__,_._,___</div>
</body>

</html>

--20cf307d060ef6281c04b2708bca--