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 Class
persistenceCapableClass
This extent collection reperesents the extent of persistenceCapableClass.protected PersistenceManager
pm
The 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 boolean
add(Object o)
Extent collection is unmodifiable => throw UnsupportedOperationExceptionboolean
addAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationExceptionvoid
clear()
Extent collection is unmodifiable => throw UnsupportedOperationExceptionboolean
contains(Object o)
boolean
containsAll(Collection c)
boolean
equals(Object o)
Two extent collections are equal, iff the names of their persistence capable class are equalClass
getPersistenceCapableClass()
int
hashCode()
The hashCode is mapped to the hashCode of the name of the extent collection's persistence capable classboolean
isEmpty()
Iterator
iterator()
boolean
remove(Object o)
Extent collection is unmodifiable => throw UnsupportedOperationExceptionboolean
removeAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationExceptionboolean
retainAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationExceptionint
size()
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:
size
in interfaceCollection
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection
-
iterator
public Iterator iterator()
- Specified by:
iterator
in interfaceCollection
- Specified by:
iterator
in interfaceIterable
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection
-
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray
in interfaceCollection
-
add
public boolean add(Object o)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
add
in interfaceCollection
-
remove
public boolean remove(Object o)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
remove
in interfaceCollection
-
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll
in interfaceCollection
-
addAll
public boolean addAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
addAll
in interfaceCollection
-
removeAll
public boolean removeAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
removeAll
in interfaceCollection
-
retainAll
public boolean retainAll(Collection c)
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
retainAll
in interfaceCollection
-
clear
public void clear()
Extent collection is unmodifiable => throw UnsupportedOperationException- Specified by:
clear
in interfaceCollection
-
equals
public boolean equals(Object o)
Two extent collections are equal, iff the names of their persistence capable class are equal- Specified by:
equals
in interfaceCollection
- Overrides:
equals
in 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:
hashCode
in interfaceCollection
- Overrides:
hashCode
in classObject
-
-