net.sf.webmancer.db.sql
Class TableDataSet

java.lang.Object
  extended by net.sf.webmancer.db.AbstractDataSet
      extended by net.sf.webmancer.db.sql.AbstractSqlDataSet
          extended by net.sf.webmancer.db.sql.TableDataSet
All Implemented Interfaces:
IDatabaseOperationPerformer, IDataSet

public class TableDataSet
extends AbstractSqlDataSet

Author:
Michal Burda

Constructor Summary
TableDataSet()
          Constructs the TableDataSet.
 
Method Summary
protected  java.lang.String createWherePart(java.util.List<ICondition> conditions)
           
protected  java.lang.String getTableName()
          Returns the tableName.
 long performDelete(java.util.List<ICondition> conditions)
           
 void performInsert(IData data)
          Insert given data into data storage.
 void performInsert(java.util.Map<IAttribute,ICell> row)
           
 long performQueryCount(java.util.List<ICondition> conditions)
           
 IData performQueryResult(java.util.Map<java.lang.String,IAttribute> attributes, java.util.List<ICondition> conditions, long limit, long offset, IAttribute orderingAttribute, boolean ascending)
           
 long performUpdate(java.util.Map<IAttribute,ICell> row, java.util.List<ICondition> conditions)
           
 void setTableName(java.lang.String tableName)
          Sets the tableName.
 
Methods inherited from class net.sf.webmancer.db.sql.AbstractSqlDataSet
getJdbcTemplate, setDataSource
 
Methods inherited from class net.sf.webmancer.db.AbstractDataSet
addAttribute, createQuery, getAttributes, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableDataSet

public TableDataSet()
Constructs the TableDataSet.

Method Detail

getTableName

protected java.lang.String getTableName()
Returns the tableName.

Returns:
the tableName

setTableName

public void setTableName(java.lang.String tableName)
Sets the tableName.

Parameters:
tableName - the tableName to set

createWherePart

protected java.lang.String createWherePart(java.util.List<ICondition> conditions)
Parameters:
conditions -
Returns:

performDelete

public long performDelete(java.util.List<ICondition> conditions)
Specified by:
performDelete in interface IDatabaseOperationPerformer
Specified by:
performDelete in class AbstractDataSet
Returns:
See Also:
AbstractDataSet.performDelete(java.util.List)

performInsert

public void performInsert(java.util.Map<IAttribute,ICell> row)
Specified by:
performInsert in interface IDatabaseOperationPerformer
Specified by:
performInsert in class AbstractDataSet
See Also:
AbstractDataSet.performInsert(java.util.Map)

performInsert

public void performInsert(IData data)
Description copied from class: AbstractDataSet
Insert given data into data storage. This method simply calls AbstractDataSet.performInsert(Map) for each row in data. Overriding classes may use some more effective approach depending on the type of used data storage (e.g. chunked SQL INSERT etc).

Specified by:
performInsert in interface IDatabaseOperationPerformer
Overrides:
performInsert in class AbstractDataSet
Parameters:
data - data to be inserted into data storage
See Also:
AbstractDataSet.performInsert(net.sf.webmancer.db.IData)

performQueryCount

public long performQueryCount(java.util.List<ICondition> conditions)
Specified by:
performQueryCount in interface IDatabaseOperationPerformer
Specified by:
performQueryCount in class AbstractDataSet
Returns:
See Also:
AbstractDataSet.performQueryCount(java.util.List)

performQueryResult

public IData performQueryResult(java.util.Map<java.lang.String,IAttribute> attributes,
                                java.util.List<ICondition> conditions,
                                long limit,
                                long offset,
                                IAttribute orderingAttribute,
                                boolean ascending)
Specified by:
performQueryResult in interface IDatabaseOperationPerformer
Specified by:
performQueryResult in class AbstractDataSet
Returns:
See Also:
AbstractDataSet.performQueryResult(java.util.Map, java.util.List, long, long, net.sf.webmancer.db.IAttribute, boolean)

performUpdate

public long performUpdate(java.util.Map<IAttribute,ICell> row,
                          java.util.List<ICondition> conditions)
Specified by:
performUpdate in interface IDatabaseOperationPerformer
Specified by:
performUpdate in class AbstractDataSet
Returns:
See Also:
AbstractDataSet.performUpdate(java.util.Map, java.util.List)


Copyright © 2006-2007. All Rights Reserved.