Expresso 5-6

com.jcorporate.expresso.core.dbobj
Class MultiDBObject

java.lang.Object
  extended bycom.jcorporate.expresso.core.dbobj.MultiDBObject
Direct Known Subclasses:
MultiDBObjectTransaction

public class MultiDBObject
extends Object

This class handles joins the 'old' way. It is not deprectated, but

See Also:
for a more modern, flexible approach to joins

A MultiDBObject is a group of dbobjects that are "related" - e.g. defined as being part of a foreign-key/primary-key relationship. This may be master/detail or a more complex relationship, but it can be expressed as a "join" operation between the tables.

After establishing the relationships between the objects, the MultiDBObject can have search criteria set for it & searchAndRetrieve operations done just like a 'regular' DBObject, but these operations affect the entire related group of objects. At the moment, MultiDBObjects are read-only, though that may change in the future.

Add 'model' objects, which may have criteria already set in their fields for a search, via addDBObj(). After a query (via searchAndRetrieveList()), each resulting MultiDBObject instance represents a 'join' row, and has its own encapsulated instances of whatever DBObject models have been set with addDBObj() before the query. In order to access these instances, use getDBObject().

Creation date: (9/18/00 11:32:03 AM) author Michael Nash


Field Summary
protected static int INNER_JOIN
          Static variables for join type
protected static int LEFT_JOIN
           
protected  DBConnection localConnection
          Local connection that we use if it's initialized, but if it's null we generate our own connection
protected  int maxRecords
           
protected  int offsetRecord
          The number of records we must skip over before we start reading the ResultSet proper in a searchAndRetrieve. 0 means no limit author Peter Pilgrim, Thu Jun 21 10:30:59 BST 2001
protected static int RIGHT_JOIN
           
protected static String SHORT_NAME
          Constant for shortName DBObject attribute
 
Constructor Summary
MultiDBObject()
          MultiDBObject constructor. calls setupFields.
MultiDBObject(ControllerRequest request)
          MultiDBObject constructor which sets dbname from request
 
Method Summary
 void addDBObj(DBObject oneDBObj, String shortName)
           
 void addDBObj(String dbobjClassName, String shortName)
          Add a DB Object to the objects being used for this multidbobj query.
 DBObject assembleObject(String shortName)
          Deprecated. v. 5.5+; 9/04; use getDBObject() instead
 boolean buildFromClause()
          Build a string consisting of an SQL 'from' clause using the customFromClause, the foreign-key or the join definitions.
 String buildWhereClause(boolean useAllFields)
          Build and return a string consisting of an SQL 'where' clause using the current field values as criteria for the search.
protected  String buildWhereClauseBuffer(boolean useAllFields, FastStringBuffer myStatement)
          Build and return a string consisting of an SQL 'where' clause using the current field values as criteria for the search.
protected  String buildWhereClauseBuffer(boolean useAllFields, FastStringBuffer myStatement, String dboAlias)
          Build and return a string consisting of an SQL 'where' clause using the current field values as criteria for the search.
 void clear()
          Insert the method's description here.
 int count()
          Just like find, but only retrieves the count, not the records themselves.
 int count(String expr)
          Just like find, but only retrieves the count, not the records themselves.
 boolean getAppendCustomWhereClause()
          Gets the settings of appendCustomWhereClause.
 Object getAttribute(String attribName)
          Return an "attribute".
 DBConnection getConnection()
           
 String getCustomFromClause()
          Gets the customFromClause
 String getCustomWhereClause()
          Gets the customWhereClause
 String getDataContext()
          Return the name of the context/database connection that this DB object is using.
 String getDBName()
          Return the name of the context/database connection that this DB object is using.
 DBObject getDBObject(String shortName)
          This returns the encapsulated instance of the 'model' DBObject that was provided in 'addDBObj()';

After a searchAndRetrieveList(), each MultiDBObject in the list has, encapsulated, an object of each type which was previously added as a model.

 String getField(String shortName, String fieldName)
          Get the actual DBField value specified by fieldname

Creation date: (9/18/00 11:37:10 AM)

 BigDecimal getFieldBigDecimal(String shortName, String fieldName)
          Returns a BigDecimal object author Peter Pilgrim date Wed Jul 24 19:36:37 BST 2002
 Date getFieldDate(String shortName, String fieldName)
           
 String getFieldDecimalFormatted(String shortName, String fieldName, String formatPattern)
           
 double getFieldDouble(String shortName, String fieldName)
          Returns a double object author Peter Pilgrim date Wed Jul 24 19:36:37 BST 2002
 float getFieldFloat(String shortName, String fieldName)
           
 int getFieldInt(String shortName, String fieldName)
           
 long getFieldLong(String shortName, String fieldName)
           
 int getMaxRecords()
          A DB Object can be told to only retrieve a certain number of records.
 int getOffsetRecord()
          Gets the number of records that be skipped.
 boolean getShortNameAsAlias()
          Get whether the shortName specified when a DBObject is added is also used as an alias for the table in the query.
protected  MultiDBObject getThisMultiDBObj()
          Construct a new MultiDBObject
 boolean isFieldNull(String shortName, String fieldName)
           
 List makeDirectQueryList(String sqlQuery, int fieldCount)
          Execute custom SQL query
protected  String makeLimitationStub(DBConnection theConnection)
          Creates the limitation syntax optimisation stub to embed inside the SQL command that performs search and retrieve.
 List searchAndRetrieveList()
          Search and retrieve in a particular order
 List searchAndRetrieveList(String sortKeyString)
          Search and retrieve in a particular order
 String selectFieldString(DBObject oneObj, String fieldName)
          Build an appropriate String for use in the select part of an SQL statement
 void setAppendCustomWhereClause(boolean newValue)
          Specify if the customWhereClause should be appended to a generated whereClause.
 void setAttribute(String attribName, Object attribValue)
          Set an attribute.
 void setCaseSensitiveQuery(boolean isCaseSensitiveQuery)
          This tells the buildWhereClause to either respect case (true) or ignore case (false).
 void setConnection(DBConnection connection)
           
 void setCustomFromClause(String newCustomFrom)
          Specify a custom "from" clause for the SQL used to retrieve records for this object.
 void setCustomWhereClause(String newCustomWhere)
          Specify a custom "where" clause for the SQL used to retrieve records for this object.
 void setCustomWhereClause(String newCustomWhere, boolean append)
          Specify a custom "where" clause for the SQL used to retrieve records for this object.
 void setDBName(String newOther)
          Set the database name/context for this multi db object.
 void setField(String shortName, String fieldName, String fieldValue)
          Insert the method's description here.
 void setFieldDistinct(String shortName, String fieldName, boolean flag)
          Specify a field to be retieved uniquely froma component DBObject
 void setFieldsToRetrieve(String shortName, String fieldNames)
          Specify a select list of fields to retrieve from a particular DBObject component
 void setFieldsToRetrieveToNone(String shortName)
          Specify to retrieve NO fields from a particular DBObject component

author Zaz Harris, SRI International

 void setForeignKey(String shortName, String foreignKey, String shortName2, String primaryKey)
          Insert the method's description here.
 void setInnerJoin(String leftShortName, String leftColumn, String rightShortName, String rightColumn)
          Builds a 'FROM' clause using the 'INNER JOIN' syntax.
 void setLeftJoin(String leftShortName, String leftColumn, String rightShortName, String rightColumn)
          Builds a 'FROM' clause using the 'LEFT JOIN' syntax.
 void setMaxRecords(int newMax)
          Specify a maximum number of records to be retrieved in any subsequent searchAndRetrieve() call.
 void setOffsetRecord(int newOffset)
          Specifies the number of records that should be skipped over before any data from the ResultSet is retrieved in any subsequent searchAndRetrieve() call.
 void setRightJoin(String leftShortName, String leftColumn, String rightShortName, String rightColumn)
          Builds a 'FROM' clause using the 'LEFT JOIN' syntax.
 void setSelectDistinct(boolean flag)
          Specify that the DISTINCT keyword for unique rows must be specified right after the SELECT keyword
 void setShortNameAsAlias(boolean flag)
          Specify whether the shortName specified when a DBObject is added is also used as an alias for the table in the query.
protected  void setupFields()
          Method to set up the fields for this database object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offsetRecord

protected transient int offsetRecord
The number of records we must skip over before we start reading the ResultSet proper in a searchAndRetrieve. 0 means no limit author Peter Pilgrim, Thu Jun 21 10:30:59 BST 2001


INNER_JOIN

protected static final int INNER_JOIN
Static variables for join type

See Also:
Constant Field Values

RIGHT_JOIN

protected static final int RIGHT_JOIN
See Also:
Constant Field Values

LEFT_JOIN

protected static final int LEFT_JOIN
See Also:
Constant Field Values

SHORT_NAME

protected static final String SHORT_NAME
Constant for shortName DBObject attribute

See Also:
Constant Field Values

localConnection

protected DBConnection localConnection
Local connection that we use if it's initialized, but if it's null we generate our own connection


maxRecords

protected int maxRecords
Constructor Detail

MultiDBObject

public MultiDBObject()
              throws DBException
MultiDBObject constructor. calls setupFields.


MultiDBObject

public MultiDBObject(ControllerRequest request)
              throws DBException
MultiDBObject constructor which sets dbname from request

Method Detail

getAttribute

public Object getAttribute(String attribName)
Return an "attribute". Attributes are temporary (e.g. not stored in the DBMS) values associated with this particular DB object instance.

Parameters:
attribName - The attribute name to check
Returns:
the object associated with this attribute

setAttribute

public void setAttribute(String attribName,
                         Object attribValue)
Set an attribute. Attributes are temporary (e.g. not stored in the DBMS) values associated with this particular DB object instance.

Parameters:
attribName - The name of the attribute being defined
attribValue - The object to store under this attribute name

getMaxRecords

public int getMaxRecords()
A DB Object can be told to only retrieve a certain number of records. If a "max records" value has been specified, this method provides access to it.

Returns:
The maximum number of records that should be retrieved, or zero if no max has been set

setOffsetRecord

public void setOffsetRecord(int newOffset)
                     throws DBException
Specifies the number of records that should be skipped over before any data from the ResultSet is retrieved in any subsequent searchAndRetrieve() call. Records will be skipped over (in the specified sort order) until the record counts is equal to or greater than the offset record. Specifying zero indicates that no records should be skipped over and the ResultSet immediately from the start.

Parameters:
newOffset - The maximum number of records to retrieve.
Throws:
DBException - If the max number is less than 0

author Peter Pilgrim date Tue Feb 05 23:06:38 GMT 2002


getOffsetRecord

public int getOffsetRecord()
Gets the number of records that be skipped. The offset records. A DB Object can be told to skip a certain number of records, before reading records from the ResultSet.

author Peter Pilgrim, Thu Jun 21 10:30:59 BST 2001

Returns:
The maximum number of records that should be skipped over before reading the data records.
See Also:
setOffsetRecord(int)

setCustomFromClause

public void setCustomFromClause(String newCustomFrom)
Specify a custom "from" clause for the SQL used to retrieve records for this object.

Parameters:
newCustomFrom - java.lang.String

getCustomFromClause

public String getCustomFromClause()
Gets the customFromClause

Returns:
customFromClause

buildFromClause

public boolean buildFromClause()
                        throws DBException
Build a string consisting of an SQL 'from' clause using the customFromClause, the foreign-key or the join definitions. The result will be found in property fromClause.

Returns:
true = success.

Modify by Yves Henri AMAIZO

Throws:
DBException
Since:
$DatabaseSchema $Date: 2004/11/18 02:03:27 $

count

public int count(String expr)
          throws DBException
Just like find, but only retrieves the count, not the records themselves.

Returns:
integer Count of the records matching the criteria
Throws:
DBException - If the search could not be completed

count

public int count()
          throws DBException
Just like find, but only retrieves the count, not the records themselves.

Returns:
integer Count of the records matching the criteria
Throws:
DBException - If the search could not be completed

makeLimitationStub

protected String makeLimitationStub(DBConnection theConnection)
Creates the limitation syntax optimisation stub to embed inside the SQL command that performs search and retrieve.

This method takes the limitation syntax string and performs a string replacement on the following tokens

author Peter Pilgrim, Thu Jun 21 10:30:59 BST 2001

Parameters:
theConnection - the db connection to make this stub from
Returns:
the limitation syntax stub string
See Also:
#searchAndRetrieve(), setOffsetRecord( int ), setMaxRecords( int )

addDBObj

public void addDBObj(String dbobjClassName,
                     String shortName)
              throws DBException
Add a DB Object to the objects being used for this multidbobj query. The object is specified with a full classname, then a "short" name used to refer to it in this object. For example, the class name might be com.jcorporate.expresso.services.dbobj.SchemaList, the short name might be "schema".

Parameters:
dbobjClassName - java.lang.String
shortName - java.lang.String
Throws:
DBException

addDBObj

public void addDBObj(DBObject oneDBObj,
                     String shortName)
              throws DBException
Throws:
DBException

buildWhereClause

public String buildWhereClause(boolean useAllFields)
                        throws DBException
Build and return a string consisting of an SQL 'where' clause using the current field values as criteria for the search. See setCustomWhereClause for information on specifying a more complex where clause.

Parameters:
useAllFields - True if all fields are to be used, false for only key fields
Returns:
The where clause to use in a query.
Throws:
DBException

buildWhereClauseBuffer

protected String buildWhereClauseBuffer(boolean useAllFields,
                                        FastStringBuffer myStatement)
                                 throws DBException
Build and return a string consisting of an SQL 'where' clause using the current field values as criteria for the search. See setCustomWhereClause for information on specifying a more complex where clause.

Parameters:
useAllFields - True if all fields are to be used, false for only key fields
Returns:
java.lang.String.
Throws:
DBException

buildWhereClauseBuffer

protected String buildWhereClauseBuffer(boolean useAllFields,
                                        FastStringBuffer myStatement,
                                        String dboAlias)
                                 throws DBException
Build and return a string consisting of an SQL 'where' clause using the current field values as criteria for the search. See setCustomWhereClause for information on specifying a more complex where clause.

Parameters:
useAllFields - True if all fields are to be used, false for only key fields
myStatement - Buffer for to build the new where-clause.
dboAlias - Build the where-clause for this DBObject. If empty, work with all DBObjects that are not marked to be ignored.
Returns:
java.lang.String.
Throws:
DBException

clear

public void clear()
           throws DBException
Insert the method's description here.

Creation date: (10/3/00 10:48:12 AM)

Throws:
DBException - The exception description.

getDBName

public String getDBName()
Return the name of the context/database connection that this DB object is using. If none is set, then we are using the "default" database/context.

Returns:
the name of the datacontext

getDataContext

public String getDataContext()
Return the name of the context/database connection that this DB object is using. If none is set, then we are using the "default" database/context.

Returns:
the name of the datacontext

getDBObject

public DBObject getDBObject(String shortName)
                     throws DBException
This returns the encapsulated instance of the 'model' DBObject that was provided in 'addDBObj()';

After a searchAndRetrieveList(), each MultiDBObject in the list has, encapsulated, an object of each type which was previously added as a model. Fields of this encapsulated object have been filled from whatever was retrieved. The original query object has just the original model instance.

Parameters:
shortName - the shortname of the model object
Returns:
the instance encapsulated by this MultiDBObject author Abhi
Throws:
DBException - upon error
See Also:
Creation date: (02/01/2002 9:33 AM)

getField

public String getField(String shortName,
                       String fieldName)
                throws DBException
Get the actual DBField value specified by fieldname

Creation date: (9/18/00 11:37:10 AM)

Parameters:
shortName - the shortname of the field
fieldName - name of the field to retrieve
Returns:
The value of the field/
Throws:
DBException

getFieldDecimalFormatted

public String getFieldDecimalFormatted(String shortName,
                                       String fieldName,
                                       String formatPattern)
                                throws DBException
Throws:
DBException

getFieldFloat

public float getFieldFloat(String shortName,
                           String fieldName)
                    throws DBException
Throws:
DBException

getFieldDouble

public double getFieldDouble(String shortName,
                             String fieldName)
                      throws DBException
Returns a double object author Peter Pilgrim date Wed Jul 24 19:36:37 BST 2002

Throws:
DBException

getFieldBigDecimal

public BigDecimal getFieldBigDecimal(String shortName,
                                     String fieldName)
                              throws DBException
Returns a BigDecimal object author Peter Pilgrim date Wed Jul 24 19:36:37 BST 2002

Throws:
DBException

getFieldDate

public Date getFieldDate(String shortName,
                         String fieldName)
                  throws DBException
Throws:
DBException

getFieldInt

public int getFieldInt(String shortName,
                       String fieldName)
                throws DBException
Throws:
DBException

getFieldLong

public long getFieldLong(String shortName,
                         String fieldName)
                  throws DBException
Throws:
DBException

getThisMultiDBObj

protected MultiDBObject getThisMultiDBObj()
                                   throws DBException
Construct a new MultiDBObject

Returns:
new MultiDBObject
Throws:
DBException - upon error

searchAndRetrieveList

public List searchAndRetrieveList(String sortKeyString)
                           throws DBException
Search and retrieve in a particular order

Parameters:
sortKeyString - A pipe-delimited list of key fields to sort the returned set by
Returns:
A list of new database objects retrieved by the search
Throws:
DBException - If the search could not be completed

searchAndRetrieveList

public List searchAndRetrieveList()
                           throws DBException
Search and retrieve in a particular order

Returns:
A list of new database objects retrieved by the search
Throws:
DBException - If the search could not be completed

setCaseSensitiveQuery

public void setCaseSensitiveQuery(boolean isCaseSensitiveQuery)
This tells the buildWhereClause to either respect case (true) or ignore case (false). You can call this method before doing a search and retreive if you want to match without worrying about case. For example if you where to call this method with isCaseSensitiveQuery = FALSE then this comparison would match in the search:

vendor_name actual value = "My Name"

query value = "my name"

This would match in a search and retrieve.

author Adam Rossi, PlatinumSolutions

Parameters:
isCaseSensitiveQuery - boolean

setCustomWhereClause

public void setCustomWhereClause(String newCustomWhere)
Specify a custom "where" clause for the SQL used to retrieve records for this object. The where clause 'reset' after each call to searchAndRetrieve() or other retrieval methods, so it must be set just before the call to retrieve the records is made. If no custom where clause is specified by this method, the where clause is built from the field values in the object.

DO NOT INCLUDE THE 'where' KEYWORD. Just what comes after the 'where'

Parameters:
newCustomWhere - java.lang.String

setCustomWhereClause

public void setCustomWhereClause(String newCustomWhere,
                                 boolean append)
Specify a custom "where" clause for the SQL used to retrieve records for this object. The where clause 'reset' after each call to searchAndRetrieve() or other retrieval methods, so it must be set just before the call to retrieve the records is made. If no custom where clause is specified by this method, the where clause is built from the field values in the object.

Parameters:
newCustomWhere - java.lang.String
append - true if the custom where clause is to be appended to the 'built' where clause; THIS IS DIFFERENT THAN DBObject where 'append' means to append another condition onto the custom where clause

getCustomWhereClause

public String getCustomWhereClause()
Gets the customWhereClause

Returns:
customFromClause

setAppendCustomWhereClause

public void setAppendCustomWhereClause(boolean newValue)
Specify if the customWhereClause should be appended to a generated whereClause.

Parameters:
newValue - true = append to whereClause, else overwrite it.

getAppendCustomWhereClause

public boolean getAppendCustomWhereClause()
Gets the settings of appendCustomWhereClause.

Returns:
appendCustomWhereClause

setDBName

public void setDBName(String newOther)
               throws DBException
Set the database name/context for this multi db object. If setDBName is not called, the "default" db name and context is used. See com.jcorporate.expresso.core.misc.ConfigManager for information about multiple contexts. Note that setting a db/context name only affects the object when it allocates it's own db connections - if a specific connection is used (via the setConnection(DBConnection) method) then that connection must be already associated with the correct db/context.

Parameters:
newOther - The name of the context or database to use
Throws:
DBException

setSelectDistinct

public void setSelectDistinct(boolean flag)
Specify that the DISTINCT keyword for unique rows must be specified right after the SELECT keyword

Parameters:
flag - true if DISTINCT supported right after SELECT, false (default) otherwise.

setFieldsToRetrieve

public void setFieldsToRetrieve(String shortName,
                                String fieldNames)
                         throws DBException
Specify a select list of fields to retrieve from a particular DBObject component

Parameters:
shortName - The alias for the DBObject
fieldNames - Pipe("|")-separated list of fieldnames
Throws:
DBException

setFieldsToRetrieveToNone

public void setFieldsToRetrieveToNone(String shortName)
                               throws DBException
Specify to retrieve NO fields from a particular DBObject component

author Zaz Harris, SRI International

Parameters:
shortName - The alias for the DBObject
Throws:
DBException

setFieldDistinct

public void setFieldDistinct(String shortName,
                             String fieldName,
                             boolean flag)
                      throws DBException
Specify a field to be retieved uniquely froma component DBObject

Parameters:
shortName - The alias for the DBObject
fieldName - The field to mark as unique
flag - true=distinct, flase=all matching rows
Throws:
DBException

setField

public void setField(String shortName,
                     String fieldName,
                     String fieldValue)
              throws DBException
Insert the method's description here.

Creation date: (9/18/00 11:37:10 AM)

Parameters:
shortName - the short name to set
fieldName - the fieldname to set
fieldValue - the value to set the field at.
Throws:
DBException

setForeignKey

public void setForeignKey(String shortName,
                          String foreignKey,
                          String shortName2,
                          String primaryKey)
                   throws DBException
Insert the method's description here.

Creation date: (9/18/00 11:36:28 AM)

Parameters:
shortName - java.lang.String
foreignKey - java.lang.String
shortName2 - java.lang.String
primaryKey - java.lang.String
Throws:
DBException

setInnerJoin

public void setInnerJoin(String leftShortName,
                         String leftColumn,
                         String rightShortName,
                         String rightColumn)
                  throws DBException
Builds a 'FROM' clause using the 'INNER JOIN' syntax.

Parameters:
leftShortName - short name for the left hand table.
leftColumn - name of the column from the left hand table for the JOIN condition
rightShortName - short name for the right hand table.
rightColumn - name of the column from the right hand table for the JOIN condition
Throws:
DBException

setLeftJoin

public void setLeftJoin(String leftShortName,
                        String leftColumn,
                        String rightShortName,
                        String rightColumn)
                 throws DBException
Builds a 'FROM' clause using the 'LEFT JOIN' syntax.

Parameters:
leftShortName - short name for the left hand table.
leftColumn - name of the column from the left hand table for the JOIN condition
rightShortName - short name for the right hand table.
rightColumn - name of the column from the right hand table for the JOIN condition
Throws:
DBException

setRightJoin

public void setRightJoin(String leftShortName,
                         String leftColumn,
                         String rightShortName,
                         String rightColumn)
                  throws DBException
Builds a 'FROM' clause using the 'LEFT JOIN' syntax.

Parameters:
leftShortName - short name for the left hand table.
leftColumn - name of the column from the left hand table for the JOIN condition
rightShortName - short name for the right hand table.
rightColumn - name of the column from the right hand table for the JOIN condition
Throws:
DBException

setMaxRecords

public void setMaxRecords(int newMax)
                   throws DBException
Specify a maximum number of records to be retrieved in any subsequent searchAndRetrieve() call. Records will be retrieved (in the specified sort order) until the specified maximum is reached, then the remainder of the result set is discarded. Specifying zero indicates that all records are to be retrieved.

Parameters:
newMax - The maximum number of records to retrieve.
Throws:
DBException - If the max number is less than 0

setupFields

protected void setupFields()
                    throws DBException
Method to set up the fields for this database object. If you wish to set up a MultiDBQuery ahead of time you can use this method in the inherited class to specify the objects and relationships necessary. This become something of the equivilant of a "view" in database terms.

Throws:
DBException - If there is an error setting up the fields as requested.

selectFieldString

public String selectFieldString(DBObject oneObj,
                                String fieldName)
                         throws DBException
Build an appropriate String for use in the select part of an SQL statement

Parameters:
oneObj - Database object containing the field
fieldName - The name of the field to be handled
Returns:
The portion of the select clause with the appropriate function wrapped around it
Throws:
DBException

makeDirectQueryList

public List makeDirectQueryList(String sqlQuery,
                                int fieldCount)
                         throws DBException
Execute custom SQL query

Parameters:
sqlQuery - The SQL query
fieldCount - The number of fields returned by the query
Returns:
A list of recordlists
Throws:
DBException - If the query could not be completed

assembleObject

public DBObject assembleObject(String shortName)
                        throws DBException
Deprecated. v. 5.5+; 9/04; use getDBObject() instead

(assumes retrieval from DB has occurred) assemble a given object, one retrieved by the join, getting as many fields as found into the returned object. ignores all virtual fields.

Parameters:
shortName - name of join object
Returns:
DBObject of type given by shortname
Throws:
DBException

setShortNameAsAlias

public void setShortNameAsAlias(boolean flag)
Specify whether the shortName specified when a DBObject is added is also used as an alias for the table in the query. Should be false by default.

Parameters:
flag - True if the shortName should be used as an alias

getShortNameAsAlias

public boolean getShortNameAsAlias()
Get whether the shortName specified when a DBObject is added is also used as an alias for the table in the query.

Returns:
True if short name is used as an alias for the table

getConnection

public DBConnection getConnection()
Returns:

setConnection

public void setConnection(DBConnection connection)
Parameters:
connection -

isFieldNull

public boolean isFieldNull(String shortName,
                           String fieldName)
                    throws DBException
Returns:
true if the given field is null
Throws:
DBException

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.