www.element4solution.com

e4s.db
Interface E4DBSelect_Intf

All Known Subinterfaces:
E4DBSelectFreefields_Intf
All Known Implementing Classes:
E4DBSelectDict, T_E4S_CLIENT_Sel, T_E4S_CLIENT_VAL_Sel, T_E4S_COMPANY_GROUP_Sel, T_E4S_COMPANY_Sel, T_E4S_COMPANY_USER_Sel, T_E4S_FREEFIELD_DEF_Sel, T_E4S_FREEFIELD_VAL_Sel, T_E4S_HINT_READ_Sel, T_E4S_HINT_Sel, T_E4S_LOGIN_HISTORY_Sel, T_E4S_MAIL_SENT_Sel, T_E4S_OVERVIEW_Sel, T_E4S_PERMISSION_COMPANY_Sel, T_E4S_PERMISSION_GROUP_Sel, T_E4S_PERMISSION_USER_Sel, T_E4S_QUERY_CLIENTS_Sel, T_E4S_QUERY_PARAMS_Sel, T_E4S_QUERY_Sel, T_E4S_TRANS_APP_Sel, T_E4S_TRANS_DATA_Sel, T_E4S_TRANS_SYS_Sel, T_E4S_USER_VAL_Sel, V_E4S_USERS_Sel

public interface E4DBSelect_Intf

Interface for database reading-access classes. This interface becomes implemented by the generated database table access classes.

Since:
JDK 1.4
See Also:
E4DBSelect, E4DBModify_Intf, E4DBSelectFreefields_Intf

Method Summary
 boolean canHaveFreeDefinedFields()
           
 void close()
          Close the database connection (if pooling is enabled #e4s.db.E4DBConnection_Intf#connectionIsPooled).
 E4Fieldset createFIELDSET(FORM form)
           
 void executeQuery()
           
 E4Fieldset get_FIELDSET(FORM form)
           
 void get(E4Fieldset fieldset)
           
 E4ApplObj_Intf getApplObj()
          Get the application object.
 boolean getBoolean(E4DBColumnName fieldName)
           
 E4DBColumnInfo[] getColInfo()
          Get information about the columns defined for this database table.
 E4DBConnection_Intf getConnection()
          Get the database connection.
 java.util.Date getDate(E4DBColumnName fieldName)
           
 E4DBIndexInfo getFirstPrimaryIndex()
          Get the fields defined in the first unique index, return null if not available.
 float getFloat(E4DBColumnName fieldName)
           
 long getLong(E4DBColumnName fieldName)
           
 E4DBResultSetMetaData getMetaData()
           
 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.
 java.lang.String getString(E4DBColumnName col)
           
 E4DBTableName getTableName()
           
 E4DBTypeUsage[] getUsage(E4DBColumnName colname)
          For the case, that the specified column is a e4s defined type (e.g.
 java.lang.String getWhere()
           
 boolean hasClientDistinctive()
          Get the state if data of this table will be distincted by E4Client.
 boolean isTable()
          Is this data access object a table?
 boolean isView()
          Is this data access object a view?
 boolean isWhereDefined()
           
 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)
           
 boolean next()
           
 void reset()
           
 void resetOrderBy()
           
 void resetWhere()
           
 void setConnection(E4DBConnection_Intf con)
          Sets the database connection.
 void setFilter(E4DBColumnName fieldName, boolean filter)
           
 void setFilter(E4DBColumnName fieldName, java.util.Date filter)
           
 void setFilter(E4DBColumnName fieldName, float filter)
           
 void setFilter(E4DBColumnName fieldName, long filter)
           
 void setFilter(E4DBColumnName fieldName, java.lang.String filter)
           
 void setFilter(E4DBFilter_Intf filter)
           
 void setOrderBy(E4DBColumnName column, boolean descending)
           
 void setWhere(java.lang.String sql)
           
 boolean supportsSorting()
           
 java.lang.String toString()
           
 

Method Detail

getTableName

E4DBTableName getTableName()

getColInfo

E4DBColumnInfo[] getColInfo()
Get information about the columns defined for this database table.

Returns:
null if no columns are defined, an array of E4DBColumnType objects

executeQuery

void executeQuery()
                  throws E4DBException
Throws:
E4DBException

next

boolean next()
             throws E4DBException
Throws:
E4DBException

reset

void reset()
           throws E4DBException
Throws:
E4DBException

close

void close()
           throws E4DBException
Close the database connection (if pooling is enabled #e4s.db.E4DBConnection_Intf#connectionIsPooled).

Throws:
E4DBException

setOrderBy

void setOrderBy(E4DBColumnName column,
                boolean descending)

getMetaData

E4DBResultSetMetaData getMetaData()
                                  throws E4DBException
Throws:
E4DBException

supportsSorting

boolean supportsSorting()

getModifyClass

java.lang.Class getModifyClass()
Get the defined and generated class for the modifications, this means INSERT, UPDATE and DELETE, related to this table.

Returns:
class for the modifications
See Also:
E4DBModify_Intf

getObjectClass

java.lang.Class getObjectClass()
Get the defined and generated class for the data-object related to this table.

Returns:
the data object class

getString

java.lang.String getString(E4DBColumnName col)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getBoolean

boolean getBoolean(E4DBColumnName fieldName)
                   throws E4DBException
Throws:
E4DBException

getFloat

float getFloat(E4DBColumnName fieldName)
               throws E4DBException
Throws:
E4DBException

getLong

long getLong(E4DBColumnName fieldName)
             throws E4DBException
Throws:
E4DBException

getDate

java.util.Date getDate(E4DBColumnName fieldName)
                       throws E4DBException
Throws:
E4DBException

isWhereDefined

boolean isWhereDefined()

resetWhere

void resetWhere()

resetOrderBy

void resetOrderBy()

getWhere

java.lang.String getWhere()

setWhere

void setWhere(java.lang.String sql)

setFilter

void setFilter(E4DBFilter_Intf filter)

setFilter

void setFilter(E4DBColumnName fieldName,
               java.lang.String filter)
               throws E4DBException
Throws:
E4DBException

setFilter

void setFilter(E4DBColumnName fieldName,
               long filter)
               throws E4DBException
Throws:
E4DBException

setFilter

void setFilter(E4DBColumnName fieldName,
               float filter)
               throws E4DBException
Throws:
E4DBException

setFilter

void setFilter(E4DBColumnName fieldName,
               boolean filter)
               throws E4DBException
Throws:
E4DBException

setFilter

void setFilter(E4DBColumnName fieldName,
               java.util.Date filter)
               throws E4DBException
Throws:
E4DBException

hasClientDistinctive

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.

Returns:
true, if client distinction is enabled for this table.
See Also:
E4Client

canHaveFreeDefinedFields

boolean canHaveFreeDefinedFields()

createFIELDSET

E4Fieldset createFIELDSET(FORM form)

get_FIELDSET

E4Fieldset get_FIELDSET(FORM form)
                        throws E4DBException
Throws:
E4DBException

get

void get(E4Fieldset fieldset)
         throws E4DBException
Throws:
E4DBException

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object

makeInstance

E4DBSelect_Intf makeInstance(boolean copy_where)
                             throws E4DBException
Throws:
E4DBException

makeInstance_Modify

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.

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)

getApplObj

E4ApplObj_Intf getApplObj()
Get the application object. The application object holds information such as E4Client, E4User-Name, etc..

Returns:
the application object
See Also:
E4ServletImplementation_Intf.getApplObj(), E4ServletImplementation_Intf.setApplicationObject(e4s.application.E4ApplObj_Intf)

getConnection

E4DBConnection_Intf getConnection()
Get the database connection.


setConnection

void setConnection(E4DBConnection_Intf con)
Sets the database connection.


getUsage

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.

Parameters:
colname - the column to be checked
See Also:
E4DBIntegrity

getReferenceDelete

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

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

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

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

isTable

boolean isTable()
Is this data access object a table?

Returns:
true if it is a table or false if it is a view.
See Also:
E4DBSelectView.isTable(), isView()

isView

boolean isView()
Is this data access object a view?

Returns:
false if it is a table or true if it is a view.
See Also:
E4DBSelectView.isView(), isTable()

getFirstPrimaryIndex

E4DBIndexInfo getFirstPrimaryIndex()
Get the fields defined in the first unique index, return null if not available.

Returns:
null if no unique index is defined, otherwise the fields of the first index.

www.element4solution.com