com.triactive.jdo.store
Class MapEntrySetStore

java.lang.Object
  extended bycom.triactive.jdo.store.MapEntrySetStore
All Implemented Interfaces:
SetStore

class MapEntrySetStore
extends java.lang.Object
implements SetStore


Field Summary
protected  DatabaseAdapter dba
           
protected  java.lang.String iteratorStmt
           
protected  Column keyColumn
           
protected  Mapping keyMapping
           
protected  boolean keysAreEmbedded
           
protected  java.lang.Class keyType
           
protected  MapStore mapStore
           
protected  Column ownerColumn
           
protected  Mapping ownerMapping
           
protected  Table setTable
           
protected  java.lang.String sizeStmt
           
protected  StoreManager storeMgr
           
protected  Column valueColumn
           
protected  Mapping valueMapping
           
protected  boolean valuesAreEmbedded
           
protected  java.lang.Class valueType
           
 
Constructor Summary
MapEntrySetStore(ClassBaseTable valueTable, Mapping ownerMapping, Mapping keyMapping, MapStore mapStore)
           
MapEntrySetStore(MapTable mapTable, MapStore mapStore)
           
 
Method Summary
 boolean add(StateManager sm, java.lang.Object element)
           
 boolean addAll(StateManager sm, java.util.Collection elements)
           
 void clear(StateManager sm)
           
 boolean contains(StateManager sm, java.lang.Object element)
           
 java.lang.Class getElementType()
           
 QueryStatement getExistsSubquery(QueryStatement.QueryColumn ownerIDColumn, SQLIdentifier setRangeVar)
          Create a subquery for the given query that joins a SetStores element table to the owner table.
 Column getOwnerColumn()
           
 StoreManager getStoreManager()
           
 java.util.Iterator iterator(StateManager sm)
           
 QueryStatement.QueryColumn joinElementsTo(QueryStatement stmt, QueryStatement.QueryColumn ownerIDColumn, SQLIdentifier setRangeVar, java.lang.Class filteredElementType, SQLIdentifier elementRangeVar)
           
 QueryStatement newQueryStatement(StateManager sm, java.lang.Class candidateClass)
           
 Query.ResultObjectFactory newResultObjectFactory(StateManager sm, QueryStatement stmt)
           
 boolean remove(StateManager sm, java.lang.Object element)
           
 int size(StateManager sm)
           
protected  boolean validateElementType(java.lang.Object element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

setTable

protected Table setTable

mapStore

protected MapStore mapStore

storeMgr

protected StoreManager storeMgr

dba

protected DatabaseAdapter dba

ownerMapping

protected Mapping ownerMapping

keyMapping

protected Mapping keyMapping

valueMapping

protected Mapping valueMapping

ownerColumn

protected Column ownerColumn

keyColumn

protected Column keyColumn

valueColumn

protected Column valueColumn

keyType

protected java.lang.Class keyType

valueType

protected java.lang.Class valueType

keysAreEmbedded

protected boolean keysAreEmbedded

valuesAreEmbedded

protected boolean valuesAreEmbedded

iteratorStmt

protected java.lang.String iteratorStmt

sizeStmt

protected java.lang.String sizeStmt
Constructor Detail

MapEntrySetStore

public MapEntrySetStore(MapTable mapTable,
                        MapStore mapStore)

MapEntrySetStore

public MapEntrySetStore(ClassBaseTable valueTable,
                        Mapping ownerMapping,
                        Mapping keyMapping,
                        MapStore mapStore)
Method Detail

getStoreManager

public StoreManager getStoreManager()
Specified by:
getStoreManager in interface SetStore

getElementType

public java.lang.Class getElementType()
Specified by:
getElementType in interface SetStore

getOwnerColumn

public Column getOwnerColumn()
Specified by:
getOwnerColumn in interface SetStore

newQueryStatement

public QueryStatement newQueryStatement(StateManager sm,
                                        java.lang.Class candidateClass)
Specified by:
newQueryStatement in interface SetStore

newResultObjectFactory

public Query.ResultObjectFactory newResultObjectFactory(StateManager sm,
                                                        QueryStatement stmt)
Specified by:
newResultObjectFactory in interface SetStore

getExistsSubquery

public QueryStatement getExistsSubquery(QueryStatement.QueryColumn ownerIDColumn,
                                        SQLIdentifier setRangeVar)
Description copied from interface: SetStore
Create a subquery for the given query that joins a SetStores element table to the owner table. This subquery can subsequently be used in an EXISTS expression to determine whether a Set is empty or not.

Specified by:
getExistsSubquery in interface SetStore
Parameters:
ownerIDColumn - The QueryColumn of the owner ID.
setRangeVar - The range variable for the "Set" table.
Returns:
A subquery for the given query that joins a SetStores element table to the owner table.

joinElementsTo

public QueryStatement.QueryColumn joinElementsTo(QueryStatement stmt,
                                                 QueryStatement.QueryColumn ownerIDColumn,
                                                 SQLIdentifier setRangeVar,
                                                 java.lang.Class filteredElementType,
                                                 SQLIdentifier elementRangeVar)
Specified by:
joinElementsTo in interface SetStore

validateElementType

protected boolean validateElementType(java.lang.Object element)

iterator

public java.util.Iterator iterator(StateManager sm)
Specified by:
iterator in interface SetStore

size

public int size(StateManager sm)
Specified by:
size in interface SetStore

contains

public boolean contains(StateManager sm,
                        java.lang.Object element)
Specified by:
contains in interface SetStore

add

public boolean add(StateManager sm,
                   java.lang.Object element)
Specified by:
add in interface SetStore

addAll

public boolean addAll(StateManager sm,
                      java.util.Collection elements)
Specified by:
addAll in interface SetStore

remove

public boolean remove(StateManager sm,
                      java.lang.Object element)
Specified by:
remove in interface SetStore

clear

public void clear(StateManager sm)
Specified by:
clear in interface SetStore


Copyright © 2001 TriActive, Inc. All Rights Reserved.