com.joanju.cg.db
Class LStringTable

java.lang.Object
  extended by com.joanju.cg.db.LStringTable

public class LStringTable
extends java.lang.Object

Provides inter-package cached access to the lstring table.

Not part of the public API. The lstring table is for long strings (SQL "TEXT"), and it is case sensitive.


Constructor Summary
LStringTable()
           
 
Method Summary
static java.lang.String get(int id)
          Returns the lstring for an ID, null if it's not there.
static int get(java.lang.String str)
          Returns the ID for an lstring, creates it if it's not already there.
static int lookup(java.lang.String str)
          Looks up the ID for an lstring.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LStringTable

public LStringTable()
Method Detail

get

public static int get(java.lang.String str)
               throws java.sql.SQLException
Returns the ID for an lstring, creates it if it's not already there. Uses the lstring cache.

Throws:
java.sql.SQLException

get

public static java.lang.String get(int id)
                            throws java.sql.SQLException
Returns the lstring for an ID, null if it's not there. This is not cached, since it is usually only used for reporting and debugging.

Throws:
java.sql.SQLException

lookup

public static int lookup(java.lang.String str)
                  throws java.sql.SQLException
Looks up the ID for an lstring. Unlike the get() functions, this does not add the lstring to the database if it's not already there. Does not use the cache.

Returns:
zero if it does not exist.
Throws:
java.sql.SQLException


Copyright © 2008 Joanju Software. All Rights Reserved.