Purpose: The abstract class for ContainerPolicy's whose container class implements a container interface.
CollectionContainerPolicy, MapContainerPolicy
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected transient Method | cloneMethod
The method which will return a clone of an instance of the containerClass. |
| private static final ConcurrentHashMap | |
| protected Class | containerClass
The concrete container class. |
| protected String | |
| private static final ReferenceQueue |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | InterfaceContainerPolicy(Class<?> containerClass)
INTERNAL: Construct a new policy for the specified class. |
| protected | InterfaceContainerPolicy(String containerClassName)
INTERNAL: Construct a new policy for the specified class name. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | buildContainerFromVector(Vector<E> vector, AbstractSession session)
Overrides org. |
| public Object | cloneFor(Object container)
Overrides org. |
| public void | convertClassNamesToClasses(ClassLoader classLoader)
Overrides org. |
| public CollectionChangeEvent | createChangeEvent(Object collectionOwner, String propertyName, Object collectionChanged, Object elementChanged, int changeType, Integer index, boolean isChangeApplied)
Implements abstract org. |
| public QueryKey | createQueryKeyForMapKey()
INTERNAL: Create a query key that links to the map key InterfaceContainerPolicy does not support maps, so this method will return null subclasses will extend this method. |
| public boolean | equals(Object
the reference object with which to compare. object)Overrides org. |
| public Method | |
| protected Method | |
| public Class | getContainerClass()
Overrides org. |
| public String | getContainerClassName()
Overrides org. |
| public DatabaseField | getDirectKeyField(CollectionMapping mapping)
INTERNAL: Return the DatabaseField that represents the key in a DirectMapMapping. |
| public abstract Class | |
| public int | hashCode()
Overrides org. |
| public boolean | hasNext(Object iterator)
Implements abstract org. Implements org. |
| protected Object | invokeCloneMethodOn(Method method, Object container)
INTERNAL: Invoke the specified clone method on the container, handling the necessary exceptions. |
| public boolean | isMapKeyAttribute()
INTERNAL: Return whether a map key this container policy represents is an attribute By default this method will return false since only subclasses actually represent maps. |
| public boolean | isValidContainerType(Class<?> containerType)
Overrides org. |
| protected Object | next(Object iterator)
Implements abstract org. |
| public void | setCloneMethod(Method cloneMethod)
INTERNAL: Set the Method that will return a clone of an instance of the containerClass. |
| public void | setContainerClass(Class<?> containerClass)
Overrides org. Implements org. |
| public void | setContainerClassName(String containerClassName)
Overrides org. |
| protected Object |
| cloneMethod | back to summary |
|---|---|
| protected transient Method cloneMethod The method which will return a clone of an instance of the containerClass. | |
| cloneMethodCache | back to summary |
|---|---|
| private static final ConcurrentHashMap<InterfaceContainerPolicy. | |
| containerClass | back to summary |
|---|---|
| protected Class<?> containerClass The concrete container class. | |
| containerClassName | back to summary |
|---|---|
| protected String containerClassName | |
| refQueue | back to summary |
|---|---|
| private static final ReferenceQueue<Class<T>> refQueue | |
| InterfaceContainerPolicy | back to summary |
|---|---|
| protected InterfaceContainerPolicy() INTERNAL: Construct a new policy. | |
| InterfaceContainerPolicy | back to summary |
|---|---|
| protected InterfaceContainerPolicy(Class<?> containerClass) INTERNAL: Construct a new policy for the specified class. | |
| InterfaceContainerPolicy | back to summary |
|---|---|
| protected InterfaceContainerPolicy(String containerClassName) INTERNAL: Construct a new policy for the specified class name. | |
| buildContainerFromVector | back to summary |
|---|---|
| public Object buildContainerFromVector(Vector<E> vector, AbstractSession session) Overrides org. INTERNAL: Return a container populated with the contents of the specified Vector.
| |
| cloneFor | back to summary |
|---|---|
| public Object cloneFor(Object container) Overrides org. INTERNAL: Return a clone of the specified container.
| |
| convertClassNamesToClasses | back to summary |
|---|---|
| public void convertClassNamesToClasses(ClassLoader classLoader) Overrides org. INTERNAL: Convert all the class-name-based settings in this ContainerPolicy to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.
| |
| createChangeEvent | back to summary |
|---|---|
| public CollectionChangeEvent createChangeEvent(Object collectionOwner, String propertyName, Object collectionChanged, Object elementChanged, int changeType, Integer index, boolean isChangeApplied) Implements abstract org. INTERNAL: Creates a CollectionChangeEvent for the container
| |
| createQueryKeyForMapKey | back to summary |
|---|---|
| public QueryKey createQueryKeyForMapKey() INTERNAL: Create a query key that links to the map key InterfaceContainerPolicy does not support maps, so this method will return null subclasses will extend this method. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides org. INTERNAL: Return if the policy is equal to the other. By default if they are the same class, they are considered equal. This is used for query parse caching.
| |
| getCloneMethod | back to summary |
|---|---|
| public Method getCloneMethod() INTERNAL: Return the 'clone()' Method for the container class. Lazy initialization is used, so we can serialize these things. | |
| getCloneMethod | back to summary |
|---|---|
| protected Method getCloneMethod(Class<?> javaClass) INTERNAL: Return the 'clone()' Method for the specified class. Return null if the method does not exist anywhere in the hierarchy | |
| getContainerClass | back to summary |
|---|---|
| public Class Overrides org. INTERNAL: Returns the container class to be used with this policy.
| |
| getContainerClassName | back to summary |
|---|---|
| public String getContainerClassName() Overrides org. Doc from org. INTERNAL: Used by the MW
| |
| getDirectKeyField | back to summary |
|---|---|
| public DatabaseField getDirectKeyField(CollectionMapping mapping) INTERNAL: Return the DatabaseField that represents the key in a DirectMapMapping. If the keyMapping is not a DirectMapping, this will return null. | |
| getInterfaceType | back to summary |
|---|---|
| public abstract Class | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext(Object iterator) Implements abstract org. Implements org. INTERNAL: Return whether the iterator has more objects,
| |
| invokeCloneMethodOn | back to summary |
|---|---|
| protected Object invokeCloneMethodOn(Method method, Object container) INTERNAL: Invoke the specified clone method on the container, handling the necessary exceptions. | |
| isMapKeyAttribute | back to summary |
|---|---|
| public boolean isMapKeyAttribute() INTERNAL: Return whether a map key this container policy represents is an attribute By default this method will return false since only subclasses actually represent maps. | |
| isValidContainerType | back to summary |
|---|---|
| public boolean isValidContainerType(Class<?> containerType) Overrides org. INTERNAL: Validate the container type.
| |
| next | back to summary |
|---|---|
| protected Object next(Object iterator) Implements abstract org. INTERNAL: Return the next object on the queue. Valid for some subclasses only.
| |
| setCloneMethod | back to summary |
|---|---|
| public void setCloneMethod(Method cloneMethod) INTERNAL: Set the Method that will return a clone of an instance of the containerClass. | |
| setContainerClass | back to summary |
|---|---|
| public void setContainerClass(Class<?> containerClass) Overrides org. Implements org. INTERNAL: Set the class to use as the container.
| |
| setContainerClassName | back to summary |
|---|---|
| public void setContainerClassName(String containerClassName) Overrides org. Doc from org. INTERNAL: Used by the MW
| |
| toStringInfo | back to summary |
|---|---|
| protected Object toStringInfo() Overrides org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public int | |
| public String |
| hash | back to summary |
|---|---|
| private final int hash | |
| ClassWeakReference | back to summary |
|---|---|
| pack-priv ClassWeakReference(Class<T> referent) | |
| ClassWeakReference | back to summary |
|---|---|
| pack-priv ClassWeakReference(Class<T> referent, ReferenceQueue<Class<T>> referenceQueue) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |