Technique for managing constants and database references

Discussion in 'Java' started by JIm Smith, Jul 25, 2003.

  1. JIm Smith

    JIm Smith Guest

    I have a large application which has a number of cases where certain
    constants exist as both java "static final int" and in a database table of
    the general form (id, shortname, longdescription...), where the id should
    correspond with the java constant. Unfortunately, because things have to be
    maintained in two places, and people are not perfect (damn them!), things
    can get out of sync.

    I'm looking for a way to unify the two somehow so there is a single point of
    maintenance - the database.

    I have one or two ideas of my own, but I would like to know if there are
    useful techniques for this already documented.

    TIA

    Jim Smith
     
    JIm Smith, Jul 25, 2003
    #1
    1. Advertising

  2. JIm Smith

    VisionSet Guest

    "JIm Smith" <> wrote in message
    news:...
    > I have a large application which has a number of cases where certain
    > constants exist as both java "static final int" and in a database table of
    > the general form (id, shortname, longdescription...), where the id should
    > correspond with the java constant. Unfortunately, because things have to

    be
    > maintained in two places, and people are not perfect (damn them!), things
    > can get out of sync.
    >
    > I'm looking for a way to unify the two somehow so there is a single point

    of
    > maintenance - the database.
    >
    > I have one or two ideas of my own, but I would like to know if there are
    > useful techniques for this already documented.


    A class that maps to your contstant table, instantiating the rows at start
    up?

    --
    Mike W
     
    VisionSet, Jul 25, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nick Gilbert
    Replies:
    14
    Views:
    2,763
    William \(Bill\) Vaughn
    Jul 6, 2005
  2. Replies:
    4
    Views:
    2,515
  3. Roger Leigh
    Replies:
    8
    Views:
    449
    Karl Heinz Buchegger
    Nov 17, 2003
  4. Replies:
    3
    Views:
    463
    Victor Bazarov
    Nov 10, 2004
  5. Trevor Hunter

    Managing references across a development team

    Trevor Hunter, May 26, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    539
    Trevor Hunter
    May 30, 2006
Loading...

Share This Page