public class Database extends AbstractSql implements PsqlTables
AbstractSql.Columns, AbstractSql.ExtractPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFHOSTNAME
Default user name for the table.
|
private static String |
DEFUSERNAME
Default user name for the table.
|
static String |
KEY_HOSTNAME
The key to the user name for db-acces if not default.
|
static String |
KEY_USERNAME
The key to the user name for db-acces if not default.
|
KEY_TABLE, SQLBATCHDIR, SQLFAILDIRKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORDEFDONETABLE, DEFENVTABLE, DEFOBJID, DEFOBSTABLE, DEFPERMISSIONTABLE, DEFPROPOSALTABLE, DEFREDUCEDTABLE, DEFTARGETID, DEFTARGETTABLE, DEFTASKTABLE, DEFUSERTABLE, KEY_DONETABLE, KEY_ENVTABLE, KEY_OBJID, KEY_OBSTABLE, KEY_PERMISSIONTABLE, KEY_PROPOSALTABLE, KEY_REDUCEDTABLE, KEY_TARGETID, KEY_TARGETTABLE, KEY_TASKTABLE, KEY_USERTABLEKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Modifier and Type | Method and Description |
|---|---|
protected static void |
error(Exception e) |
Map<String,String> |
getRequestedNames(Set<String> requestkeys)
In SQL, column names have to be augmented with a leading table name plus
'.', if there are equally named columns in the tables queried.
|
static Method |
getResultSetMethod(String name)
Returns the method in the result set with the given name, catches
exception.
|
String |
lookUp(String unique,
String uniquecolumn,
String table,
String lookup)
Looks up a key in a database.
|
Map<String,List<Object>> |
queryDatabase(String where,
String table,
Map<String,Method> request)
This method is called from subclasses if they want to retrieve data from
the database.
|
Map<String,List<Object>> |
queryDatabase(String where,
String table,
String order,
int limit,
Map<String,Method> request)
This method is called from subclasses if they want to retrieve data from
the database.
|
Map<String,List<Object>> |
queryDatabase(String where,
String table,
String order,
Map<String,Method> request)
This method is called from subclasses if they want to retrieve data from
the database.
|
Map<String,Object> |
querySingle(String where,
String table,
Map<String,Method> request)
For convenience, this queries for a single result set.
|
delete, distinct, distinct, exit, getAccess, getDefaultArchive, getDefaultFormat, getTable, init, insert, isEntry, release, release, replace, retrieve, retrieve, retrieve, single, singleclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_USERNAME
public static final String KEY_HOSTNAME
private static final String DEFUSERNAME
private static final String DEFHOSTNAME
public String lookUp(String unique, String uniquecolumn, String table, String lookup)
public Map<String,Object> querySingle(String where, String table, Map<String,Method> request)
public Map<String,List<Object>> queryDatabase(String where, String table, Map<String,Method> request)
public Map<String,List<Object>> queryDatabase(String where, String table, String order, Map<String,Method> request)
public Map<String,List<Object>> queryDatabase(String where, String table, String order, int limit, Map<String,Method> request)
public Map<String,String> getRequestedNames(Set<String> requestkeys)
SELECT from tab1,tab2 tab1.name,colonlyin2,colonlyin1 where ...then your result set will have cloumns names
name,colonlyin2,colonlyin1If you have a select like
SELECT from tab1,tab2 tab1.name,tab2.name,colonlyin2,colonlyin1then your result set will contain table names, thus
tab1.name,tab2.name,colonlyin2,colonlyin1This method now stripps unneeded table names from column names.
public static Method getResultSetMethod(String name)
protected static void error(Exception e)