Class DBOrderByExpr

java.lang.Object
org.apache.empire.db.DBObject
org.apache.empire.db.DBExpr
org.apache.empire.db.expr.order.DBOrderByExpr

public class DBOrderByExpr extends DBExpr
  • Field Details

    • expr

      protected final DBColumnExpr expr
    • desc

      protected boolean desc
  • Constructor Details

    • DBOrderByExpr

      public DBOrderByExpr(DBColumnExpr expr, boolean desc)
      Construct a new DBOrderByInfo object set the specified parameters to this object.
      Parameters:
      expr - the column
      desc - set true for descending or false for ascending
  • Method Details

    • getColumn

      public DBColumnExpr getColumn()
    • isDescending

      public boolean isDescending()
    • setDescending

      public void setDescending(boolean descending)
    • 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
    • addReferencedColumns

      public void addReferencedColumns(Set<DBColumn> list)
      Description copied from class: DBExpr
      Internal function to obtain all DBColumnExpr-objects used by this expression.
      Specified by:
      addReferencedColumns in class DBExpr
      Parameters:
      list - list to which all used column expressions must be added
    • addSQL

      public void addSQL(DBSQLBuilder sql, long context)
      Adds a column expression to the orderBy clause followed by the desc keyword if the order should be descending
      Specified by:
      addSQL in class DBExpr
      Parameters:
      sql - the SQL-Command
      context - the current SQL-Command context