www.element4solution.com

e4s.db.freefield
Class E4DBSelectFreefields

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.freefield.E4DBSelectFreefields
All Implemented Interfaces:
E4DBFilter_Intf, E4DBFilterAnd_Intf
Direct Known Subclasses:
T_E4S_COMPANY_GROUP_Sel, T_E4S_COMPANY_Sel, T_E4S_COMPANY_USER_Sel

public abstract class E4DBSelectFreefields
extends E4DBSelect


Field Summary
static int XML_EXPORT_FREEFIELD_NONE
           
static int XML_EXPORT_FREEFIELD_ROW
           
static int XML_EXPORT_FREEFIELD_TABLE
           
 
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
E4DBSelectFreefields(E4DBConnection_Intf con, E4DBTableName tableName)
          Construct an object for selecting data from a table, using the specified database connection.
E4DBSelectFreefields(E4DBConnection_Intf con, E4DBTableName tableName, E4ApplObj_Intf applobj)
          Construct an object for selecting data from a table, using the specified database connection, the table uses client distinction.
E4DBSelectFreefields(E4DBSelect_Intf select, boolean copy_where)
           
E4DBSelectFreefields(E4DBSelect select, boolean copy_where)
           
E4DBSelectFreefields(E4DBTableName tableName)
          Construct an object for selecting data from a table, using the default database connection.
E4DBSelectFreefields(E4DBTableName tableName, E4ApplObj_Intf applobj)
          Construct an object for selecting data from a table, using the default database connection, the table uses client distinction.
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
static void copyFreevalDefinitions(E4ApplObj_Intf applobj, E4DBConnection_Intf con, E4DBTableName from, E4DBTableName to)
          Copies the freefield definitions from one table to another.
static void copyFreevalDefinitions(E4ApplObj_Intf applobj, E4DBTableName from, E4DBTableName to)
          Copies the freefield definitions from one table to another.
protected  E4DBFreeFieldName[] data2csvHeaderFreefields(E4PrintStream out)
           
protected  E4DBFreeFieldName[] data2xmlHeaderFreefields(E4PrintStream out)
           
 boolean getFreeval_Bool(E4DBFreeFieldName fieldname)
          Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.
 java.util.Date getFreeval_Date(E4DBFreeFieldName fieldname)
          Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.
 float getFreeval_Float(E4DBFreeFieldName fieldname)
          Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.
 long getFreeval_Long(E4DBFreeFieldName fieldname)
          Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.
abstract  java.lang.String getFreeval(E4DBFreeFieldName fieldname)
          Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.
 T_E4S_FREEFIELD_DEF_Obj[] getFreevalDefinitions()
          Get the definitions of the free fields.
static T_E4S_FREEFIELD_DEF_Obj[] getFreevalDefinitions(E4ApplObj_Intf applobj, E4DBTableName tablename)
          Get the definitions of the free fields.
 T_E4S_FREEFIELD_DEF_Obj[] getFreevalDefinitions(E4DBConnection_Intf con)
          Get the definitions of the free fields.
static T_E4S_FREEFIELD_DEF_Obj[] getFreevalDefinitions(E4DBConnection_Intf con, E4ApplObj_Intf applobj, E4DBTableName tablename)
          Get the definitions of the free fields.
 E4DBFreeValue[] getFreeValues()
          Get the defined fields and values, include empty values.
 E4DBFreeValue[] getFreeValues(boolean include_empty)
          Get the defined fields and values.
 E4DBFreeValue[] getFreeValues(E4DBConnection_Intf con, boolean include_empty)
          Get the defined fields and values.
static boolean hasFreeField(E4ApplObj_Intf applobj, E4DBTableName tablename, E4DBFreeFieldName freefieldname)
          Test, if a free-field is included in the definitions.
static boolean hasFreeField(E4DBConnection_Intf con, E4ApplObj_Intf applobj, E4DBTableName tablename, E4DBFreeFieldName freefieldname)
          Test, if a free-field is included in the definitions.
 boolean hasFreeField(E4DBFreeFieldName freefieldname)
          Test, if a free-field is included in the definitions.
protected  void toSqlFreefieldValues(E4PrintStream out, E4DBFreeFieldName[] freefields)
           
protected  void toXmlFreefieldValues(E4PrintStream out, E4DBFreeFieldName[] freefields)
           
 
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, getReferenceDelete, getReferenceLookup, 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, wait, wait, wait
 
Methods inherited from interface e4s.db.E4DBFilter_Intf
isWhereDefined, resetWhere
 

Field Detail

XML_EXPORT_FREEFIELD_NONE

public static final int XML_EXPORT_FREEFIELD_NONE
See Also:
Constant Field Values

XML_EXPORT_FREEFIELD_ROW

public static final int XML_EXPORT_FREEFIELD_ROW
See Also:
Constant Field Values

XML_EXPORT_FREEFIELD_TABLE

public static final int XML_EXPORT_FREEFIELD_TABLE
See Also:
Constant Field Values
Constructor Detail

E4DBSelectFreefields

public E4DBSelectFreefields(E4DBTableName tableName)
                     throws E4DBException
Construct an object for selecting data from a table, using the default database connection. No client distinction on this table.

Parameters:
tableName - the name of a database table
Throws:
E4DBException

E4DBSelectFreefields

public E4DBSelectFreefields(E4DBSelect select,
                            boolean copy_where)
                     throws E4DBException
Throws:
E4DBException

E4DBSelectFreefields

public E4DBSelectFreefields(E4DBSelect_Intf select,
                            boolean copy_where)
                     throws E4DBException
Throws:
E4DBException

E4DBSelectFreefields

public E4DBSelectFreefields(E4DBConnection_Intf con,
                            E4DBTableName tableName)
Construct an object for selecting data from a table, using the specified database connection. No client distinction on this table.

Parameters:
con - the connection
tableName - the name of a database table

E4DBSelectFreefields

public E4DBSelectFreefields(E4DBTableName tableName,
                            E4ApplObj_Intf applobj)
                     throws E4DBException
Construct an object for selecting data from a table, using the default database connection, the table uses client distinction.

Parameters:
tableName - the name of a database table
applobj - an application object, containing client and other information
Throws:
E4DBException
See Also:
E4ModuleImplementation.getApplObj(), E4ServletImplementation_Intf.getApplObj()

E4DBSelectFreefields

public E4DBSelectFreefields(E4DBConnection_Intf con,
                            E4DBTableName tableName,
                            E4ApplObj_Intf applobj)
Construct an object for selecting data from a table, using the specified database connection, the table uses client distinction.

Parameters:
con - the connection
tableName - the name of a database table
applobj - an application object, containing client and other information
See Also:
E4ModuleImplementation.getApplObj(), E4ServletImplementation_Intf.getApplObj()
Method Detail

getFreeval

public abstract java.lang.String getFreeval(E4DBFreeFieldName fieldname)
                                     throws E4DBException
Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.

Parameters:
fieldname - the name of the freefield.
Returns:
the value or null if not available.
Throws:
E4DBException
See Also:
getFreeval_Bool(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Long(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Float(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Date(e4s.db.freefield.E4DBFreeFieldName)

getFreeval_Bool

public boolean getFreeval_Bool(E4DBFreeFieldName fieldname)
                        throws E4DBException
Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.

Parameters:
fieldname - the name of the freefield.
Returns:
the value or null if not available.
Throws:
E4DBException
See Also:
getFreeval(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Long(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Float(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Date(e4s.db.freefield.E4DBFreeFieldName)

getFreeval_Long

public long getFreeval_Long(E4DBFreeFieldName fieldname)
                     throws E4DBException
Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.

Parameters:
fieldname - the name of the freefield.
Returns:
the value or null if not available.
Throws:
E4DBException
See Also:
getFreeval_Bool(e4s.db.freefield.E4DBFreeFieldName), getFreeval(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Float(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Date(e4s.db.freefield.E4DBFreeFieldName)

getFreeval_Float

public float getFreeval_Float(E4DBFreeFieldName fieldname)
                       throws E4DBException
Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.

Parameters:
fieldname - the name of the freefield.
Returns:
the value or null if not available.
Throws:
E4DBException
See Also:
getFreeval_Bool(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Long(e4s.db.freefield.E4DBFreeFieldName), getFreeval(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Date(e4s.db.freefield.E4DBFreeFieldName)

getFreeval_Date

public java.util.Date getFreeval_Date(E4DBFreeFieldName fieldname)
                               throws E4DBException
Get freedefined value associated with the specified fieldname and the current recordset by the underlaying E4DBSelect_Intf object containing a unique index to identify the record.

Parameters:
fieldname - the name of the freefield.
Returns:
the value or null if not available.
Throws:
E4DBException
See Also:
getFreeval_Bool(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Long(e4s.db.freefield.E4DBFreeFieldName), getFreeval_Float(e4s.db.freefield.E4DBFreeFieldName), getFreeval(e4s.db.freefield.E4DBFreeFieldName)

getFreevalDefinitions

public static T_E4S_FREEFIELD_DEF_Obj[] getFreevalDefinitions(E4DBConnection_Intf con,
                                                              E4ApplObj_Intf applobj,
                                                              E4DBTableName tablename)
                                                       throws E4DBException
Get the definitions of the free fields.

Parameters:
applobj - the application object
tablename - the requested table
Returns:
the definitions
Throws:
E4DBException
See Also:
getFreevalDefinitions(), E4DBModifyFreefields.getFreevalInputfields(e4s.application.E4ApplObj_Intf,e4s.db.E4DBTableName)

getFreevalDefinitions

public static T_E4S_FREEFIELD_DEF_Obj[] getFreevalDefinitions(E4ApplObj_Intf applobj,
                                                              E4DBTableName tablename)
                                                       throws E4DBException
Get the definitions of the free fields.

Parameters:
applobj - the application object
tablename - the requested table
Returns:
the definitions
Throws:
E4DBException
See Also:
getFreevalDefinitions(), E4DBModifyFreefields.getFreevalInputfields(e4s.application.E4ApplObj_Intf,e4s.db.E4DBTableName)

getFreevalDefinitions

public T_E4S_FREEFIELD_DEF_Obj[] getFreevalDefinitions(E4DBConnection_Intf con)
                                                throws E4DBException
Get the definitions of the free fields.

Returns:
the definitions
Throws:
E4DBException
See Also:
E4DBModifyFreefields.getFreevalInputfields(), getFreevalDefinitions(e4s.application.E4ApplObj_Intf,e4s.db.E4DBTableName)

getFreevalDefinitions

public T_E4S_FREEFIELD_DEF_Obj[] getFreevalDefinitions()
                                                throws E4DBException
Get the definitions of the free fields.

Returns:
the definitions
Throws:
E4DBException
See Also:
E4DBModifyFreefields.getFreevalInputfields(), getFreevalDefinitions(e4s.application.E4ApplObj_Intf,e4s.db.E4DBTableName)

hasFreeField

public static boolean hasFreeField(E4DBConnection_Intf con,
                                   E4ApplObj_Intf applobj,
                                   E4DBTableName tablename,
                                   E4DBFreeFieldName freefieldname)
                            throws E4DBException
Test, if a free-field is included in the definitions.

Parameters:
applobj - the application object
tablename - the requested table
freefieldname - the requested field
Returns:
true if included
Throws:
E4DBException

hasFreeField

public static boolean hasFreeField(E4ApplObj_Intf applobj,
                                   E4DBTableName tablename,
                                   E4DBFreeFieldName freefieldname)
                            throws E4DBException
Test, if a free-field is included in the definitions.

Parameters:
applobj - the application object
tablename - the requested table
freefieldname - the requested field
Returns:
true if included
Throws:
E4DBException

hasFreeField

public boolean hasFreeField(E4DBFreeFieldName freefieldname)
                     throws E4DBException
Test, if a free-field is included in the definitions.

Parameters:
freefieldname - the requested field
Returns:
true if included
Throws:
E4DBException

getFreeValues

public E4DBFreeValue[] getFreeValues()
                              throws E4DBException
Get the defined fields and values, include empty values.

Returns:
the values
Throws:
E4DBException

getFreeValues

public E4DBFreeValue[] getFreeValues(boolean include_empty)
                              throws E4DBException
Get the defined fields and values.

Parameters:
include_empty - true includes also entries where a field is defined but no value is available
Returns:
the values
Throws:
E4DBException

getFreeValues

public E4DBFreeValue[] getFreeValues(E4DBConnection_Intf con,
                                     boolean include_empty)
                              throws E4DBException
Get the defined fields and values.

Parameters:
include_empty - true includes also entries where a field is defined but no value is available
Returns:
the values
Throws:
E4DBException

copyFreevalDefinitions

public static void copyFreevalDefinitions(E4ApplObj_Intf applobj,
                                          E4DBTableName from,
                                          E4DBTableName to)
                                   throws E4DBException
Copies the freefield definitions from one table to another. Removes any definitions in the target table that do not exist definitions in the source table. This copies the definitions, not the values.

Parameters:
applobj - the application object
from - the source table
to - the destination table
Throws:
E4DBException
See Also:
T_E4S_FREEFIELD_DEF_Sel

copyFreevalDefinitions

public static void copyFreevalDefinitions(E4ApplObj_Intf applobj,
                                          E4DBConnection_Intf con,
                                          E4DBTableName from,
                                          E4DBTableName to)
                                   throws E4DBException
Copies the freefield definitions from one table to another. Removes any definitions in the target table that do not exist definitions in the source table. This copies the definitions, not the values.

Parameters:
applobj - the application object
con - the connection
from - the source table
to - the destination table
Throws:
E4DBException
See Also:
T_E4S_FREEFIELD_DEF_Sel

data2csvHeaderFreefields

protected E4DBFreeFieldName[] data2csvHeaderFreefields(E4PrintStream out)
                                                throws E4DBException
Throws:
E4DBException

data2xmlHeaderFreefields

protected E4DBFreeFieldName[] data2xmlHeaderFreefields(E4PrintStream out)
                                                throws E4DBException
Throws:
E4DBException

toXmlFreefieldValues

protected void toXmlFreefieldValues(E4PrintStream out,
                                    E4DBFreeFieldName[] freefields)
                             throws E4DBException
Throws:
E4DBException

toSqlFreefieldValues

protected void toSqlFreefieldValues(E4PrintStream out,
                                    E4DBFreeFieldName[] freefields)
                             throws E4DBException
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