Class ExtentCollection
- java.lang.Object
-
- com.sun.jdo.spi.persistence.support.sqlstore.ExtentCollection
-
- All Implemented Interfaces:
Iterable,Collection
public class ExtentCollection extends Object implements Collection
- Version:
- 0.1
- Author:
- Michael Bouschen
-
-
Field Summary
Fields Modifier and Type Field Description protected ClasspersistenceCapableClassThis extent collection reperesents the extent of persistenceCapableClass.protected PersistenceManagerpmThe PersistenceManager getExtent is called from
-
Constructor Summary
Constructors Constructor Description ExtentCollection(PersistenceManager pm, Class persistenceCapableClass, boolean subclasses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Object o)Extent collection is unmodifiable => throw UnsupportedOperationExceptionbooleanaddAll(Collection c)Extent collection is unmodifiable => throw UnsupportedOperationExceptionvoidclear()Extent collection is unmodifiable => throw UnsupportedOperationExceptionbooleancontains(Object o)booleancontainsAll(Collection c)booleanequals(Object o)Two extent collections are equal, iff the names of their persistence capable class are equalClassgetPersistenceCapableClass()inthashCode()The hashCode is mapped to the hashCode of the name of the extent collection's persistence capable classbooleanisEmpty()Iteratoriterator()booleanremove(Object o)Extent collection is unmodifiable => throw UnsupportedOperationExceptionbooleanremoveAll(Collection c)Extent collection is unmodifiable => throw UnsupportedOperationExceptionbooleanretainAll(Collection c)Extent collection is unmodifiable => throw UnsupportedOperationExceptionintsize()Object[]toArray()Object[]toArray(Object[] a)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Field Detail
-
pm
protected PersistenceManager pm
The PersistenceManager getExtent is called from
-
persistenceCapableClass
protected Class persistenceCapableClass
This extent collection reperesents the extent of persistenceCapableClass.
-
-
Constructor Detail
-
ExtentCollection
public ExtentCollection(PersistenceManager pm, Class persistenceCapableClass, boolean subclasses)
- Parameters:
persistenceCapableClass- Class of instancessubclasses- whether to include instances of subclasses
-
-
Method Detail
-
getPersistenceCapableClass
public Class getPersistenceCapableClass()
-
size
public int size()
- Specified by:
sizein interfaceCollection
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection
-
iterator
public Iterator iterator()
- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceIterable
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection
-
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArrayin interfaceCollection
-
add
public boolean add(Object o)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
addin interfaceCollection
-
remove
public boolean remove(Object o)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
removein interfaceCollection
-
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAllin interfaceCollection
-
addAll
public boolean addAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
addAllin interfaceCollection
-
removeAll
public boolean removeAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
removeAllin interfaceCollection
-
retainAll
public boolean retainAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
retainAllin interfaceCollection
-
clear
public void clear()
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
clearin interfaceCollection
-
equals
public boolean equals(Object o)
Two extent collections are equal, iff the names of their persistence capable class are equal- Specified by:
equalsin interfaceCollection- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
The hashCode is mapped to the hashCode of the name of the extent collection's persistence capable class- Specified by:
hashCodein interfaceCollection- Overrides:
hashCodein classObject
-
-