com.vinculumtech.carrierwave.datamodel
Class DataModel

java.lang.Object
  extended bycom.vinculumtech.carrierwave.datamodel.Model
      extended bycom.vinculumtech.carrierwave.datamodel.DataModel

public class DataModel
extends com.vinculumtech.carrierwave.datamodel.Model

The DataModel class is the root class for managing a collection of Image instances as table with columns and rows.

After instantiating a new DataModel, Rows or Column objects can be retrieved that either filter or narrow the original collection of instances (respectively).

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/datamodel/DataModel.java#5 $

Constructor Summary
DataModel(java.lang.Class commonType, java.util.Collection sourceRows)
           
DataModel(java.lang.Class commonType, java.util.Collection sourceRows, boolean isSourceSynchronized)
           
DataModel(java.lang.Class commonType, RowSource rowSource)
           
 
Method Summary
static RowSource createRowSource(java.util.Collection collection)
           
static RowSource createSynchronizedRowSource(java.util.Collection synchronizedCollection)
           
 Rows getAllRows()
           
 Column getColumn(java.lang.String columnName)
           
 int getColumnCount()
           
 java.util.List getColumnNames()
           
 java.lang.Class getCommonType()
           
 com.vinculumtech.carrierwave.datamodel.Model getParentModel()
           
 Rows getRowsFor(java.lang.String columnName, UnaryFunction filter)
           
 Rows getRowsFor(UnaryFunction filter)
           
 RowSource getRowSource()
           
 java.util.Collection getValues()
           
 java.util.Collection getValues(java.util.Collection results)
           
 boolean hasColumnName(java.lang.String columnName)
           
 boolean hasParentModel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataModel

public DataModel(java.lang.Class commonType,
                 RowSource rowSource)

DataModel

public DataModel(java.lang.Class commonType,
                 java.util.Collection sourceRows)

DataModel

public DataModel(java.lang.Class commonType,
                 java.util.Collection sourceRows,
                 boolean isSourceSynchronized)
Method Detail

getCommonType

public java.lang.Class getCommonType()

getRowSource

public RowSource getRowSource()

getValues

public java.util.Collection getValues(java.util.Collection results)
Returns:

getColumnCount

public int getColumnCount()

hasColumnName

public boolean hasColumnName(java.lang.String columnName)

getColumnNames

public java.util.List getColumnNames()

getColumn

public Column getColumn(java.lang.String columnName)

getAllRows

public Rows getAllRows()

getRowsFor

public Rows getRowsFor(UnaryFunction filter)

getRowsFor

public Rows getRowsFor(java.lang.String columnName,
                       UnaryFunction filter)

createRowSource

public static RowSource createRowSource(java.util.Collection collection)

createSynchronizedRowSource

public static RowSource createSynchronizedRowSource(java.util.Collection synchronizedCollection)

getParentModel

public com.vinculumtech.carrierwave.datamodel.Model getParentModel()

hasParentModel

public boolean hasParentModel()

getValues

public java.util.Collection getValues()


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.