www.element4solution.com

e4s.db.dict
Class E4DBSelectDict

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.db.E4DBFilter
          extended by e4s.db.E4DBFilterAnd
              extended by e4s.db.E4DBSelect
                  extended by e4s.db.dict.E4DBSelectDict
All Implemented Interfaces:
E4DBFilter_Intf, E4DBFilterAnd_Intf, E4DBSelect_Intf

public class E4DBSelectDict
extends E4DBSelect
implements E4DBSelect_Intf

This class enables direct reading database access, based on the datadictionary definitions. There is no implementation for modification of data, as this would require more information from the program environment rather than available in the data dictionary.

Since:
JDK 1.4
See Also:
e4s.application.sysmodules.dict.moduleDictionarySQL, E4EditingElement

Field Summary
 
Fields inherited from class e4s.db.E4DBSelect
COLUMN_NAME_COUNT, COLUMN_NAME_SUM, DB_DATEFORMAT, DB_DATEPICTURE, ms_isunicode, NULL
 
Fields inherited from class e4s.db.E4DBFilter
COMP_EMPTY, COMP_EQUALS, COMP_GREATER, COMP_GREATER_EQUAL, COMP_IN, COMP_IS_NOT_NULL, COMP_IS_NULL, COMP_LESS, COMP_LESS_EQUAL, COMP_LIKE, COMP_NOT_EMPTY, COMP_NOT_EQUALS, COMP_NOT_IN, COMP_NOT_LIKE
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
E4DBSelectDict(E4DBSelectDict table, boolean copy_where)
           
E4DBSelectDict(E4DBTable table)
           
E4DBSelectDict(E4DBTable table, E4ApplObj_Intf applobj)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 boolean canHaveFreeDefinedFields()
           
 E4Fieldset createFIELDSET(E4ApplObj_Intf applobj)
           
 E4Fieldset createFIELDSET(FORM form)
           
 E4Fieldset get_FIELDSET(FORM form)
           
 void get(E4Fieldset fieldset)
           
 E4DBColumnInfo[] getColInfo()
          Get information about the columns defined for this database table.
 java.lang.Class getModifyClass()
          Get the defined and generated class for the modifications, this means INSERT, UPDATE and DELETE, related to this table.
 java.lang.Class getObjectClass()
          Get the defined and generated class for the data-object related to this table.
 E4DBReference[] getReferenceDelete(E4DBColumnName cName)
          Get an array of reference entries that are marked for referential delete in the data dictionary.
 E4DBReference[] getReferenceLookup(E4DBColumnName cName)
          Get an array of reference entries that are marked for referential lookup in the data dictionary.
 E4DBTypeUsage[] getUsage(E4DBColumnName colname)
          For the case, that the specified column is a e4s defined type (e.g.
 boolean hasClientDistinctive()
          Get the state if data of this table will be distincted by E4Client.
 E4DBModify_Intf makeInstance_Modify(boolean copy_where)
          Make an instance of the associated class for modification of database table entries.
 E4DBSelect_Intf makeInstance(boolean copy_where)
           
 
Methods inherited from class e4s.db.E4DBSelect
checkConsistencyIndex, checkConsistencyIndex, checkConsistencyTable, checkConsistencyTable, checkConsistencyTable, close, data2csv, data2csv, data2csv, data2csv, data2csv, data2csv, data2csv, data2csvHeader, data2csvHeader, disableLogging, enableLogging, enableUnicode, executeCount, executeCountQuery, executeCountQuery, executeCountQuery, executeDistinctQuery, executeDistinctQuery, executeMax, executeMaxDate, executeMaxString, executeMin, executeMinDate, executeMinString, executeQuery, executeQuery, executeQuery, executeSQL, executeSQL, executeSQL, executeSumQuery, executeSumQuery, executeSumQuery, finalize, getBoolean, getConnection, getDate, getDistinctData, getDouble, getE4Long, getE4String, getFirstPrimaryIndex, getFloat, getInt, getLong, getMetaData, getResultSet, getStatement, getString, getTableName, isLogging, isTable, isUnicodeEnabled, isView, next, removeOwnTableColumn, reset, resetOrderBy, setConnection, setFilterQuery, setFilterQuery, setOrderBy, setOrderBy, setOrderExtended, supportsSorting, toDate, toString, toString
 
Methods inherited from class e4s.db.E4DBFilterAnd
getWhere, isEmpty, isNotEmpty, isNotNull, isNull, OR, setFilter_NOT, setFilter_NOT, setFilter_NOT, setFilter_NOT, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter
 
Methods inherited from class e4s.db.E4DBFilter
Escape, Escape, getApplObj, getClient, getSession, getWhere, isWhereDefined, OP, resetWhere, setFilter_IN, setFilter_IN, setFilter_IN, setFilter_IN, setFilter_IN, setFilter_NOT_IN, setFilter_NOT_IN, setFilter_NOT_IN, setFilter_NOT_IN, setFilter_NOT_IN, setFilter, setFilter, setWhere, toString
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface e4s.db.E4DBSelect_Intf
close, executeQuery, getApplObj, getBoolean, getConnection, getDate, getFirstPrimaryIndex, getFloat, getLong, getMetaData, getString, getTableName, getWhere, isTable, isView, isWhereDefined, next, reset, resetOrderBy, resetWhere, setConnection, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setOrderBy, setWhere, supportsSorting, toString
 
Methods inherited from interface e4s.db.E4DBFilter_Intf
isWhereDefined, resetWhere
 

Constructor Detail

E4DBSelectDict

public E4DBSelectDict(E4DBTable table)
               throws E4DBException
Throws:
E4DBException

E4DBSelectDict

public E4DBSelectDict(E4DBTable table,
                      E4ApplObj_Intf applobj)
               throws E4DBException
Throws:
E4DBException

E4DBSelectDict

public E4DBSelectDict(E4DBSelectDict table,
                      boolean copy_where)
               throws E4DBException
Throws:
E4DBException
Method Detail

makeInstance

public E4DBSelect_Intf makeInstance(boolean copy_where)
                             throws E4DBException
Specified by:
makeInstance in interface E4DBSelect_Intf
Throws:
E4DBException

makeInstance_Modify

public E4DBModify_Intf makeInstance_Modify(boolean copy_where)
                                    throws E4DBException
Make an instance of the associated class for modification of database table entries. If an application object is defined, it will also be handled to the new created instance, as well as the database connection.

Specified by:
makeInstance_Modify in interface E4DBSelect_Intf
Parameters:
copy_where - if true, the WHERE statement from the table is also copied to the new created table.
Throws:
E4DBException
See Also:
makeInstance(boolean)

hasClientDistinctive

public boolean hasClientDistinctive()
Get the state if data of this table will be distincted by E4Client. This is the case, if the E4ApplObj_Intf object was involved during construction of the object.

Specified by:
hasClientDistinctive in interface E4DBSelect_Intf
Returns:
true, if client distinction is enabled for this table.
See Also:
E4Client

getUsage

public E4DBTypeUsage[] getUsage(E4DBColumnName colname)
For the case, that the specified column is a e4s defined type (e.g. E4Long, E4String) this function returns an array in which tables and columns this type is used, except the current table and the specified column.

Specified by:
getUsage in interface E4DBSelect_Intf
Parameters:
colname - the column to be checked
See Also:
E4DBIntegrity

get_FIELDSET

public E4Fieldset get_FIELDSET(FORM form)
                        throws E4DBException
Specified by:
get_FIELDSET in interface E4DBSelect_Intf
Throws:
E4DBException

createFIELDSET

public E4Fieldset createFIELDSET(FORM form)
Specified by:
createFIELDSET in interface E4DBSelect_Intf

createFIELDSET

public E4Fieldset createFIELDSET(E4ApplObj_Intf applobj)

getObjectClass

public java.lang.Class getObjectClass()
Description copied from interface: E4DBSelect_Intf
Get the defined and generated class for the data-object related to this table.

Specified by:
getObjectClass in interface E4DBSelect_Intf
Returns:
null

getModifyClass

public java.lang.Class getModifyClass()
Description copied from interface: E4DBSelect_Intf
Get the defined and generated class for the modifications, this means INSERT, UPDATE and DELETE, related to this table.

Specified by:
getModifyClass in interface E4DBSelect_Intf
Returns:
null
See Also:
E4DBModify_Intf

getColInfo

public E4DBColumnInfo[] getColInfo()
Description copied from interface: E4DBSelect_Intf
Get information about the columns defined for this database table.

Specified by:
getColInfo in interface E4DBSelect_Intf
Returns:
null if no columns are defined, an array of E4DBColumnType objects

getReferenceDelete

public E4DBReference[] getReferenceDelete(E4DBColumnName cName)
                                   throws E4DBException
Get an array of reference entries that are marked for referential delete in the data dictionary.

Specified by:
getReferenceDelete in interface E4DBSelect_Intf
Overrides:
getReferenceDelete in class E4DBSelect
Parameters:
cName - the column which references needs to be deleted (the "master")
Returns:
null, if no referential delete is defined for that column, or a list of references (the "detail")
Throws:
E4DBException

getReferenceLookup

public E4DBReference[] getReferenceLookup(E4DBColumnName cName)
                                   throws E4DBException
Get an array of reference entries that are marked for referential lookup in the data dictionary.

Specified by:
getReferenceLookup in interface E4DBSelect_Intf
Overrides:
getReferenceLookup in class E4DBSelect
Parameters:
cName - the column which references needs to be deleted (the "master")
Returns:
null, if no referential lookup is defined for that column, or a list of references (the "detail")
Throws:
E4DBException

canHaveFreeDefinedFields

public boolean canHaveFreeDefinedFields()
Specified by:
canHaveFreeDefinedFields in interface E4DBSelect_Intf

get

public void get(E4Fieldset fieldset)
         throws E4DBException
Specified by:
get in interface E4DBSelect_Intf
Throws:
E4DBException

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com