C# Class Azavea.Open.DAO.Criteria.Joins.DaoJoinCriteria

This class defines how to join two FastDAOs together.
Datei anzeigen Open project: azavea/net-dao Class Usage Examples

Public Properties

Property Type Description
BoolType BooleanOperator
Expressions List
LeftCriteria DaoCriteria
Limit int
Orders List
RightCriteria DaoCriteria
Start int
TypeOfJoin JoinType

Protected Properties

Property Type Description
_log log4net.ILog

Public Methods

Method Description
Clear ( ) : void

Completely clears the object so that it may be used over again.

DaoJoinCriteria ( ) : System

Constructs a blank inner join criteria, which will return all records unless you customize it. All expressions added to it will be ANDed together.

DaoJoinCriteria ( BooleanOperator howToAddExpressions ) : System

Constructs a blank inner join criteria, which will return all records unless you customize it.

DaoJoinCriteria ( IJoinExpression firstExpr ) : System

Constructs an inner join criteria with one expression. May be handy for cases where you only need one expression.

DaoJoinCriteria ( IJoinExpression firstExpr, BooleanOperator howToAddExpressions ) : System

Constructs an inner join criteria with one expression.

DaoJoinCriteria ( JoinType typeOfJoin ) : System

Constructs a blank criteria, which will return all records unless you customize it. All expressions added to it will be ANDed together.

DaoJoinCriteria ( JoinType typeOfJoin, BooleanOperator howToAddExpressions ) : System

Constructs a blank criteria, which will return all records unless you customize it.

DaoJoinCriteria ( JoinType typeOfJoin, IJoinExpression firstExpr ) : System

Constructs a criteria with one expression. May be handy for cases where you only need one expression.

DaoJoinCriteria ( JoinType typeOfJoin, IJoinExpression firstExpr, BooleanOperator howToAddExpressions ) : System

Constructs a criteria with one expression.

Flip ( ) : DaoJoinCriteria

For some implementations, it's simpler to only implement one-sided joins. So to handle right (or left) joins, you want to flip the criteria so the right and left daos are swapped and you can do a left (or right) join instead.

ToString ( ) : string

Returns a T:System.String that represents the current T:System.Object.

Method Details

Clear() public method

Completely clears the object so that it may be used over again.
public Clear ( ) : void
return void

DaoJoinCriteria() public method

Constructs a blank inner join criteria, which will return all records unless you customize it. All expressions added to it will be ANDed together.
public DaoJoinCriteria ( ) : System
return System

DaoJoinCriteria() public method

Constructs a blank inner join criteria, which will return all records unless you customize it.
public DaoJoinCriteria ( BooleanOperator howToAddExpressions ) : System
howToAddExpressions BooleanOperator How expressions will be added together. Determines /// if we do exp1 AND exp2 AND exp3, or if we do /// exp1 OR exp2 OR exp3.
return System

DaoJoinCriteria() public method

Constructs an inner join criteria with one expression. May be handy for cases where you only need one expression.
public DaoJoinCriteria ( IJoinExpression firstExpr ) : System
firstExpr IJoinExpression The first expression to add.
return System

DaoJoinCriteria() public method

Constructs an inner join criteria with one expression.
public DaoJoinCriteria ( IJoinExpression firstExpr, BooleanOperator howToAddExpressions ) : System
firstExpr IJoinExpression The first expression to add.
howToAddExpressions BooleanOperator How expressions will be added together. Determines /// if we do exp1 AND exp2 AND exp3, or if we do /// exp1 OR exp2 OR exp3.
return System

DaoJoinCriteria() public method

Constructs a blank criteria, which will return all records unless you customize it. All expressions added to it will be ANDed together.
public DaoJoinCriteria ( JoinType typeOfJoin ) : System
typeOfJoin JoinType Is this an inner join, left join, etc.
return System

DaoJoinCriteria() public method

Constructs a blank criteria, which will return all records unless you customize it.
public DaoJoinCriteria ( JoinType typeOfJoin, BooleanOperator howToAddExpressions ) : System
typeOfJoin JoinType Is this an inner join, left join, etc.
howToAddExpressions BooleanOperator How expressions will be added together. Determines /// if we do exp1 AND exp2 AND exp3, or if we do /// exp1 OR exp2 OR exp3.
return System

DaoJoinCriteria() public method

Constructs a criteria with one expression. May be handy for cases where you only need one expression.
public DaoJoinCriteria ( JoinType typeOfJoin, IJoinExpression firstExpr ) : System
typeOfJoin JoinType Is this an inner join, left join, etc.
firstExpr IJoinExpression The first expression to add.
return System

DaoJoinCriteria() public method

Constructs a criteria with one expression.
public DaoJoinCriteria ( JoinType typeOfJoin, IJoinExpression firstExpr, BooleanOperator howToAddExpressions ) : System
typeOfJoin JoinType Is this an inner join, left join, etc.
firstExpr IJoinExpression The first expression to add.
howToAddExpressions BooleanOperator How expressions will be added together. Determines /// if we do exp1 AND exp2 AND exp3, or if we do /// exp1 OR exp2 OR exp3.
return System

Flip() public method

For some implementations, it's simpler to only implement one-sided joins. So to handle right (or left) joins, you want to flip the criteria so the right and left daos are swapped and you can do a left (or right) join instead.
public Flip ( ) : DaoJoinCriteria
return DaoJoinCriteria

ToString() public method

Returns a T:System.String that represents the current T:System.Object.
public ToString ( ) : string
return string

Property Details

BoolType public_oe property

Whether this is an "AND" criteria or an "OR" criteria.
public BooleanOperator BoolType
return BooleanOperator

Expressions public_oe property

The individual expressions that make up this criteria, defaults to empty.
public List Expressions
return List

LeftCriteria public_oe property

These are the criteria applied to the left DAO's records by themselves. I.E. only return rows where left.field == 5.
public DaoCriteria LeftCriteria
return DaoCriteria

Limit public_oe property

Used to limit the data returned, only data rows Start to Start + Limit will be returned. A value of -1 means ignore this parameter.
public int Limit
return int

Orders public_oe property

The list of properties to sort on, defaults to empty.
public List Orders
return List

RightCriteria public_oe property

These are the criteria applied to the right DAO's records by themselves. I.E. only return rows where right.field is not null.
public DaoCriteria RightCriteria
return DaoCriteria

Start public_oe property

Used to limit the data returned, only data rows Start to Start + Limit will be returned. A value of -1 means ignore this parameter.
public int Start
return int

TypeOfJoin public_oe property

Whether this is an inner join, left join, etc.
public JoinType TypeOfJoin
return JoinType

_log protected_oe static_oe property

log4net logger for logging any appropriate messages.
protected static ILog,log4net _log
return log4net.ILog