Compiere 3.1

org.compiere.framework
Class QueryRestriction

java.lang.Object
  extended by org.compiere.framework.QueryRestriction
All Implemented Interfaces:
Serializable

public class QueryRestriction
extends Object
implements Serializable

Query Restriction

Version:
$Id$
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
protected  boolean AndCondition
          And/Or Condition
protected  Object Code
          SQL Where Code
protected  Object Code_to
          SQL Where Code To
protected  String ColumnName
          Column Name
protected  String DirectWhereClause
          Direct Where Clause
protected  String InfoDisplay
          Info
protected  String InfoDisplay_to
          Info To
protected  String InfoName
          Name
protected  String Operator
          Operator
 
Constructor Summary
QueryRestriction(String whereClause)
          Create Restriction with direct WHERE clause
QueryRestriction(String columnName, Object code, Object code_to, String infoName, String infoDisplay, String infoDisplay_to)
          Range Restriction (BETWEEN)
QueryRestriction(String columnName, Object code, Object code_to, String infoName, String infoDisplay, String infoDisplay_to, String operator, String directWhereClause, boolean andCondition)
          Copy Constructor - Internal Use
QueryRestriction(String columnName, String operator, Object code, String infoName, String infoDisplay)
          Restriction
 
Method Summary
 String getInfoDisplayAll()
          Get Display with optional To
 String getInfoName()
          Get Info Name
 String getInfoOperator()
          Get Info Operator
 String getSQL(String tableName)
          Return SQL construct for this restriction
 void setAndCondition(boolean and)
           
 String toString()
          Get String Representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DirectWhereClause

protected String DirectWhereClause
Direct Where Clause


ColumnName

protected String ColumnName
Column Name


InfoName

protected String InfoName
Name


Operator

protected String Operator
Operator


Code

protected Object Code
SQL Where Code


InfoDisplay

protected String InfoDisplay
Info


Code_to

protected Object Code_to
SQL Where Code To


InfoDisplay_to

protected String InfoDisplay_to
Info To


AndCondition

protected boolean AndCondition
And/Or Condition

Constructor Detail

QueryRestriction

public QueryRestriction(String columnName,
                        String operator,
                        Object code,
                        String infoName,
                        String infoDisplay)
Restriction

Parameters:
columnName - ColumnName
operator - Operator, e.g. = != ..
code - Code, e.g 0, All%
infoName - Display Name
infoDisplay - Display of Code (Lookup)

QueryRestriction

public QueryRestriction(String columnName,
                        Object code,
                        Object code_to,
                        String infoName,
                        String infoDisplay,
                        String infoDisplay_to)
Range Restriction (BETWEEN)

Parameters:
columnName - ColumnName
code - Code, e.g 0, All%
code_to - Code, e.g 0, All%
infoName - Display Name
infoDisplay - Display of Code (Lookup)
infoDisplay_to - Display of Code (Lookup)

QueryRestriction

public QueryRestriction(String whereClause)
Create Restriction with direct WHERE clause

Parameters:
whereClause - SQL WHERE Clause

QueryRestriction

public QueryRestriction(String columnName,
                        Object code,
                        Object code_to,
                        String infoName,
                        String infoDisplay,
                        String infoDisplay_to,
                        String operator,
                        String directWhereClause,
                        boolean andCondition)
Copy Constructor - Internal Use

Parameters:
columnName -
code -
code_to -
infoName -
infoDisplay -
infoDisplay_to -
operator -
directWhereClause -
andCondition -
Method Detail

getSQL

public String getSQL(String tableName)
Return SQL construct for this restriction

Parameters:
tableName - optional table name
Returns:
SQL WHERE construct

toString

public String toString()
Get String Representation

Overrides:
toString in class Object
Returns:
info

getInfoName

public String getInfoName()
Get Info Name

Returns:
Info Name

getInfoOperator

public String getInfoOperator()
Get Info Operator

Returns:
info Operator

getInfoDisplayAll

public String getInfoDisplayAll()
Get Display with optional To

Returns:
info display

setAndCondition

public void setAndCondition(boolean and)

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.