com.triactive.jdo.sco
Class HashSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.HashSet
              extended bycom.triactive.jdo.sco.HashSet
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, Queryable, SCO, java.io.Serializable, java.util.Set

public class HashSet
extends java.util.HashSet
implements SCO, java.lang.Cloneable, Queryable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.HashSet
 
Constructor Summary
  HashSet(StateManager ownerSM, java.lang.String fieldName)
           
(package private) HashSet(StateManager ownerSM, java.lang.String fieldName, boolean allowNulls, SetStore setStore)
           
  HashSet(StateManager ownerSM, java.lang.String fieldName, java.lang.Class elementType, boolean allowNulls)
           
 
Method Summary
 boolean add(java.lang.Object element)
           
 void applyUpdates()
          Applies any pending updates for this object to the data store.
 void clear()
           
 java.lang.Object clone()
          Creates and returns a copy of this object.
 java.lang.String getFieldName()
          Returns the field name.
 java.lang.Object getOwner()
          Returns the owner object of the SCO instance.
 void makeDirty()
          Marks object dirty.
 QueryStatement newQueryStatement()
          Returns a prototypical query statement over the underlying collection.
 QueryStatement newQueryStatement(java.lang.Class candidateClass)
          Returns a prototypical query statement over the underlying collection, pre-filtered to include only objects of the specified class.
 Query.ResultObjectFactory newResultObjectFactory(QueryStatement stmt)
          Returns a suitable query result factory for results produced by the specified query.
 boolean remove(java.lang.Object element)
           
 void setValueFrom(java.lang.Object o)
          Assigns the value of this second-class object from an existing object of the same or compatible type.
 void unsetOwner()
          Nullifies references to the owner Object and Field.
 
Methods inherited from class java.util.HashSet
contains, isEmpty, iterator, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

HashSet

public HashSet(StateManager ownerSM,
               java.lang.String fieldName)

HashSet

public HashSet(StateManager ownerSM,
               java.lang.String fieldName,
               java.lang.Class elementType,
               boolean allowNulls)

HashSet

HashSet(StateManager ownerSM,
        java.lang.String fieldName,
        boolean allowNulls,
        SetStore setStore)
Method Detail

setValueFrom

public void setValueFrom(java.lang.Object o)
Description copied from interface: SCO
Assigns the value of this second-class object from an existing object of the same or compatible type.

Specified by:
setValueFrom in interface SCO
Parameters:
o - the object from which to copy the value.

getFieldName

public java.lang.String getFieldName()
Description copied from interface: SCO
Returns the field name.

Specified by:
getFieldName in interface SCO
Returns:
field name

getOwner

public java.lang.Object getOwner()
Description copied from interface: SCO
Returns the owner object of the SCO instance.

Specified by:
getOwner in interface SCO
Returns:
owner object

unsetOwner

public void unsetOwner()
Description copied from interface: SCO
Nullifies references to the owner Object and Field.

Specified by:
unsetOwner in interface SCO

applyUpdates

public void applyUpdates()
Description copied from interface: SCO
Applies any pending updates for this object to the data store.

Specified by:
applyUpdates in interface SCO

makeDirty

public void makeDirty()
Description copied from interface: SCO
Marks object dirty.

Specified by:
makeDirty in interface SCO

newQueryStatement

public QueryStatement newQueryStatement()
Description copied from interface: Queryable
Returns a prototypical query statement over the underlying collection.

The returned query statement selects all applicable rows from the relevant base table(s) and the column that represents the element or element ID. The statement can then be modified to join additional tables, select more columns, add WHERE conditions, etc.

Specified by:
newQueryStatement in interface Queryable
Returns:
The new prototypical query statement.

newQueryStatement

public QueryStatement newQueryStatement(java.lang.Class candidateClass)
Description copied from interface: Queryable
Returns a prototypical query statement over the underlying collection, pre-filtered to include only objects of the specified class.

Specified by:
newQueryStatement in interface Queryable
Returns:
The new prototypical query statement.
See Also:
Queryable.newQueryStatement()

newResultObjectFactory

public Query.ResultObjectFactory newResultObjectFactory(QueryStatement stmt)
Description copied from interface: Queryable
Returns a suitable query result factory for results produced by the specified query.

The stmt argument must have been obtained by a previous call to newQueryStatement() on the same Queryable.

Specified by:
newResultObjectFactory in interface Queryable
Returns:
A factory for creating PersistenceCapable objects from query results.

clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Mutable second-class Objects are required to provide a public clone method in order to allow for copying PersistenceCapable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.


add

public boolean add(java.lang.Object element)
Specified by:
add in interface java.util.Set

remove

public boolean remove(java.lang.Object element)
Specified by:
remove in interface java.util.Set

clear

public void clear()
Specified by:
clear in interface java.util.Set


Copyright © 2001 TriActive, Inc. All Rights Reserved.