net.sf.webmancer.db
Class Query

java.lang.Object
  extended by net.sf.webmancer.db.Query
All Implemented Interfaces:
IQuery, IRestrictable

public class Query
extends java.lang.Object
implements IQuery

Author:
Michal Burda

Constructor Summary
Query(IDatabaseOperationPerformer performer)
          Constructs the AbstractQuery.
 
Method Summary
 void addAttribute(IAttribute attribute)
           
protected  void callRestrictors(RestrictionType type)
           
 long delete()
           
protected  java.util.Map<java.lang.String,IAttribute> getAttributes()
          Returns the attributes.
protected  java.util.List<ICondition> getConditions()
          Returns the conditions.
protected  long getLimit()
          Returns the limit.
protected  long getOffset()
          Returns the offset.
protected  IAttribute getOrderingAttribute()
          Returns the ordering attribute.
 void insert(IData data)
           
 void insert(java.util.Map<IAttribute,ICell> row)
           
protected  boolean isOrderingAscending()
          Returns the orderingIsAscending.
 long queryCount()
           
 IData queryResult()
           
 void registerRestrictor(IRestrictor restrictor)
           
 void restrictByCondition(ICondition condition)
           
 void restrictLimit(long limit)
           
 void restrictOffset(long offset)
           
 void restrictOrdering(IAttribute attribute, boolean ascending)
           
 void setAttributes(java.util.Map<java.lang.String,IAttribute> attributes)
          Sets the attributes.
 void setConditions(java.util.List<ICondition> conditions)
          Sets the conditions.
 void setLimit(long limit)
          Sets the limit.
 void setOffset(long offset)
          Sets the offset.
 void setOrderingAscending(boolean ascending)
          Sets the orderingIsAscending.
 void setOrderingAttribute(IAttribute attribute)
          Sets the ordering attribute.
 long update(java.util.Map<IAttribute,ICell> row)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Query

public Query(IDatabaseOperationPerformer performer)
Constructs the AbstractQuery.

Method Detail

addAttribute

public void addAttribute(IAttribute attribute)
Specified by:
addAttribute in interface IQuery
See Also:
IQuery.addAttribute(net.sf.webmancer.db.IAttribute)

queryCount

public long queryCount()
Specified by:
queryCount in interface IQuery
Returns:
See Also:
IQuery.queryCount()

queryResult

public IData queryResult()
Specified by:
queryResult in interface IQuery
Returns:
See Also:
IQuery.queryResult()

delete

public long delete()
Specified by:
delete in interface IQuery
Returns:
See Also:
IQuery.delete()

update

public long update(java.util.Map<IAttribute,ICell> row)
Specified by:
update in interface IQuery
Returns:
See Also:
IQuery.update(java.util.Map)

insert

public void insert(java.util.Map<IAttribute,ICell> row)
Specified by:
insert in interface IQuery
See Also:
IQuery.insert(java.util.Map)

insert

public void insert(IData data)
Specified by:
insert in interface IQuery

registerRestrictor

public void registerRestrictor(IRestrictor restrictor)
Specified by:
registerRestrictor in interface IRestrictable
See Also:
IRestrictable.registerRestrictor(net.sf.webmancer.db.IRestrictor)

restrictByCondition

public void restrictByCondition(ICondition condition)
Specified by:
restrictByCondition in interface IRestrictable
See Also:
IRestrictable.restrictByCondition(net.sf.webmancer.db.ICondition)

restrictLimit

public void restrictLimit(long limit)
Specified by:
restrictLimit in interface IRestrictable
See Also:
IRestrictable.restrictLimit(long)

restrictOffset

public void restrictOffset(long offset)
Specified by:
restrictOffset in interface IRestrictable
See Also:
IRestrictable.restrictOffset(long)

restrictOrdering

public void restrictOrdering(IAttribute attribute,
                             boolean ascending)
Specified by:
restrictOrdering in interface IRestrictable
See Also:
IRestrictable.restrictOrdering(net.sf.webmancer.db.IAttribute, boolean)

callRestrictors

protected void callRestrictors(RestrictionType type)
Parameters:
type -

getAttributes

protected java.util.Map<java.lang.String,IAttribute> getAttributes()
Returns the attributes.

Returns:
the attributes

setAttributes

public void setAttributes(java.util.Map<java.lang.String,IAttribute> attributes)
Sets the attributes.

Parameters:
attributes - the attributes to set

getConditions

protected java.util.List<ICondition> getConditions()
Returns the conditions.

Returns:
the conditions

setConditions

public void setConditions(java.util.List<ICondition> conditions)
Sets the conditions.

Parameters:
conditions - the conditions to set

getLimit

protected long getLimit()
Returns the limit.

Returns:
the limit

setLimit

public void setLimit(long limit)
Sets the limit.

Parameters:
limit - the limit to set

getOffset

protected long getOffset()
Returns the offset.

Returns:
the offset

setOffset

public void setOffset(long offset)
Sets the offset.

Parameters:
offset - the offset to set

getOrderingAttribute

protected IAttribute getOrderingAttribute()
Returns the ordering attribute.

Returns:
the orderingAttribute

setOrderingAttribute

public void setOrderingAttribute(IAttribute attribute)
Sets the ordering attribute.

Parameters:
attribute - the orderingAttribute to set

isOrderingAscending

protected boolean isOrderingAscending()
Returns the orderingIsAscending.

Returns:
the orderingIsAscending

setOrderingAscending

public void setOrderingAscending(boolean ascending)
Sets the orderingIsAscending.

Parameters:
ascending - the orderingIsAscending to set


Copyright © 2006-2007. All Rights Reserved.