Class DBCommand

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
DBCommandHSql, DBCommandOracle, DBCommandPostgres, DBMSHandlerBase.DBMSCommand, DBMSHandlerH2.DBCommandH2, DBMSHandlerMSSQL.DBCommandMSSQL, DBMSHandlerMySQL.DBCommandMySQL, DBMSHandlerSQLite.DBCommandSQLite

public abstract class DBCommand extends DBCommandExpr implements Cloneable
This abstract class handles the creation of the SQL-Commands. There are methods to create SQL-Commands, like update, insert, delete and select.
  • Field Details

  • Constructor Details

    • DBCommand

      protected DBCommand(DBMSHandler dbms, boolean autoPrepareStmt, DBCmdParamList cmdParams)
      Constructs a new DBCommand object and set the specified DBDatabase object.
      Parameters:
      dbms - the database handler
      autoPrepareStmt - flag whether to automatically use literal values as prepared statement params
      cmdParams - the command params list
    • DBCommand

      protected DBCommand(DBMSHandler dbms, boolean autoPrepareStmt)
      Constructs a new DBCommand object and set the specified DBDatabase object.
      Parameters:
      dbms - the database handler
      autoPrepareStmt - flag whether to automatically use literal values as prepared statement params
  • Method Details

    • createSQLBuilder

      protected DBSQLBuilder createSQLBuilder(String initalSQL)
      Description copied from class: DBCommandExpr
      creates a new DBSQLBuilder
      Overrides:
      createSQLBuilder in class DBCommandExpr
      Parameters:
      initalSQL - the initial sql fragment
      Returns:
      the new DBSQLBuilder
    • isAutoPrepareStmt

      public final boolean isAutoPrepareStmt()
      Returns:
      true if auto Prepared Statements is activated for this record
    • clone

      public DBCommand clone()
      Creates a clone of this class.
      Overrides:
      clone in class DBCommandExpr
    • getDatabase

      public final DBDatabase getDatabase()
      Description copied from class: DBObject
      Returns the database object to which this object belongs to. For the database object itself this function will return the this pointer.
      Specified by:
      getDatabase in class DBObject
      Returns:
      the database object
    • getParams

      public DBCmdParams getParams()
      Specified by:
      getParams in class DBCommandExpr
    • resetParamUsage

      protected void resetParamUsage()
      internally used to reset the command param usage count. Note: Only one thread my generate an SQL statement
    • completeParamUsage

      protected void completeParamUsage()
      internally used to remove unused Command Params from list Note: Only one thread my generate an SQL statement
    • removeCommandParams

      protected void removeCommandParams(DBCompareExpr cmpExpr)
      internally used to remove the command param used in a constraint
      Parameters:
      cmpExpr - the compare expression
    • removeAllCommandParams

      protected void removeAllCommandParams(List<DBCompareExpr> list)
      internally used to remove all command params used in a list of constraints
      Parameters:
      list - the list of compare expressions
    • setParentTables

      public void setParentTables(DBRowSet... rowSets)
      Set parent tables for subquery command generation. Parent tables will be omitted to the FROM clause.
      Parameters:
      rowSets - the parent rowsets
    • isValid

      public boolean isValid()
      Returns true if the this command has either Select or Set expressions
      Specified by:
      isValid in class DBCommandExpr
    • selectDistinct

      public DBCommand selectDistinct()
      Sets whether or not the select statement should contain the distinct directive .
      Returns:
      itself (this)
    • isSelectDistinct

      public boolean isSelectDistinct()
      Returns whether or not the select statement will be distinct or not.
      Returns:
      true if the select will contain the distinct directive or false otherwise.
    • hasSelectExpr

      public boolean hasSelectExpr()
      returns whether or not the command has any select expression
      Specified by:
      hasSelectExpr in class DBCommandExpr
      Returns:
      true if the command has any select expression of false otherwise
    • hasSelectExpr

      public boolean hasSelectExpr(DBColumnExpr expr)
      returns whether or not the command has a specific select expression
      Specified by:
      hasSelectExpr in class DBCommandExpr
      Parameters:
      expr - the column expr
      Returns:
      true if the command contains the given select expression of false otherwise
    • getDataType

      public DataType getDataType()
      Description copied from class: DBCommandExpr
      Returns the DataType selected by this command if only one column is returned If the command has more than one select expression DataType.UNKNOWN will be returned
      Specified by:
      getDataType in class DBCommandExpr
      Returns:
      the DataType of the selected expression or DataType.UNKNOWN
    • select

      public DBCommand select(DBColumnExpr expr)
      Adds a DBColumnExpr object to the Select collection
      Parameters:
      expr - the DBColumnExpr object
      Returns:
      itself (this)
    • select

      public final DBCommand select(DBColumnExpr... exprs)
      Adds a list of columns to the select phrase of an sql statement.
      Parameters:
      exprs - an vararg of DBColumnExpr's to select
      Returns:
      itself (this)
    • select

      public final DBCommand select(Collection<? extends DBColumnExpr> columns)
      Adds a collection of columns to the select phrase of an sql statement.
      Parameters:
      columns - the column expressions to add
      Returns:
      itself (this)
    • selectSetExpressions

      public final DBCommand selectSetExpressions(List<DBSetExpr> setExprList)
      Selects all set expressions i.e. converts all calls like cmd.set(COL.to(VALUE)) into a select of the form cmd.select(VALUE.as(COL))
      Parameters:
      setExprList - the list of set expressions to select
      Returns:
      itself (this)
    • selectSetExpressions

      public final DBCommand selectSetExpressions()
      Selects all set expressions that have been set for this command
      Returns:
      itself (this)
    • selectQualified

      public DBCommand selectQualified(DBColumnExpr... columns)
      Adds a list of columns with their qualified name to the select phrase of an sql statement.
      Parameters:
      columns - one or more columns to select
      Returns:
      itself (this)
    • selectQualified

      public final DBCommand selectQualified(Collection<? extends DBColumnExpr> columns)
      Adds a collection of columns to the select phrase of an sql statement.
      Parameters:
      columns - the column expressions to add
      Returns:
      itself (this)
    • qualifyAll

      public DBCommand qualifyAll()
      Makes sure all selected columns are identified by their proper names (qualified)
      Returns:
      itself (this)
    • getSelectExprList

      public DBColumnExpr[] getSelectExprList()
      Returns an array of all select expressions
      Specified by:
      getSelectExprList in class DBCommandExpr
      Returns:
      an array of all DBColumnExpr objects or null if there is nothing to select
    • getSelectExpressions

      public List<DBColumnExpr> getSelectExpressions()
      Returns all select expressions as unmodifiable list
      Specified by:
      getSelectExpressions in class DBCommandExpr
      Returns:
      the list of DBColumnExpr used for select
    • replaceSelect

      public void replaceSelect(DBColumnExpr replExpr, DBColumnExpr replWith)
      replaces a select expression with another or removes a select expression In order to remove the expression, set the replWith parameter to null If the replace expression is not found, an ItemNotFoundException is thrown
      Parameters:
      replExpr - the expression to replace
      replWith - the expression to replace with
    • removeSelect

      public void removeSelect(DBColumnExpr... exprs)
      removes one or more expressions from the Select expression list
      Parameters:
      exprs - the expression(s) to be removed
    • hasAggegation

      public boolean hasAggegation()
      Checks whether or not there are any aggregate functions in the Select
      Returns:
      true if at least on of the selected expressions is an aggregate
    • set

      public DBCommand set(DBSetExpr expr)
      Adds a single set expressions to this command Use column.to(...) to create a set expression
      Parameters:
      expr - the DBSetExpr object(s)
      Returns:
      itself (this)
    • set

      public final DBCommand set(DBSetExpr... exprs)
      Adds a list of set expressions to this command Use column.to(...) to create a set expression
      Parameters:
      exprs - the DBSetExpr object(s)
      Returns:
      itself (this)
    • hasSetExpr

      public boolean hasSetExpr()
      Returns whether or not the command has group by set
      Returns:
      true if at least one set expression is present
    • hasSetExprOn

      protected boolean hasSetExprOn(DBColumn column)
      Checks whether a column is in the list of set expressions
      Parameters:
      column - the column to check
      Returns:
      true if there is a set expression
    • getSetExpressions

      public List<DBSetExpr> getSetExpressions()
      Returns all set expressions as unmodifiable list
      Returns:
      the list of DBSetExpr used for set
    • addParam

      public DBCmdParam addParam(DataType type, Object value)
      Adds an command parameter which will be used in a prepared statement. The command parameter returned may be used to alter the value.
      Parameters:
      type - the data type of the parameter
      value - the initial parameter value
      Returns:
      the command parameter object
    • addParam

      public final DBCmdParam addParam(DBColumnExpr colExpr, Object value)
      Adds an command parameter which will be used in a prepared statement. The initial value of the command parameter is null but can be modified using the setValue method.
      Parameters:
      colExpr - the column expression for which to create the parameter
      value - the initial parameter value
      Returns:
      the command parameter object
    • addParam

      public final DBCmdParam addParam(Object value)
      Adds an command parameter which will be used in a prepared statement. The initial value of the command parameter is null but can be modified using the setValue method.
      Parameters:
      value - the initial value of the added param
      Returns:
      the command parameter object
    • addParam

      public final DBCmdParam addParam()
      Adds an command parameter which will be used in a prepared statement. The initial value of the command parameter is null but can be modified using the setValue method.
      Returns:
      the command parameter object
    • join

      public DBCommand join(DBJoinExpr join)
      Adds a join to the list of join expressions.
      Parameters:
      join - the join expression
      Returns:
      itself (this)
    • join

      public final DBCommand join(DBJoinExpr join, DBJoinType joinType)
      Adds a join to the list of join expressions.
      Parameters:
      join - the join expression
      joinType - the type of join
      Returns:
      itself (this)
    • joinLeft

      public final DBCommand joinLeft(DBJoinExpr join)
      Adds a left join to the list of join expressions.
      Parameters:
      join - the join expression
      Returns:
      itself (this)
    • joinRight

      public final DBCommand joinRight(DBJoinExpr join)
      Adds a left join to the list of join expressions.
      Parameters:
      join - the join expression
      Returns:
      itself (this)
    • join

      public final DBCommand join(DBColumnExpr left, DBColumn right, DBCompareExpr... addlConstraints)
      Adds an inner join based on two columns to the list of join expressions. New in release 3.1: Use join(left.on(right).and(addlConstraint)) instead
      Parameters:
      left - the left join value
      right - the right join
      addlConstraints - additional compare expressions
      Returns:
      itself (this)
    • joinLeft

      public final DBCommand joinLeft(DBColumnExpr left, DBColumn right, DBCompareExpr... addlConstraints)
      Adds a left join based on two columns to the list of join expressions. New in release 3.1: Use joinLeft(left.on(right).and(addlConstraint)) instead
      Parameters:
      left - the left join value
      right - the right join
      addlConstraints - additional compare expressions
      Returns:
      itself (this)
    • joinRight

      public final DBCommand joinRight(DBColumnExpr left, DBColumn right, DBCompareExpr... addlConstraints)
      Adds a right join based on two columns to the list of join expressions. New in release 3.1: Use joinRight(left.on(right).and(addlConstraint)) instead
      Parameters:
      left - the left join value
      right - the right join
      addlConstraints - additional compare expressions
      Returns:
      itself (this)
    • join

      public final DBCommand join(DBColumnExpr left, DBColumn right, DBJoinType joinType, DBCompareExpr... addlConstraints)
      Adds a join based on two columns to the list of join expressions. Migration hint from 2.x: replace ").where(" with just ","
      Parameters:
      left - the left join value
      right - the right join
      joinType - type of join (DBJoinType.INNER, DBJoinType.LEFT, DBJoinType.RIGHT)
      addlConstraints - additional compare expressions
      Returns:
      itself (this)
    • join

      public final DBCommand join(DBColumn[] left, DBColumn[] right, DBJoinType joinType, DBCompareExpr... addlConstraints)
      Multi-Column version of column based join expression
      Parameters:
      left - the columsn on the left
      right - the columns on the right
      joinType - the joinType
      addlConstraints - additional compare expressions
      Returns:
      itself (this)
    • join

      public final DBCommand join(DBRowSet left, DBRowSet right)
      Adds a cross join for two tables or views New in release 3.1: Use left.on(right)) instead
      Parameters:
      left - the left RowSet
      right - the right RowSet
      Returns:
      itself (this)
    • join

      public final DBCommand join(DBRowSet rowset, DBCompareExpr cmp, DBJoinType joinType)
      Adds a join based on a compare expression to the command. New in release 3.1: Use joinLeft(rowset.on(cmp)) instead
      Parameters:
      rowset - table or view to join
      cmp - the compare expression with which to join the table
      joinType - type of join (DBJoinType.INNER, DBJoinType.LEFT, DBJoinType.RIGHT)
      Returns:
      itself (this)
    • join

      public final DBCommand join(DBRowSet rowset, DBCompareExpr cmp)
      Adds an inner join based on a compare expression to the command. New in release 3.1: Use rowset.on(cmp) instead
      Parameters:
      rowset - table of view which to join
      cmp - the compare expression with wich to join the table
      Returns:
      itself (this)
    • addJoins

      public void addJoins(List<DBJoinExpr> joinExprList)
      Adds a list of join expressions to the command.
      Parameters:
      joinExprList - list of join expressions
    • getJoins

      public List<DBJoinExpr> getJoins()
      Returns a copy of the defined joins.
      Returns:
      the list of joins
    • hasJoinOn

      public boolean hasJoinOn(DBRowSet rowset)
      Returns true if the command has a join on the given table or false otherwise.
      Parameters:
      rowset - rowset table or view to join
      Returns:
      true if the command has a join on the given table or false otherwise
    • hasJoinOn

      public boolean hasJoinOn(DBColumn column)
      Returns true if the command has a join on the given column or false otherwise.
      Parameters:
      column - the column to test
      Returns:
      true if the command has a join on the given column or false otherwise
    • removeJoinsOn

      public boolean removeJoinsOn(DBRowSet rowset)
      removes all joins to a given table or view
      Parameters:
      rowset - the table or view for which to remove all joins
      Returns:
      true if any joins have been removed or false otherwise
    • removeJoinsOn

      public boolean removeJoinsOn(DBColumn column)
      removes all joins to a given column
      Parameters:
      column - the column for which to remove all joins
      Returns:
      true if any joins have been removed or false otherwise
    • where

      public DBCommand where(DBCompareExpr expr)
      Adds a constraint to the where phrase of the sql statement If another restriction already exists for the same column it will be replaced.
      Parameters:
      expr - the DBCompareExpr object
      Returns:
      itself (this)
    • where

      public final DBCommand where(DBCompareExpr... exprs)
      Adds a list of constraints to the where phrase of the sql statement If another restriction already exists for the same column it will be replaced.
      Parameters:
      exprs - the DBCompareExpr object
      Returns:
      itself (this)
    • hasWhereConstraints

      public boolean hasWhereConstraints()
      Returns true if the command has constraints or false if not.
      Returns:
      true if constraints have been set on the command
    • getWhereConstraints

      public List<DBCompareExpr> getWhereConstraints()
      Returns a copy of the defined where clauses.
      Returns:
      vector of where clauses
    • removeWhereConstraint

      public boolean removeWhereConstraint(DBCompareExpr cmpExpr)
      removes a constraint on a particular column from the where clause
      Parameters:
      cmpExpr - the compare expression which to remove
      Returns:
      true if the constraint was removed
    • removeWhereConstraintOn

      public DBCompareExpr removeWhereConstraintOn(DBColumnExpr col)
      removes a constraint on a particular column from the where clause
      Parameters:
      col - the column expression for which to remove the constraint
      Returns:
      the constraint on the given column if present or null otherwise
    • hasWhereConstraintOn

      public boolean hasWhereConstraintOn(DBColumnExpr col)
      Checks whether the command has a constraint on a particular column expression
      Parameters:
      col - the column expression which to check
      Returns:
      true if a where constraint for the given column exists
    • addWhereConstraints

      public void addWhereConstraints(List<DBCompareExpr> constraints)
      Adds a list of constraints to the command.
      Parameters:
      constraints - list of constraints
    • addKeyConstraints

      public void addKeyConstraints(DBRowSet rowset, RecordData data)
      Adds key constraints the command
      Parameters:
      rowset - the rowset for which to add constraints
      data - the record data from which to take the key values
    • having

      public DBCommand having(DBCompareExpr expr)
      adds a constraint to the having clause.
      Parameters:
      expr - the DBCompareExpr object
      Returns:
      itself (this)
    • hasHavingConstraints

      public boolean hasHavingConstraints()
      Returns true if the command has having-constraints or false if not.
      Returns:
      true if constraints have been set on the command
    • getHavingConstraints

      public List<DBCompareExpr> getHavingConstraints()
      Returns a copy of the defined having clauses.
      Returns:
      list of having constraints
    • removeHavingConstraint

      public boolean removeHavingConstraint(DBCompareExpr cmpExpr)
      removes a constraint on a particular column from the where clause
      Parameters:
      cmpExpr - the compare expression which to remove
      Returns:
      true if the constraint was removed
    • removeHavingConstraintOn

      public DBCompareExpr removeHavingConstraintOn(DBColumnExpr col)
      removes a constraint on a particular column from the having clause
      Parameters:
      col - the column expression for which to remove the constraint
      Returns:
      the constraint on the given column if present or null otherwise
    • hasHavingConstraintOn

      public boolean hasHavingConstraintOn(DBColumnExpr col)
      Checks whether the command has a constraint on a particular column expression
      Parameters:
      col - the column expression which to check
      Returns:
      true if a having constraint for the given column exists
    • hasConstraintOn

      public boolean hasConstraintOn(DBRowSet rowset)
      Returns true if the command has a constraint on the given table or false otherwise.
      Parameters:
      rowset - rowset table or view to join
      Returns:
      true if the command has a join on the given table or false otherwise
    • hasGroupBy

      public boolean hasGroupBy()
      Returns whether or not the command has group by set
      Returns:
      true if a group by expression exists
    • getGroupBy

      public List<DBColumnExpr> getGroupBy()
      Returns a copy of the defined where clauses.
      Returns:
      vector of where clauses
    • groupBy

      public DBCommand groupBy(DBColumnExpr columnExpr)
      Adds a column expression to the Group By clause of an sql statement.
      Parameters:
      columnExpr - the column expression
      Returns:
      itself (this)
    • groupBy

      public final DBCommand groupBy(DBColumnExpr... exprs)
      Adds a list of columns to the Group By clause of an sql statement.
      Parameters:
      exprs - vararg of columns by which to group the rows
      Returns:
      itself (this)
    • groupBy

      public final DBCommand groupBy(Collection<? extends DBColumnExpr> columns)
      Adds a collection of columns to the Group By clause of an sql statement.
      Parameters:
      columns - the column expressions to add
      Returns:
      itself (this)
    • groupAll

      public final DBCommand groupAll()
      Adds all select expressions which are not aggregates to the Group By clause
      Returns:
      itself (this)
    • clearSelectDistinct

      public void clearSelectDistinct()
      Clears the select distinct option.
    • clearSelect

      public void clearSelect()
      Clears the list of selected columns.
    • clearSet

      public void clearSet()
      Clears the Set clause
    • clearJoin

      public void clearJoin()
      Clears the From / Join clause
    • clearWhere

      public void clearWhere()
      Removes all constraints from the Where clause
    • clearHaving

      public void clearHaving()
      Removes all constraints from the Having clause
    • clearGroupBy

      public void clearGroupBy()
      Clears the Group By clause
    • orderBy

      public DBCommand orderBy(DBOrderByExpr... exprs)
      Overridden to change return type from DBCommandExpr to DBCommand
      Overrides:
      orderBy in class DBCommandExpr
      Parameters:
      exprs - vararg of orderBy expressions
      Returns:
      itself (this)
      See Also:
    • orderBy

      public DBCommand orderBy(DBColumnExpr... exprs)
      Overridden to change return type from DBCommandExpr to DBCommand
      Overrides:
      orderBy in class DBCommandExpr
      Parameters:
      exprs - vararg of order by expressions
      Returns:
      itself (this)
      See Also:
    • orderBy

      public DBCommand orderBy(DBColumnExpr expr, boolean desc)
      Overridden to change return type from DBCommandExpr to DBCommand
      Overrides:
      orderBy in class DBCommandExpr
      Parameters:
      expr - the expression for ordering
      desc - if true, the results from select statement will sort top down
      Returns:
      itself (this)
      See Also:
    • orderByUpper

      public DBCommand orderByUpper(DBColumnExpr expr, boolean desc)
      Overridden to change return type from DBCommandExpr to DBCommand
      Overrides:
      orderByUpper in class DBCommandExpr
      Parameters:
      expr - the expression for ordering
      desc - if true, the results from select statement will sort top down
      Returns:
      itself (this)
      See Also:
    • orderByUpper

      public DBCommand orderByUpper(DBColumnExpr... expr)
      Overridden to change return type from DBCommandExpr to DBCommand
      Overrides:
      orderByUpper in class DBCommandExpr
      Parameters:
      expr - vararg of order by expressions
      Returns:
      itself (this)
      See Also:
    • limitRows

      public DBCommand limitRows(int limitRows)
      Overridden to change return type from DBCommandExpr to DBCommand
      Overrides:
      limitRows in class DBCommandExpr
      Parameters:
      limitRows - the number of rows to limit
      Returns:
      itself (this)
    • skipRows

      public DBCommand skipRows(int skipRows)
      Overridden to change return type from DBCommandExpr to DBCommand
      Overrides:
      skipRows in class DBCommandExpr
      Parameters:
      skipRows - the number of rows to skip
      Returns:
      itself (this)
    • clear

      public void clear()
      Clears the entire command object.
    • isPreparedStatementsEnabled

      protected boolean isPreparedStatementsEnabled()
      returns true if prepared statements are enabled for this command
      Returns:
      true if prepared statements are enabled for this command
    • useCmdParam

      protected boolean useCmdParam(DBColumnExpr col, Object value)
      returns true if a cmdParam should be used for the given column or false otherwise
      Parameters:
      col - the column expression
      value - the parameter value
      Returns:
      true if a cmdParam should be used for the given column
    • setConstraint

      protected void setConstraint(List<DBCompareExpr> list, DBCompareExpr expr)
      adds a constraint to the 'where' or 'having' collections
      Parameters:
      list - the 'where' or 'having' list
      expr - the DBCompareExpr object
    • removeConstraint

      protected boolean removeConstraint(List<DBCompareExpr> list, DBCompareExpr cmpExpr)
      removes a constraint on a particular column to the 'where' or 'having' collections
      Parameters:
      list - the 'where' or 'having' list
      cmpExpr - the compare expression which to remove
      Returns:
      true if the constraint was removed
    • removeConstraintOn

      protected DBCompareExpr removeConstraintOn(List<DBCompareExpr> list, DBColumnExpr colExpr)
      removes a constraint on a particular column to the 'where' or 'having' collections
      Parameters:
      list - the 'where' or 'having' list
      colExpr - the column expression for which to remove the constraint
      Returns:
      the removed constraint
    • findConstraintOn

      protected DBCompareExpr findConstraintOn(List<DBCompareExpr> list, DBColumnExpr colExpr)
      finds a constraint on a particular column to the 'where' or 'having' collections
      Parameters:
      list - the 'where' or 'having' list
      colExpr - the column expression for which to remove the constraint
      Returns:
      the constraint for the given column or null if not found
    • getRowSetList

      protected List<DBRowSet> getRowSetList()
      Gets a list of all tables referenced by the query.
      Returns:
      list of all rowsets (tables or views) used by the query
    • addReferencedColumns

      public void addReferencedColumns(Set<DBColumn> list)
      Adds Columns
      Specified by:
      addReferencedColumns in class DBExpr
      Parameters:
      list - list to which all used column expressions must be added
    • getParamValues

      public Object[] getParamValues()
      Returns an array of parameter values for a prepared statement. The parameters are supplied only after getSelect(), getUpdate(), getInsert() or getDelete() have been called
      Specified by:
      getParamValues in class DBCommandExpr
      Returns:
      an array of parameter values for a prepared statement
    • getSelect

      public void getSelect(DBSQLBuilder sql, int flags)
      Creates a select SQL-Statement
      Specified by:
      getSelect in class DBCommandExpr
      Parameters:
      sql - the sql builder to add the command to
      flags - bitwise context flags for sql building (see "Select Context Flags")
    • getInsert

      public String getInsert()
      Creates an insert SQL-Statement
      Returns:
      an insert SQL-Statement
    • appendCompareColExprs

      protected void appendCompareColExprs(DBRowSet table, DBCompareExpr expr, List<DBCompareColExpr> list)
      Appends all nested DBCompareColExpr for a particular RowSet to a list
      Parameters:
      table - the rowset for which to collect the DBCompareColExpr
      expr - a compare expression
      list - the list of compare expressions
    • getUpdate

      public final String getUpdate()
      Creates an update SQL-Statement
      Returns:
      an update SQL-Statement
    • addUpdateForTable

      protected void addUpdateForTable(DBSQLBuilder sql, DBRowSet table)
    • addUpdateWithJoins

      protected void addUpdateWithJoins(DBSQLBuilder sql, DBRowSet table)
    • getDelete

      public final String getDelete(DBTable table)
      Creates a delete SQL-Statement
      Parameters:
      table - the table object
      Returns:
      a delete SQL-Statement
    • addDeleteForTable

      protected void addDeleteForTable(DBSQLBuilder sql, DBRowSet table)
    • addDeleteWithJoins

      protected void addDeleteWithJoins(DBSQLBuilder sql, DBRowSet table)
    • addSelect

      protected void addSelect(DBSQLBuilder sql)
    • addFrom

      protected void addFrom(DBSQLBuilder sql)
    • addWhere

      protected void addWhere(DBSQLBuilder sql, long context)
    • addWhere

      protected final void addWhere(DBSQLBuilder sql)
    • addGrouping

      protected void addGrouping(DBSQLBuilder sql)
    • addOrder

      protected void addOrder(DBSQLBuilder sql)