Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 155774 Details for
Bug 298985
Improve general performance and concurrency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
changes primary key typing from Vector to Object, part 1
2010-01-11-primary-key-objects.patch (text/plain), 165.62 KB, created by
James Sutherland
on 2010-01-11 13:09:17 EST
(
hide
)
Description:
changes primary key typing from Vector to Object, part 1
Filename:
MIME Type:
Creator:
James Sutherland
Created:
2010-01-11 13:09:17 EST
Size:
165.62 KB
patch
obsolete
>Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/AllFieldsLockingPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/AllFieldsLockingPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/AllFieldsLockingPolicy.java (working copy) >@@ -13,6 +13,7 @@ > package org.eclipse.persistence.descriptors; > > import java.util.*; >+ > import org.eclipse.persistence.internal.helper.*; > import org.eclipse.persistence.internal.sessions.AbstractRecord; > import org.eclipse.persistence.queries.*; >@@ -55,7 +56,7 @@ > * In this case, it is all the fields, except for the primary key > * and class indicator. > */ >- protected Vector getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow) { >+ protected List<DatabaseField> getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow) { > return getAllNonPrimaryKeyFields(table); > } > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/ChangedFieldsLockingPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/ChangedFieldsLockingPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/ChangedFieldsLockingPolicy.java (working copy) >@@ -81,13 +81,12 @@ > * Returns the fields that should be compared in the where clause. > * In this case, it is only the fields that were changed. > */ >- protected Vector getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow) { >- Vector fields = getAllNonPrimaryKeyFields(table); >- Vector returnedFields = new Vector(); >- for (Enumeration enumtr = fields.elements(); enumtr.hasMoreElements();) { >- DatabaseField field = (DatabaseField)enumtr.nextElement(); >+ protected List<DatabaseField> getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow) { >+ List<DatabaseField> fields = getAllNonPrimaryKeyFields(table); >+ List<DatabaseField> returnedFields = new ArrayList<DatabaseField>(); >+ for (DatabaseField field : fields) { > if (modifyRow.containsKey(field)) { >- returnedFields.addElement(field); >+ returnedFields.add(field); > } > } > return returnedFields; >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/changetracking/AttributeChangeTrackingPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/changetracking/AttributeChangeTrackingPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/changetracking/AttributeChangeTrackingPolicy.java (working copy) >@@ -81,7 +81,7 @@ > int size = mappings.size(); > for (int index = 0; index < size; index++) { > DatabaseMapping mapping = (DatabaseMapping)mappings.get(index); >- changes.addChange(mapping.compareForChange(clone, null, changes, (UnitOfWorkImpl)session)); >+ changes.addChange(mapping.compareForChange(clone, null, changes, session)); > } > } > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/AbstractCopyPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/AbstractCopyPolicy.java (revision 6201) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/AbstractCopyPolicy.java (working copy) >@@ -12,9 +12,6 @@ > ******************************************************************************/ > package org.eclipse.persistence.descriptors.copying; > >- >-import java.util.Vector; >- > import org.eclipse.persistence.descriptors.ClassDescriptor; > import org.eclipse.persistence.exceptions.*; > import org.eclipse.persistence.sessions.*; >@@ -45,7 +42,7 @@ > /** > * By default create a new instance. > */ >- public Object buildWorkingCopyCloneFromRow(Record row, ObjectBuildingQuery query, Vector primaryKey, UnitOfWork uow) throws DescriptorException { >+ public Object buildWorkingCopyCloneFromRow(Record row, ObjectBuildingQuery query, Object primaryKey, UnitOfWork uow) throws DescriptorException { > return this.descriptor.getObjectBuilder().buildNewInstance(); > } > >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/CloneCopyPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/CloneCopyPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/CloneCopyPolicy.java (working copy) >@@ -16,8 +16,6 @@ > import java.security.AccessController; > import java.security.PrivilegedActionException; > >-import java.util.Vector; >- > import org.eclipse.persistence.exceptions.*; > import org.eclipse.persistence.internal.helper.*; > import org.eclipse.persistence.queries.ObjectBuildingQuery; >@@ -119,7 +117,8 @@ > /** > * Create a new instance, unless a workingCopyClone method is specified, then build a new instance and clone it. > */ >- public Object buildWorkingCopyCloneFromRow(Record row, ObjectBuildingQuery query, Vector primaryKey, UnitOfWork uow) throws DescriptorException { >+ @Override >+ public Object buildWorkingCopyCloneFromRow(Record row, ObjectBuildingQuery query, Object primaryKey, UnitOfWork uow) throws DescriptorException { > // For now must preserve CMP code which builds heavy clones with a context. > // Also preserve for clients who use the copy policy. > ObjectBuilder builder = getDescriptor().getObjectBuilder(); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/CopyPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/CopyPolicy.java (revision 6201) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/copying/CopyPolicy.java (working copy) >@@ -13,7 +13,6 @@ > package org.eclipse.persistence.descriptors.copying; > > import java.io.*; >-import java.util.Vector; > > import org.eclipse.persistence.exceptions.*; > import org.eclipse.persistence.descriptors.ClassDescriptor; >@@ -50,7 +49,7 @@ > /** > * Return an instance with the primary key set from the row, used for building a working copy during a unit of work transactional read. > */ >- Object buildWorkingCopyCloneFromRow(Record row, ObjectBuildingQuery query, Vector primaryKey, UnitOfWork uow) throws DescriptorException; >+ Object buildWorkingCopyCloneFromRow(Record row, ObjectBuildingQuery query, Object primaryKey, UnitOfWork uow) throws DescriptorException; > > /** > * Clone the CopyPolicy. >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/FieldsLockingPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/FieldsLockingPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/FieldsLockingPolicy.java (working copy) >@@ -36,7 +36,7 @@ > */ > public abstract class FieldsLockingPolicy implements OptimisticLockingPolicy { > protected ClassDescriptor descriptor; >- protected Vector allNonPrimaryKeyFields; >+ protected List<DatabaseField> allNonPrimaryKeyFields; > > /** > * PUBLIC: >@@ -70,20 +70,20 @@ > * Returns the fields that should be compared in the where clause. > * In this case, it is all the fields, except for the primary key > * and class indicator fields. >- * This is called durring lazy initialization >+ * This is called during lazy initialization. > */ >- protected Vector buildAllNonPrimaryKeyFields() { >- Vector fields = new Vector(); >+ protected List buildAllNonPrimaryKeyFields() { >+ List fields = new ArrayList(); > for (Enumeration enumtr = descriptor.getFields().elements(); enumtr.hasMoreElements();) { > DatabaseField dbField = (DatabaseField)enumtr.nextElement(); > if (!isPrimaryKey(dbField)) { > if (descriptor.hasInheritance()) { > DatabaseField classField = descriptor.getInheritancePolicy().getClassIndicatorField(); > if (!((classField == null) || dbField.equals(classField))) { >- fields.addElement(dbField); >+ fields.add(dbField); > } > } else { >- fields.addElement(dbField); >+ fields.add(dbField); > } > } > } >@@ -112,13 +112,13 @@ > protected Expression buildExpression(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow, ExpressionBuilder builder) { > Expression exp = null; > DatabaseField field; >- Enumeration enumtr = getFieldsToCompare(table, transRow, modifyRow).elements(); >- if (enumtr.hasMoreElements()) { >- field = (DatabaseField)enumtr.nextElement();//First element >+ Iterator<DatabaseField> iterator = getFieldsToCompare(table, transRow, modifyRow).iterator(); >+ if (iterator.hasNext()) { >+ field = iterator.next();//First element > exp = builder.getField(field).equal(builder.getParameter(field)); > } >- while (enumtr.hasMoreElements()) { >- field = (DatabaseField)enumtr.nextElement(); >+ while (iterator.hasNext()) { >+ field = iterator.next(); > exp = exp.and(builder.getField(field).equal(builder.getParameter(field))); > } > return exp; >@@ -195,7 +195,7 @@ > * In this case, it is all the fields, except for the primary key > * and class indicator field. > */ >- protected Vector getAllNonPrimaryKeyFields() { >+ protected List<DatabaseField> getAllNonPrimaryKeyFields() { > if (allNonPrimaryKeyFields == null) { > allNonPrimaryKeyFields = buildAllNonPrimaryKeyFields(); > } >@@ -206,12 +206,11 @@ > * INTERNAL: > * filter the fields based on the passed in table. Only return fields of this table. > */ >- protected Vector getAllNonPrimaryKeyFields(DatabaseTable table) { >- Vector filteredFields = new Vector(); >- for (Enumeration enumtr = getAllNonPrimaryKeyFields().elements(); enumtr.hasMoreElements();) { >- DatabaseField dbField = (DatabaseField)enumtr.nextElement(); >+ protected List<DatabaseField> getAllNonPrimaryKeyFields(DatabaseTable table) { >+ List<DatabaseField> filteredFields = new ArrayList<DatabaseField>(); >+ for (DatabaseField dbField : getAllNonPrimaryKeyFields()) { > if (dbField.getTableName().equals(table.getName())) { >- filteredFields.addElement(dbField); >+ filteredFields.add(dbField); > } > } > return filteredFields; >@@ -231,7 +230,7 @@ > * Returns the fields that should be compared in the where clause. > * This method must be implemented by the subclass > */ >- protected abstract Vector getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow); >+ protected abstract List<DatabaseField> getFieldsToCompare(DatabaseTable table, AbstractRecord transRow, AbstractRecord modifyRow); > > /** > * INTERNAL: >@@ -274,7 +273,7 @@ > * INTERNAL: > * Return the number of version difference between the two states of the object. > */ >- public int getVersionDifference(Object currentValue, Object domainObject, Vector primaryKeys, AbstractSession session) { >+ public int getVersionDifference(Object currentValue, Object domainObject, Object primaryKeys, AbstractSession session) { > // There is no way of knowing what the difference is so return 0 > // This should never be called for field locking. > return 0; >@@ -284,7 +283,7 @@ > * INTERNAL: > * This method will return the optimistic lock value for the object > */ >- public Object getWriteLockValue(Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ public Object getWriteLockValue(Object domainObject, Object primaryKey, AbstractSession session) { > //There is no way of knowing if this value is newer or not, so always return true. > return null; > } >@@ -328,7 +327,7 @@ > * (or cache). Will return true if the object is newer > * than the row. > */ >- public boolean isNewerVersion(Object currentValue, Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ public boolean isNewerVersion(Object currentValue, Object domainObject, Object primaryKey, AbstractSession session) { > //There is no way of knowing if this value is newer or not, so always return true. > return true; > } >@@ -339,7 +338,7 @@ > * (or cache). Will return true if the object is newer > * than the row. > */ >- public boolean isNewerVersion(AbstractRecord Record, Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ public boolean isNewerVersion(AbstractRecord Record, Object domainObject, Object primaryKey, AbstractSession session) { > //There is no way of knowing if this value is newer or not, so always return true. > return true; > } >@@ -369,14 +368,14 @@ > * INTERNAL: > * Only applicable when the value is stored in the cache. > */ >- public void mergeIntoParentCache(UnitOfWorkImpl uow, java.util.Vector primaryKey, Object object) { >+ public void mergeIntoParentCache(UnitOfWorkImpl uow, Object primaryKey, Object object) { > // nothing to do > } > > /** > * INTERNAL: Set method for all the primary keys > */ >- protected void setAllNonPrimaryKeyFields(Vector allNonPrimaryKeyFields) { >+ protected void setAllNonPrimaryKeyFields(List allNonPrimaryKeyFields) { > this.allNonPrimaryKeyFields = allNonPrimaryKeyFields; > } > >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/TimestampLockingPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/TimestampLockingPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/TimestampLockingPolicy.java (working copy) >@@ -14,7 +14,6 @@ > > import org.eclipse.persistence.internal.sessions.*; > >-import java.util.*; > import java.sql.Timestamp; > import org.eclipse.persistence.expressions.*; > import org.eclipse.persistence.internal.helper.*; >@@ -143,7 +142,8 @@ > * INTERNAL: > * Return the number of versions different between these objects. > */ >- public int getVersionDifference(Object currentValue, Object domainObject, Vector primaryKeys, AbstractSession session) { >+ @Override >+ public int getVersionDifference(Object currentValue, Object domainObject, Object primaryKeys, AbstractSession session) { > java.sql.Timestamp writeLockFieldValue; > java.sql.Timestamp newWriteLockFieldValue = (java.sql.Timestamp)currentValue; > if (newWriteLockFieldValue == null) { >@@ -166,9 +166,10 @@ > > /** > * INTERNAL: >- * This method will return the optimistic lock value for the object >+ * This method will return the optimistic lock value for the object. > */ >- public Object getWriteLockValue(Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ @Override >+ public Object getWriteLockValue(Object domainObject, Object primaryKey, AbstractSession session) { > java.sql.Timestamp writeLockFieldValue = null; > if (isStoredInCache()) { > writeLockFieldValue = (java.sql.Timestamp)session.getIdentityMapAccessorInstance().getWriteLockValue(primaryKey, domainObject.getClass(), getDescriptor()); >@@ -207,7 +208,8 @@ > * Compares the value with the value from the object (or cache). > * Will return true if the currentValue is newer than the domainObject. > */ >- public boolean isNewerVersion(Object currentValue, Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ @Override >+ public boolean isNewerVersion(Object currentValue, Object domainObject, Object primaryKey, AbstractSession session) { > java.sql.Timestamp writeLockFieldValue; > java.sql.Timestamp newWriteLockFieldValue = (java.sql.Timestamp)currentValue; > if (isStoredInCache()) { >@@ -224,7 +226,8 @@ > * Compares the value from the row and from the object (or cache). > * Will return true if the row is newer than the object. > */ >- public boolean isNewerVersion(AbstractRecord databaseRow, Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ @Override >+ public boolean isNewerVersion(AbstractRecord databaseRow, Object domainObject, Object primaryKey, AbstractSession session) { > java.sql.Timestamp writeLockFieldValue; > java.sql.Timestamp newWriteLockFieldValue = (java.sql.Timestamp)session.getDatasourcePlatform().convertObject(databaseRow.get(getWriteLockField()), ClassConstants.TIMESTAMP); > if (isStoredInCache()) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/VersionLockingPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/VersionLockingPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/VersionLockingPolicy.java (working copy) >@@ -298,7 +298,7 @@ > * @param primaryKeys a vector containing the primary keys of the domainObject > * @param session the session to be used with the comparison > */ >- public int getVersionDifference(Object currentValue, Object domainObject, Vector primaryKeys, AbstractSession session) { >+ public int getVersionDifference(Object currentValue, Object domainObject, Object primaryKeys, AbstractSession session) { > Number writeLockFieldValue; > Number newWriteLockFieldValue = (Number)currentValue; > >@@ -346,7 +346,7 @@ > * INTERNAL: > * This method will return the optimistic lock value for the object > */ >- public Object getWriteLockValue(Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ public Object getWriteLockValue(Object domainObject, Object primaryKey, AbstractSession session) { > Number writeLockFieldValue; > if (isStoredInCache()) { > writeLockFieldValue = (Number)session.getIdentityMapAccessorInstance().getWriteLockValue(primaryKey, domainObject.getClass(), getDescriptor()); >@@ -424,7 +424,7 @@ > * Compares the value with the value from the object (or cache). > * Will return true if the currentValue is newer than the domainObject. > */ >- public boolean isNewerVersion(Object currentValue, Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ public boolean isNewerVersion(Object currentValue, Object domainObject, Object primaryKey, AbstractSession session) { > Number writeLockFieldValue; > Number newWriteLockFieldValue = (Number)currentValue; > >@@ -442,7 +442,7 @@ > * Compares the value from the row and from the object (or cache). > * Will return true if the row is newer than the object. > */ >- public boolean isNewerVersion(AbstractRecord databaseRow, Object domainObject, java.util.Vector primaryKey, AbstractSession session) { >+ public boolean isNewerVersion(AbstractRecord databaseRow, Object domainObject, Object primaryKey, AbstractSession session) { > Number writeLockFieldValue; > Number newWriteLockFieldValue = (Number)databaseRow.get(getWriteLockField()); > if (isStoredInCache()) { >@@ -525,7 +525,7 @@ > * INTERNAL: > * Only applicable when the value is stored in the cache. Will merge with the parent unit of work. > */ >- public void mergeIntoParentCache(UnitOfWorkImpl uow, Vector primaryKey, Object object) { >+ public void mergeIntoParentCache(UnitOfWorkImpl uow, Object primaryKey, Object object) { > if (isStoredInCache()) { > Object parentValue = uow.getParent().getIdentityMapAccessorInstance().getWriteLockValue(primaryKey, object.getClass(), getDescriptor()); > uow.getIdentityMapAccessor().updateWriteLockValue(primaryKey, object.getClass(), parentValue); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/dynamic/DynamicTypeBuilder.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/dynamic/DynamicTypeBuilder.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/dynamic/DynamicTypeBuilder.java (working copy) >@@ -164,7 +164,7 @@ > descriptor.setInstantiationPolicy(new DynamicTypeInstantiationPolicy((DynamicTypeImpl) getType())); > > for (int index = 0; index < descriptor.getMappings().size(); index++) { >- addMapping((DatabaseMapping) descriptor.getMappings().get(index)); >+ addMapping(descriptor.getMappings().get(index)); > } > > descriptor.setProperty(DynamicTypeImpl.DESCRIPTOR_PROPERTY, entityType); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/QueryException.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/QueryException.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/QueryException.java (working copy) >@@ -881,7 +881,7 @@ > return queryException; > } > >- public static QueryException classPkDoesNotExistInCache(Class theClass, java.util.Vector primaryKey) { >+ public static QueryException classPkDoesNotExistInCache(Class theClass, Object primaryKey) { > Object[] args = { theClass, primaryKey }; > > QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CLASS_PK_DOES_NOT_EXIST_IN_CACHE, args)); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/indirection/IndirectList.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/indirection/IndirectList.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/indirection/IndirectList.java (working copy) >@@ -633,7 +633,7 @@ > if (hasBeenRegistered() || hasTrackedPropertyChangeListener()) { > Iterator objects = iterator(); > while (objects.hasNext()) { >- Object object = objects.next(); >+ objects.next(); > objects.remove(); > } > return; >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java (revision 6201) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java (working copy) >@@ -451,7 +451,7 @@ > AbstractSession session = query.getSession(); > session.startOperationProfile(SessionProfiler.OBJECT_BUILDING, query, SessionProfiler.ALL); > >- Vector primaryKey = extractPrimaryKeyFromRow(databaseRow, session); >+ Object primaryKey = extractPrimaryKeyFromRow(databaseRow, session); > > // Check for null primary key, this is not allowed. > if ((primaryKey == null) && (!query.hasPartialAttributeExpressions()) && (!this.descriptor.isAggregateCollectionDescriptor())) { >@@ -531,7 +531,7 @@ > * shared cache) or buildWorkingCopyCloneNormally (placing the result in the > * shared cache). > */ >- protected Object buildObjectInUnitOfWork(ObjectBuildingQuery query, JoinedAttributeManager joinManager, AbstractRecord databaseRow, UnitOfWorkImpl unitOfWork, Vector primaryKey, ClassDescriptor concreteDescriptor) throws DatabaseException, QueryException { >+ protected Object buildObjectInUnitOfWork(ObjectBuildingQuery query, JoinedAttributeManager joinManager, AbstractRecord databaseRow, UnitOfWorkImpl unitOfWork, Object primaryKey, ClassDescriptor concreteDescriptor) throws DatabaseException, QueryException { > // When in transaction we are reading via the write connection > // and so do not want to corrupt the shared cache with dirty objects. > // Hence we build and refresh clones directly from the database row. >@@ -563,7 +563,7 @@ > * <p> > * Represents the way TopLink has always worked. > */ >- protected Object buildWorkingCopyCloneNormally(ObjectBuildingQuery query, AbstractRecord databaseRow, UnitOfWorkImpl unitOfWork, Vector primaryKey, ClassDescriptor concreteDescriptor, JoinedAttributeManager joinManager) throws DatabaseException, QueryException { >+ protected Object buildWorkingCopyCloneNormally(ObjectBuildingQuery query, AbstractRecord databaseRow, UnitOfWorkImpl unitOfWork, Object primaryKey, ClassDescriptor concreteDescriptor, JoinedAttributeManager joinManager) throws DatabaseException, QueryException { > // First check local unit of work cache. > CacheKey unitOfWorkCacheKey = unitOfWork.getIdentityMapAccessorInstance().acquireLock(primaryKey, concreteDescriptor.getJavaClass(), concreteDescriptor); > Object clone = unitOfWorkCacheKey.getObject(); >@@ -634,7 +634,7 @@ > * Return an instance of the receivers javaClass. Set the attributes of an instance > * from the values stored in the database row. > */ >- protected Object buildObject(boolean returnCacheKey, ObjectBuildingQuery query, AbstractRecord databaseRow, AbstractSession session, Vector primaryKey, ClassDescriptor concreteDescriptor, JoinedAttributeManager joinManager) throws DatabaseException, QueryException { >+ protected Object buildObject(boolean returnCacheKey, ObjectBuildingQuery query, AbstractRecord databaseRow, AbstractSession session, Object primaryKey, ClassDescriptor concreteDescriptor, JoinedAttributeManager joinManager) throws DatabaseException, QueryException { > Object domainObject = null; > > // Cache key is used for object locking. >@@ -703,7 +703,7 @@ > // PERF: Cache the primary key and cache key if implements PersistenceEntity. > if (domainObject instanceof PersistenceEntity) { > ((PersistenceEntity)domainObject)._persistence_setCacheKey(cacheKey); >- ((PersistenceEntity)domainObject)._persistence_setPKVector(primaryKey); >+ ((PersistenceEntity)domainObject)._persistence_setPKVector((Vector)primaryKey); > } > } else { > if (query.isReadObjectQuery() && ((ReadObjectQuery)query).shouldLoadResultIntoSelectionObject()) { >@@ -1335,7 +1335,7 @@ > * cache. This is because we might violate transaction isolation by > * putting uncommitted versions of objects in the shared cache. > */ >- protected Object buildWorkingCopyCloneFromRow(ObjectBuildingQuery query, JoinedAttributeManager joinManager, AbstractRecord databaseRow, UnitOfWorkImpl unitOfWork, Vector primaryKey) throws DatabaseException, QueryException { >+ protected Object buildWorkingCopyCloneFromRow(ObjectBuildingQuery query, JoinedAttributeManager joinManager, AbstractRecord databaseRow, UnitOfWorkImpl unitOfWork, Object primaryKey) throws DatabaseException, QueryException { > ClassDescriptor descriptor = this.descriptor; > > // If the clone already exists then it may only need to be refreshed or returned. >@@ -1434,7 +1434,7 @@ > query.recordCloneForPessimisticLocking(workingClone, unitOfWork); > // PERF: Cache the primary key if implements PersistenceEntity. > if (workingClone instanceof PersistenceEntity) { >- ((PersistenceEntity)workingClone)._persistence_setPKVector(primaryKey); >+ ((PersistenceEntity)workingClone)._persistence_setPKVector((Vector)primaryKey); > } > } finally { > unitOfWorkCacheKey.release(); >@@ -2641,7 +2641,7 @@ > * <p>Instead the copy policy must in some cases not copy at all. > * this allows the stub of the clone to be registered before cloning its parts. > */ >- public Object instantiateWorkingCopyCloneFromRow(AbstractRecord row, ObjectBuildingQuery query, Vector primaryKey, UnitOfWorkImpl unitOfWork) { >+ public Object instantiateWorkingCopyCloneFromRow(AbstractRecord row, ObjectBuildingQuery query, Object primaryKey, UnitOfWorkImpl unitOfWork) { > return this.descriptor.getCopyPolicy().buildWorkingCopyCloneFromRow(row, query, primaryKey, unitOfWork); > } > >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/OptimisticLockingPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/OptimisticLockingPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/descriptors/OptimisticLockingPolicy.java (working copy) >@@ -13,7 +13,6 @@ > package org.eclipse.persistence.internal.descriptors; > > import java.io.Serializable; >-import java.util.Vector; > > import org.eclipse.persistence.expressions.*; > import org.eclipse.persistence.internal.helper.DatabaseField; >@@ -129,7 +128,7 @@ > * PUBLIC: > * Return the number of versions different between these objects. > */ >- public int getVersionDifference(Object currentValue, Object domainObject, Vector primaryKeys, AbstractSession session); >+ public int getVersionDifference(Object currentValue, Object domainObject, Object primaryKey, AbstractSession session); > > /** > * INTERNAL: >@@ -145,7 +144,7 @@ > * > * #see this method in VersionLockingPolicy > */ >- public Object getWriteLockValue(Object domainObject, java.util.Vector primaryKey, AbstractSession session); >+ public Object getWriteLockValue(Object domainObject, Object primaryKey, AbstractSession session); > > /** > * INTERNAL: >@@ -190,7 +189,7 @@ > * > * #see this method in VersionLockingPolicy > */ >- public boolean isNewerVersion(Object currentValue, Object domainObject, Vector primaryKey, AbstractSession session); >+ public boolean isNewerVersion(Object currentValue, Object domainObject, Object primaryKey, AbstractSession session); > > /** > * INTERNAL: >@@ -201,7 +200,7 @@ > * > * #see this method in VersionLockingPolicy > */ >- public boolean isNewerVersion(AbstractRecord databaseRow, Object domainObject, java.util.Vector primaryKey, AbstractSession session); >+ public boolean isNewerVersion(AbstractRecord databaseRow, Object domainObject, Object primaryKey, AbstractSession session); > > /** > * INTERNAL: >@@ -209,7 +208,7 @@ > * > * #see this method in VersionLockingPolicy > */ >- public void mergeIntoParentCache(UnitOfWorkImpl uow, java.util.Vector primaryKey, Object object); >+ public void mergeIntoParentCache(UnitOfWorkImpl uow, Object primaryKey, Object object); > > /** > * INTERNAL: >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ClassTypeExpression.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ClassTypeExpression.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ClassTypeExpression.java (working copy) >@@ -230,7 +230,6 @@ > * return value (a class), as none of the expressions will have a session. > */ > public ClassDescriptor getContainingDescriptor(ObjectLevelReadQuery query) { >- AbstractSession session; > Class queryClass = null; > if (getBaseExpression().isExpressionBuilder()){ > queryClass = ((ExpressionBuilder)getBaseExpression()).getQueryClass(); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ForUpdateOfClause.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ForUpdateOfClause.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ForUpdateOfClause.java (working copy) >@@ -89,7 +89,7 @@ > for (Enumeration enumtr = getLockedExpressions().elements(); enumtr.hasMoreElements();) { > Expression next = (Expression)enumtr.nextElement(); > // Necessary as this was determined in query framework. >- next = (Expression)next.rebuildOn(clonedBuilder); >+ next = next.rebuildOn(clonedBuilder); > if(next.isObjectExpression()) { > ObjectExpression objectExp = (ObjectExpression)next; > objectExp.writeForUpdateOfFields(printer, statement); >@@ -123,7 +123,7 @@ > Expression next = (Expression)enumtr.nextElement(); > > // Necessary as this was determined in query framework. >- next = (Expression)next.rebuildOn(clonedBuilder); >+ next = next.rebuildOn(clonedBuilder); > // next is either ObjectExpression or FieldExpression > if(next.isFieldExpression()) { > next = ((FieldExpression)next).getBaseExpression(); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/MapEntryExpression.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/MapEntryExpression.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/MapEntryExpression.java (working copy) >@@ -247,7 +247,7 @@ > } > InterfaceContainerPolicy cp = null; > try{ >- cp = (InterfaceContainerPolicy)((CollectionMapping)getMapping()).getContainerPolicy(); >+ cp = (InterfaceContainerPolicy)getMapping().getContainerPolicy(); > } catch (ClassCastException e){ > throw QueryException.mapEntryExpressionForNonMap(getBaseExpression(), getMapping()); > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/CustomObjectInputStream.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/CustomObjectInputStream.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/CustomObjectInputStream.java (working copy) >@@ -39,6 +39,6 @@ > } > > public Class resolveClass(ObjectStreamClass classDesc) throws ClassNotFoundException, IOException { >- return (Class)m_conversionManager.convertClassNameToClass(classDesc.getName()); >+ return m_conversionManager.convertClassNameToClass(classDesc.getName()); > } > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/AbstractIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/AbstractIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/AbstractIdentityMap.java (working copy) >@@ -64,7 +64,7 @@ > * This first thread will get an active lock. > * Other threads will get deferred locks, all threads will wait until all other threads are complete before releasing their locks. > */ >- public CacheKey acquireDeferredLock(Vector primaryKey) { >+ public CacheKey acquireDeferredLock(Object primaryKey) { > // Create and lock a new cacheKey. > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > newCacheKey.acquireDeferredLock(); >@@ -85,7 +85,7 @@ > * Acquire an active lock on the object. > * This is used by reading (when using indirection or no relationships) and by merge. > */ >- public CacheKey acquireLock(Vector primaryKey, boolean forMerge) { >+ public CacheKey acquireLock(Object primaryKey, boolean forMerge) { > // Create and lock a new cacheKey. > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > newCacheKey.acquire(forMerge); >@@ -106,7 +106,7 @@ > * Acquire an active lock on the object, if not already locked. > * This is used by merge for missing existing objects. > */ >- public CacheKey acquireLockNoWait(Vector primaryKey, boolean forMerge) { >+ public CacheKey acquireLockNoWait(Object primaryKey, boolean forMerge) { > // Create and lock a new cacheKey. > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > newCacheKey.acquire(forMerge); >@@ -130,7 +130,7 @@ > * Acquire an active lock on the object, if not already locked. > * This is used by merge for missing existing objects. > */ >- public CacheKey acquireLockWithWait(Vector primaryKey, boolean forMerge, int wait) { >+ public CacheKey acquireLockWithWait(Object primaryKey, boolean forMerge, int wait) { > // Create and lock a new cacheKey. > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > newCacheKey.acquire(forMerge); >@@ -155,7 +155,7 @@ > * This is used by UnitOfWork cloning. > * This will allow multiple users to read the same object but prevent writes to the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKey(Vector primaryKey) { >+ public CacheKey acquireReadLockOnCacheKey(Object primaryKey) { > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > CacheKey cacheKey = getCacheKey(newCacheKey); > if (cacheKey == null) { >@@ -176,7 +176,7 @@ > * This is used by UnitOfWork cloning. > * This will allow multiple users to read the same object but prevent writes to the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey) { >+ public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey) { > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > CacheKey cacheKey = getCacheKey(newCacheKey); > if (cacheKey == null) { >@@ -217,21 +217,21 @@ > * User API. > * @param primaryKey is the primary key for the object to search for. > */ >- public boolean containsKey(Vector primaryKey) { >+ public boolean containsKey(Object primaryKey) { > return getCacheKeyWithReadLock(primaryKey) != null; > } > > /** > * Create the correct type of CacheKey for this map. > */ >- public CacheKey createCacheKey(Vector primaryKey, Object object, Object writeLockValue) { >+ public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue) { > return createCacheKey(primaryKey, object, writeLockValue, 0); > } > > /** > * Create the correct type of CacheKey for this map. > */ >- public CacheKey createCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >+ public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime) { > return new CacheKey(primaryKey, object, writeLockValue, readTime); > } > >@@ -244,7 +244,7 @@ > * Return the object cached in the identity map or null if it could not be found. > * User API. > */ >- public Object get(Vector primaryKey) { >+ public Object get(Object primaryKey) { > CacheKey cacheKey = getCacheKeyWithReadLock(primaryKey); > if (cacheKey == null) { > return null; >@@ -255,7 +255,7 @@ > /** > * Get the cache key (with object) for the primary key. > */ >- public CacheKey getCacheKey(Vector primaryKey) { >+ public CacheKey getCacheKey(Object primaryKey) { > CacheKey searchKey = new CacheKey(primaryKey); > return getCacheKey(searchKey); > } >@@ -263,7 +263,7 @@ > /** > * Get the cache key (with object) for the primary key. > */ >- public CacheKey getCacheKeyForLock(Vector primaryKey) { >+ public CacheKey getCacheKeyForLock(Object primaryKey) { > return getCacheKey(primaryKey); > } > >@@ -282,7 +282,7 @@ > /** > * Get the cache key (with object) for the primary key with read lock. > */ >- protected CacheKey getCacheKeyWithReadLock(Vector primaryKey) { >+ protected CacheKey getCacheKeyWithReadLock(Object primaryKey) { > CacheKey key = getCacheKey(primaryKey); > if (key != null) { > key.checkReadLock(); >@@ -323,7 +323,7 @@ > * Get the wrapper object from the cache key associated with the given primary key, > * this is used for EJB2. > */ >- public Object getWrapper(Vector primaryKey) { >+ public Object getWrapper(Object primaryKey) { > CacheKey cacheKey = getCacheKeyWithReadLock(primaryKey); > if (cacheKey == null) { > return null; >@@ -336,7 +336,7 @@ > * Get the write lock value from the cache key associated to the primarykey. > * User API. > */ >- public Object getWriteLockValue(Vector primaryKey) { >+ public Object getWriteLockValue(Object primaryKey) { > CacheKey cacheKey = getCacheKeyWithReadLock(primaryKey); > if (cacheKey == null) { > return null; >@@ -359,10 +359,10 @@ > * @param object is the domain object to cache. > * @param writeLockValue is the current write lock value of object, if null the version is ignored. > */ >- public abstract CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime); >+ public abstract CacheKey put(Object primaryKey, Object object, Object writeLockValue, long readTime); > > /** >- * This method may be called durring initialize all identity maps. It allows the identity map >+ * This method may be called during initialize all identity maps. It allows the identity map > * or interceptor the opportunity to release any resources before being thrown away. > */ > public void release(){ >@@ -374,7 +374,7 @@ > * This is used by DeleteObjectQuery and merge. > * This is also an advanced (very) user API. > */ >- public Object remove(Vector primaryKey, Object object) { >+ public Object remove(Object primaryKey, Object object) { > CacheKey key = getCacheKeyForLock(primaryKey); > return remove(key); > } >@@ -426,7 +426,7 @@ > * Update the wrapper object in the CacheKey associated with the given primaryKey, > * this is used for EJB2. > */ >- public void setWrapper(Vector primaryKey, Object wrapper) { >+ public void setWrapper(Object primaryKey, Object wrapper) { > CacheKey cacheKey = getCacheKeyForLock(primaryKey); > if (cacheKey != null) { > cacheKey.setWrapper(wrapper); >@@ -437,7 +437,7 @@ > * Update the write lock value of the CacheKey associated with the given primaryKey. > * This is used by UpdateObjectQuery, and is also an advanced (very) user API. > */ >- public void setWriteLockValue(Vector primaryKey, Object writeLockValue) { >+ public void setWriteLockValue(Object primaryKey, Object writeLockValue) { > CacheKey cacheKey = getCacheKeyForLock(primaryKey); > if (cacheKey != null) { > //lock/release the cache key during the lock value updating >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/CacheIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/CacheIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/CacheIdentityMap.java (working copy) >@@ -55,8 +55,9 @@ > this.last.setPrevious(this.first); > } > >- public CacheKey createCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >- return new LinkedCacheKey(primaryKey, object, writeLockValue, readTime); >+ @Override >+ public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime) { >+ return new LinkedCacheKey((Vector)primaryKey, object, writeLockValue, readTime); > } > > /** >@@ -79,7 +80,8 @@ > * @param primaryKeys is the primary key for the object to search for. > * @return the LinkedCacheKey or null if none found for primaryKey > */ >- public CacheKey getCacheKey(Vector primaryKeys) { >+ @Override >+ public CacheKey getCacheKey(Object primaryKeys) { > LinkedCacheKey cacheKey = (LinkedCacheKey)super.getCacheKey(primaryKeys); > if (cacheKey != null) { > synchronized (this.first) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/CacheKey.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/CacheKey.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/CacheKey.java (working copy) >@@ -87,14 +87,14 @@ > protected CacheKey(){ > } > >- public CacheKey(Vector primaryKey) { >- this.key = primaryKey; >- this.hash = computeHash(primaryKey); >+ public CacheKey(Object primaryKey) { >+ this.key = (Vector)primaryKey; >+ this.hash = computeHash((Vector)primaryKey); > } > >- public CacheKey(Vector primaryKey, Object object, Object lockValue) { >- this.key = primaryKey; >- this.hash = computeHash(primaryKey); >+ public CacheKey(Object primaryKey, Object object, Object lockValue) { >+ this.key = (Vector)primaryKey; >+ this.hash = computeHash((Vector)primaryKey); > this.writeLockValue = lockValue; > //bug4649617 use setter instead of this.object = object to avoid hard reference on object in subclasses > if (object != null) { >@@ -102,9 +102,9 @@ > } > } > >- public CacheKey(Vector primaryKey, Object object, Object lockValue, long readTime) { >- this.key = primaryKey; >- this.hash = computeHash(primaryKey); >+ public CacheKey(Object primaryKey, Object object, Object lockValue, long readTime) { >+ this.key = (Vector)primaryKey; >+ this.hash = computeHash((Vector)primaryKey); > this.writeLockValue = lockValue; > //bug4649617 use setter instead of this.object = object to avoid hard reference on object in subclasses > if (object != null) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/FullIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/FullIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/FullIdentityMap.java (working copy) >@@ -27,7 +27,7 @@ > */ > public class FullIdentityMap extends AbstractIdentityMap { > >- /** Hashtable of CacheKeys stored using their key. */ >+ /** Map of CacheKeys stored using their key. */ > protected Map<CacheKey, CacheKey> cacheKeys; > > public FullIdentityMap() {} >@@ -46,6 +46,7 @@ > * INTERNAL: > * Clones itself. > */ >+ @Override > public Object clone() { > FullIdentityMap clone = (FullIdentityMap)super.clone(); > clone.setCacheKeys(new ConcurrentHashMap(getCacheKeys().size())); >@@ -62,6 +63,7 @@ > * INTERNAL: > * Used to print all the Locks in every identity map in this session. > */ >+ @Override > public void collectLocks(HashMap threadList) { > Iterator cacheKeyIterator = getCacheKeys().values().iterator(); > while (cacheKeyIterator.hasNext()) { >@@ -81,6 +83,7 @@ > /** > * Allow for the cache to be iterated on. > */ >+ @Override > public Enumeration elements() { > return new IdentityMapEnumeration(this); > } >@@ -89,6 +92,7 @@ > * Return the cache key matching the primary key of the searchKey. > * If no object for the key exists, return null. > */ >+ @Override > protected CacheKey getCacheKey(CacheKey searchKey) { > return getCacheKeys().get(searchKey); > } >@@ -98,6 +102,7 @@ > * If the CacheKey is missing then put the searchKey in the map. > * The searchKey should have already been locked. > */ >+ @Override > protected CacheKey getCacheKeyIfAbsentPut(CacheKey searchKey) { > // PERF: First to a get, and get is non-locking, putIfAbsent locks. > CacheKey cacheKey = getCacheKeys().get(searchKey); >@@ -119,6 +124,7 @@ > * Return the number of CacheKeys in the IdentityMap. > * This may contain weak referenced objects that have been garbage collected. > */ >+ @Override > public int getSize() { > return this.cacheKeys.size(); > } >@@ -127,6 +133,7 @@ > * Return the number of actual objects of type myClass in the IdentityMap. > * Recurse = true will include subclasses of myClass in the count. > */ >+ @Override > public int getSize(Class myClass, boolean recurse) { > int count = 0; > Iterator keys = getCacheKeys().values().iterator(); >@@ -151,8 +158,9 @@ > * Allow for the cache keys to be iterated on. > * Read locks will be checked. > */ >+ @Override > public Enumeration keys() { >- return this.keys(true); >+ return keys(true); > } > > /** >@@ -172,7 +180,8 @@ > * @param object is the domain object to cache. > * @param writeLockValue is the current write lock value of object, if null the version is ignored. > */ >- public CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >+ @Override >+ public CacheKey put(Object primaryKey, Object object, Object writeLockValue, long readTime) { > CacheKey newCacheKey = createCacheKey(primaryKey, object, writeLockValue, readTime); > // Find the cache key in the map, reset it, or put the new one. > CacheKey cacheKey = getCacheKeyIfAbsentPut(newCacheKey); >@@ -190,6 +199,7 @@ > * Removes the CacheKey from the map. > * @return the object held within the CacheKey or null if no object cached for given cacheKey. > */ >+ @Override > public Object remove(CacheKey cacheKey) { > if (cacheKey != null) { > // Cache key needs to be locked when removing from the map. >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/HardCacheWeakIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/HardCacheWeakIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/HardCacheWeakIdentityMap.java (working copy) >@@ -44,8 +44,9 @@ > * Use a ReferenceCacheKey that also stores the linked list node to manage > * the LRU sub-cache of references. > */ >- public CacheKey createCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >- return new ReferenceCacheKey(primaryKey, object, writeLockValue, readTime); >+ @Override >+ public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime) { >+ return new ReferenceCacheKey((Vector)primaryKey, object, writeLockValue, readTime); > } > > /** >@@ -91,7 +92,8 @@ > /** > * Store the object in the cache at its primary key, and add to sub-cache list. > */ >- public CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >+ @Override >+ public CacheKey put(Object primaryKey, Object object, Object writeLockValue, long readTime) { > CacheKey cacheKey = super.put(primaryKey, object, writeLockValue, readTime); > cacheKey.updateAccess(); > return cacheKey; >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/IdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/IdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/IdentityMap.java (working copy) >@@ -14,7 +14,6 @@ > > import java.util.Enumeration; > import java.util.HashMap; >-import java.util.Vector; > > import org.eclipse.persistence.descriptors.ClassDescriptor; > >@@ -37,39 +36,39 @@ > * This first thread will get an active lock. > * Other threads will get deferred locks, all threads will wait until all other threads are complete before releasing their locks. > */ >- public CacheKey acquireDeferredLock(Vector primaryKey); >+ public CacheKey acquireDeferredLock(Object primaryKey); > > /** > * Acquire an active lock on the object. > * This is used by reading (when using indirection or no relationships) and by merge. > */ >- public CacheKey acquireLock(Vector primaryKey, boolean forMerge); >+ public CacheKey acquireLock(Object primaryKey, boolean forMerge); > > /** > * Acquire an active lock on the object, if not already locked. > * This is used by merge for missing existing objects. > */ >- public CacheKey acquireLockNoWait(Vector primaryKey, boolean forMerge); >+ public CacheKey acquireLockNoWait(Object primaryKey, boolean forMerge); > > /** > * Acquire an active lock on the object, if not already locked. > * This is used by merge for missing existing objects. > */ >- public CacheKey acquireLockWithWait(Vector primaryKey, boolean forMerge, int wait); >+ public CacheKey acquireLockWithWait(Object primaryKey, boolean forMerge, int wait); > > /** > * Acquire a read lock on the object. > * This is used by UnitOfWork cloning. > * This will allow multiple users to read the same object but prevent writes to the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKey(Vector primaryKey); >+ public CacheKey acquireReadLockOnCacheKey(Object primaryKey); > > /** > * Acquire a read lock on the object, if not already locked. > * This is used by UnitOfWork cloning. > * This will allow multiple users to read the same object but prevent writes to the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey); >+ public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey); > > /** > * Clone the map and all of the CacheKeys. >@@ -89,7 +88,7 @@ > * User API. > * @param primaryKey is the primary key for the object to search for. > */ >- public boolean containsKey(Vector primaryKey); >+ public boolean containsKey(Object primaryKey); > > /** > * Allow for the cache to be iterated on. >@@ -100,17 +99,17 @@ > * Return the object cached in the identity map or null if it could not be found. > * User API. > */ >- public Object get(Vector primaryKey); >+ public Object get(Object primaryKey); > > /** > * Get the cache key (with object) for the primary key. > */ >- public CacheKey getCacheKey(Vector primaryKey); >+ public CacheKey getCacheKey(Object primaryKey); > > /** > * Get the cache key (with object) for the primary key in order to acquire a lock. > */ >- public CacheKey getCacheKeyForLock(Vector primaryKey); >+ public CacheKey getCacheKeyForLock(Object primaryKey); > > /** > * Return the class that this is the map for. >@@ -143,13 +142,13 @@ > * Get the wrapper object from the cache key associated with the given primary key, > * this is used for EJB2. > */ >- public Object getWrapper(Vector primaryKey); >+ public Object getWrapper(Object primaryKey); > > /** > * Get the write lock value from the cache key associated to the primarykey. > * User API. > */ >- public Object getWriteLockValue(Vector primaryKey); >+ public Object getWriteLockValue(Object primaryKey); > > /** > * Allow for the CacheKeys to be iterated on. >@@ -172,7 +171,7 @@ > * @param object is the domain object to cache. > * @param writeLockValue is the current write lock value of object, if null the version is ignored. > */ >- public CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime); >+ public CacheKey put(Object primaryKey, Object object, Object writeLockValue, long readTime); > > /** > * This method may be called during initialize all identity maps. It allows the identity map >@@ -185,7 +184,7 @@ > * This is used by DeleteObjectQuery and merge. > * This is also an advanced (very) user API. > */ >- public Object remove(Vector primaryKey, Object object); >+ public Object remove(Object primaryKey, Object object); > > /** > * Remove the CacheKey from the map. >@@ -208,13 +207,13 @@ > * Update the wrapper object in the CacheKey associated with the given primaryKey, > * this is used for EJB2. > */ >- public void setWrapper(Vector primaryKey, Object wrapper); >+ public void setWrapper(Object primaryKey, Object wrapper); > > /** > * Update the write lock value of the CacheKey associated with the given primaryKey. > * This is used by UpdateObjectQuery, and is also an advanced (very) user API. > */ >- public void setWriteLockValue(Vector primaryKey, Object writeLockValue); >+ public void setWriteLockValue(Object primaryKey, Object writeLockValue); > > public String toString(); > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/IdentityMapManager.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/IdentityMapManager.java (revision 6201) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/IdentityMapManager.java (working copy) >@@ -91,7 +91,7 @@ > /** > * Provides access for setting a deferred lock on an object in the IdentityMap. > */ >- public CacheKey acquireDeferredLock(Vector primaryKey, Class domainClass, ClassDescriptor descriptor) { >+ public CacheKey acquireDeferredLock(Object primaryKey, Class domainClass, ClassDescriptor descriptor) { > CacheKey cacheKey = null; > if (this.isCacheAccessPreCheckRequired) { > this.session.startOperationProfile(SessionProfiler.CACHE); >@@ -113,7 +113,7 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLock(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { >+ public CacheKey acquireLock(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { > CacheKey cacheKey = null; > if (this.isCacheAccessPreCheckRequired) { > this.session.startOperationProfile(SessionProfiler.CACHE); >@@ -135,7 +135,7 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLockNoWait(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { >+ public CacheKey acquireLockNoWait(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { > CacheKey cacheKey = null; > if (this.isCacheAccessPreCheckRequired) { > this.session.startOperationProfile(SessionProfiler.CACHE); >@@ -157,7 +157,7 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLockWithWait(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor, int wait) { >+ public CacheKey acquireLockWithWait(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor, int wait) { > CacheKey cacheKey = null; > if (this.isCacheAccessPreCheckRequired) { > this.session.startOperationProfile(SessionProfiler.CACHE); >@@ -207,7 +207,7 @@ > * This will allow multiple users to read the same object but prevent writes to > * the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKey(Vector primaryKey, Class domainClass, ClassDescriptor descriptor) { >+ public CacheKey acquireReadLockOnCacheKey(Object primaryKey, Class domainClass, ClassDescriptor descriptor) { > CacheKey cacheKey = null; > if (this.isCacheAccessPreCheckRequired) { > this.session.startOperationProfile(SessionProfiler.CACHE); >@@ -232,7 +232,7 @@ > * the object while the read lock is held. > * If no readlock can be acquired then do not wait but return null. > */ >- public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey, Class domainClass, ClassDescriptor descriptor) { >+ public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey, Class domainClass, ClassDescriptor descriptor) { > CacheKey cacheKey = null; > if (this.isCacheAccessPreCheckRequired) { > this.session.startOperationProfile(SessionProfiler.CACHE); >@@ -393,13 +393,9 @@ > * User API. > * @param key is the primary key for the object to search for. > */ >- public boolean containsKey(Vector key, Class theClass, ClassDescriptor descriptor) { >- // Check for null, contains causes null pointer. >- int size = key.size(); >- for (int index = 0; index < size; index++) { >- if (key.get(index) == null) { >- return false; >- } >+ public boolean containsKey(Object key, Class theClass, ClassDescriptor descriptor) { >+ if (key == null) { >+ return false; > } > IdentityMap map = getIdentityMap(descriptor, true); > if (map == null) { >@@ -577,7 +573,7 @@ > /** > * Retrieve the cache key for the given identity information. > */ >- public CacheKey getCacheKeyForObjectForLock(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ public CacheKey getCacheKeyForObjectForLock(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > IdentityMap map = getIdentityMap(descriptor, true); > if (map == null) { > return null; >@@ -601,7 +597,7 @@ > /** > * Retrieve the cache key for the given identity information. > */ >- public CacheKey getCacheKeyForObject(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ public CacheKey getCacheKeyForObject(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > IdentityMap map = getIdentityMap(descriptor, true); > if (map == null) { > return null; >@@ -655,7 +651,7 @@ > /** > * Get the object from the identity map which has the given primary key and class. > */ >- public Object getFromIdentityMap(Vector key, Class theClass, ClassDescriptor descriptor) { >+ public Object getFromIdentityMap(Object key, Class theClass, ClassDescriptor descriptor) { > return getFromIdentityMap(key, theClass, true, descriptor); > } > >@@ -663,7 +659,7 @@ > * Get the object from the identity map which has the given primary key and class. > * Only return the object if it has not been invalidated. > */ >- public Object getFromIdentityMap(Vector key, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ public Object getFromIdentityMap(Object key, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > if (key == null) { > return null; > } >@@ -784,7 +780,7 @@ > * Get the object from the cache with the given primary key and class. > * Do not return the object if it was invalidated. > */ >- public Object getFromIdentityMapWithDeferredLock(Vector key, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ public Object getFromIdentityMapWithDeferredLock(Object key, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > if (key == null) { > this.session.incrementProfile(SessionProfiler.CacheMisses); > return null; >@@ -914,7 +910,7 @@ > return null; > } > >- Vector lookupParameters = parameters; >+ Object lookupParameters = parameters; > if (lookupParameters == null) { > lookupParameters = new NonSynchronizedVector(0); > } >@@ -934,7 +930,7 @@ > * Get the wrapper object from the cache key associated with the given primary key, > * this is used for EJB. > */ >- public Object getWrapper(Vector primaryKey, Class theClass) { >+ public Object getWrapper(Object primaryKey, Class theClass) { > ClassDescriptor descriptor = this.session.getDescriptor(theClass); > IdentityMap map = getIdentityMap(descriptor, false); > Object wrapper; >@@ -970,7 +966,7 @@ > /** > * Retrieve the write lock value of the cache key associated with the given primary key, > */ >- public Object getWriteLockValue(Vector primaryKey, Class domainClass, ClassDescriptor descriptor) { >+ public Object getWriteLockValue(Object primaryKey, Class domainClass, ClassDescriptor descriptor) { > IdentityMap map = getIdentityMap(descriptor, false); > Object value; > if (this.isCacheAccessPreCheckRequired) { >@@ -1164,7 +1160,7 @@ > * The object must always be registered with its version number if optimistic locking is used. > * The readTime may also be included in the cache key as it is constructed > */ >- public CacheKey putInIdentityMap(Object domainObject, Vector keys, Object writeLockValue, long readTime, ClassDescriptor descriptor) { >+ public CacheKey putInIdentityMap(Object domainObject, Object keys, Object writeLockValue, long readTime, ClassDescriptor descriptor) { > ObjectBuilder builder = descriptor.getObjectBuilder(); > Object implementation = builder.unwrapObject(domainObject, this.session); > >@@ -1208,7 +1204,7 @@ > } > } > } >- Vector lookupParameters = parameters; >+ Object lookupParameters = parameters; > if (lookupParameters == null) { > lookupParameters = new NonSynchronizedVector(0); > } >@@ -1252,7 +1248,7 @@ > /** > * Remove the object from the object cache. > */ >- public Object removeFromIdentityMap(Vector key, Class domainClass, ClassDescriptor descriptor, Object objectToRemove) { >+ public Object removeFromIdentityMap(Object key, Class domainClass, ClassDescriptor descriptor, Object objectToRemove) { > IdentityMap map = getIdentityMap(descriptor, false); > Object value; > >@@ -1294,7 +1290,7 @@ > * Update the wrapper object the cache key associated with the given primary key, > * this is used for EJB. > */ >- public void setWrapper(Vector primaryKey, Class theClass, Object wrapper) { >+ public void setWrapper(Object primaryKey, Class theClass, Object wrapper) { > ClassDescriptor descriptor = this.session.getDescriptor(theClass); > IdentityMap map = getIdentityMap(descriptor, false); > >@@ -1316,7 +1312,7 @@ > /** > * Update the write lock value of the cache key associated with the given primary key, > */ >- public void setWriteLockValue(Vector primaryKey, Class theClass, Object writeLockValue) { >+ public void setWriteLockValue(Object primaryKey, Class theClass, Object writeLockValue) { > ClassDescriptor descriptor = this.session.getDescriptor(theClass); > IdentityMap map = getIdentityMap(descriptor, false); > >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/NoIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/NoIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/NoIdentityMap.java (working copy) >@@ -35,6 +35,7 @@ > /** > * NoIdentityMap has no locks. > */ >+ @Override > public void collectLocks(HashMap threadList) { > return; > } >@@ -42,6 +43,7 @@ > /** > * Return an empty enumerator. > */ >+ @Override > public Enumeration elements() { > return new Vector(0).elements(); > } >@@ -49,13 +51,15 @@ > /** > * Return null as no objects are cached. > */ >- public Object get(Vector primaryKey) { >+ @Override >+ public Object get(Object primaryKey) { > return null; > } > > /** > * Return null as no objects are cached. > */ >+ @Override > protected CacheKey getCacheKey(CacheKey searchKey) { > return null; > } >@@ -63,6 +67,7 @@ > /** > * Return null as no objects are cached. > */ >+ @Override > protected CacheKey getCacheKeyIfAbsentPut(CacheKey cacheKey) { > return null; > } >@@ -70,6 +75,7 @@ > /** > * Return 0 as no objects are cached. > */ >+ @Override > public int getSize() { > return 0; > } >@@ -77,6 +83,7 @@ > /** > * Return 0 as no objects are cached. > */ >+ @Override > public int getSize(Class myClass, boolean recurse) { > return 0; > } >@@ -84,43 +91,40 @@ > /** > * Return null as no objects are cached. > */ >- public Object getWriteLockValue(Vector primaryKey) { >+ @Override >+ public Object getWriteLockValue(Object primaryKey) { > return null; > } > > /** > * Return an empty enumerator. > */ >+ @Override > public Enumeration keys() { >- return new Vector(1).elements(); >+ return new Vector(0).elements(); > } > > /** > * Return an empty enumerator. > */ >- public Enumeration keys(boolean shouldCheckReadLocks) { >- return new Vector(1).elements(); >+ public Enumeration keys(boolean checkReadLocks) { >+ return keys(); > } > > /** > * Do Nothing. > */ >- public CacheKey put(Vector aVector, Object object, Object writeLockValue, long readTime) { >+ @Override >+ public CacheKey put(Object primaryKey, Object object, Object writeLockValue, long readTime) { > return null; > } > > /** > * Do Nothing. >- */ >- public void put(CacheKey key) { >- return; >- } >- >- /** >- * Do Nothing. > * Return null, since no objects are cached. > */ >- public Object remove(Vector primaryKey, Object object) { >+ @Override >+ public Object remove(Object primaryKey, Object object) { > return null; > } > >@@ -128,6 +132,7 @@ > * Do Nothing. > * Return null, since no objects are cached. > */ >+ @Override > public Object remove(CacheKey searchKey) { > return null; > } >@@ -135,7 +140,8 @@ > /** > * Do Nothing. > */ >- public void setWriteLockValue(Vector primaryKey, Object writeLockValue) { >+ @Override >+ public void setWriteLockValue(Object primaryKey, Object writeLockValue) { > return; > } > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/SoftIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/SoftIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/SoftIdentityMap.java (working copy) >@@ -35,7 +35,8 @@ > this.cleanupSize = size; > } > >- public CacheKey createCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >- return new SoftCacheKey(primaryKey, object, writeLockValue, readTime); >+ @Override >+ public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime) { >+ return new SoftCacheKey((Vector)primaryKey, object, writeLockValue, readTime); > } > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/UnitOfWorkIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/UnitOfWorkIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/UnitOfWorkIdentityMap.java (working copy) >@@ -31,15 +31,17 @@ > this.cacheKeys = new HashMap(size); > this.descriptor = descriptor; > } >- >- public CacheKey createCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >- return new UnitOfWorkCacheKey(primaryKey, object, writeLockValue, readTime); >+ >+ @Override >+ public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime) { >+ return new UnitOfWorkCacheKey((Vector)primaryKey, object, writeLockValue, readTime); > } > > /** > * Avoid acquiring any lock as uow is single threaded. > */ >- public CacheKey acquireDeferredLock(Vector primaryKey) { >+ @Override >+ public CacheKey acquireDeferredLock(Object primaryKey) { > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > CacheKey cacheKey = getCacheKeyIfAbsentPut(newCacheKey); > if (cacheKey == null) { >@@ -51,7 +53,8 @@ > /** > * Avoid acquiring any lock as uow is single threaded. > */ >- public CacheKey acquireLock(Vector primaryKey, boolean forMerge) { >+ @Override >+ public CacheKey acquireLock(Object primaryKey, boolean forMerge) { > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > CacheKey cacheKey = getCacheKeyIfAbsentPut(newCacheKey); > if (cacheKey == null) { >@@ -63,7 +66,8 @@ > /** > * Avoid acquiring any lock as uow is single threaded. > */ >- public CacheKey acquireLockNoWait(Vector primaryKey, boolean forMerge) { >+ @Override >+ public CacheKey acquireLockNoWait(Object primaryKey, boolean forMerge) { > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > CacheKey cacheKey = getCacheKeyIfAbsentPut(newCacheKey); > if (cacheKey == null) { >@@ -75,7 +79,8 @@ > /** > * Avoid acquiring any lock as uow is single threaded. > */ >- public CacheKey acquireLockWithWait(Vector primaryKey, boolean forMerge, int wait) { >+ @Override >+ public CacheKey acquireLockWithWait(Object primaryKey, boolean forMerge, int wait) { > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > CacheKey cacheKey = getCacheKeyIfAbsentPut(newCacheKey); > if (cacheKey == null) { >@@ -87,14 +92,16 @@ > /** > * Avoid acquiring any lock as uow is single threaded. > */ >- public CacheKey acquireReadLockOnCacheKey(Vector primaryKey) { >+ @Override >+ public CacheKey acquireReadLockOnCacheKey(Object primaryKey) { > return acquireReadLockOnCacheKeyNoWait(primaryKey); > } > > /** > * Avoid acquiring any lock as uow is single threaded. > */ >- public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey) { >+ @Override >+ public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey) { > CacheKey newCacheKey = createCacheKey(primaryKey, null, null); > CacheKey cacheKey = getCacheKey(newCacheKey); > if (cacheKey == null) { >@@ -106,7 +113,8 @@ > /** > * Avoid acquiring any lock as uow is single threaded. > */ >- protected CacheKey getCacheKeyWithReadLock(Vector primaryKey) { >+ @Override >+ protected CacheKey getCacheKeyWithReadLock(Object primaryKey) { > return getCacheKey(primaryKey); > } > >@@ -127,6 +135,7 @@ > /** > * Avoid acquiring any lock as uow is single threaded. > */ >+ @Override > public Object remove(CacheKey cacheKey) { > if (cacheKey != null) { > getCacheKeys().remove(cacheKey); >@@ -139,6 +148,7 @@ > /** > * Avoid acquiring any lock as uow is single threaded. > */ >+ @Override > public void resetCacheKey(CacheKey key, Object object, Object writeLockValue, long readTime) { > key.setObject(object); > key.setWriteLockValue(writeLockValue); >@@ -148,7 +158,8 @@ > /** > * Avoid acquiring any lock as uow is single threaded. > */ >- public void setWriteLockValue(Vector primaryKey, Object writeLockValue) { >+ @Override >+ public void setWriteLockValue(Object primaryKey, Object writeLockValue) { > CacheKey cacheKey = getCacheKeyForLock(primaryKey); > if (cacheKey != null) { > cacheKey.setWriteLockValue(writeLockValue); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/WeakIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/WeakIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/WeakIdentityMap.java (working copy) >@@ -70,13 +70,15 @@ > } > } > >- public CacheKey createCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >- return new WeakCacheKey(primaryKey, object, writeLockValue, readTime); >+ @Override >+ public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime) { >+ return new WeakCacheKey((Vector)primaryKey, object, writeLockValue, readTime); > } > > /** > * Need to check for cleanup on put. > */ >+ @Override > protected CacheKey getCacheKeyIfAbsentPut(CacheKey searchKey) { > CacheKey cacheKey = super.getCacheKeyIfAbsentPut(searchKey); > if (cacheKey == null) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/WeakUnitOfWorkIdentityMap.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/WeakUnitOfWorkIdentityMap.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/WeakUnitOfWorkIdentityMap.java (working copy) >@@ -37,13 +37,15 @@ > } > } > >- public CacheKey createCacheKey(Vector primaryKey, Object object, Object writeLockValue, long readTime) { >- return new QueueableWeakCacheKey(primaryKey, object, writeLockValue, readTime, referenceQueue); >+ @Override >+ public CacheKey createCacheKey(Object primaryKey, Object object, Object writeLockValue, long readTime) { >+ return new QueueableWeakCacheKey((Vector)primaryKey, object, writeLockValue, readTime, referenceQueue); > } > > /** > * Need to check for cleanup on put. > */ >+ @Override > protected CacheKey getCacheKeyIfAbsentPut(CacheKey searchKey) { > CacheKey cacheKey = super.getCacheKeyIfAbsentPut(searchKey); > if (cacheKey == null) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/CaseNode.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/CaseNode.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/CaseNode.java (working copy) >@@ -43,7 +43,6 @@ > * Apply this node to the passed query > */ > public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext) { >- ParseTreeContext context = generationContext.getParseTreeContext(); > if (theQuery instanceof ReportQuery) { > ReportQuery reportQuery = (ReportQuery)theQuery; > Expression expression = generateExpression(generationContext); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/ClassForInheritanceNode.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/ClassForInheritanceNode.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/ClassForInheritanceNode.java (working copy) >@@ -27,7 +27,6 @@ > * Apply this node to the passed query > */ > public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext) { >- ParseTreeContext context = generationContext.getParseTreeContext(); > if (theQuery instanceof ReportQuery) { > ReportQuery reportQuery = (ReportQuery)theQuery; > Expression expression = generateExpression(generationContext); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/CoalesceNode.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/CoalesceNode.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/CoalesceNode.java (working copy) >@@ -42,7 +42,6 @@ > * Apply this node to the passed query > */ > public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext) { >- ParseTreeContext context = generationContext.getParseTreeContext(); > if (theQuery instanceof ReportQuery) { > ReportQuery reportQuery = (ReportQuery)theQuery; > Expression expression = generateExpression(generationContext); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/DotNode.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/DotNode.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/DotNode.java (working copy) >@@ -149,7 +149,6 @@ > * "emp.address.city" = builder.get("address").get("city") > */ > public Expression generateExpression(GenerationContext context) { >- Node left = getLeft(); > Node right = getRight(); > > if (enumConstant != null) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/IndexNode.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/IndexNode.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/IndexNode.java (working copy) >@@ -37,7 +37,6 @@ > * Apply this node to the passed query > */ > public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext) { >- ParseTreeContext context = generationContext.getParseTreeContext(); > if (theQuery instanceof ReportQuery) { > ReportQuery reportQuery = (ReportQuery)theQuery; > Expression expression = generateExpression(generationContext); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/MapEntryNode.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/MapEntryNode.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/MapEntryNode.java (working copy) >@@ -37,7 +37,6 @@ > * Apply this node to the passed query > */ > public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext) { >- ParseTreeContext context = generationContext.getParseTreeContext(); > if (theQuery instanceof ReportQuery) { > ReportQuery reportQuery = (ReportQuery)theQuery; > Expression expression = generateExpression(generationContext); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/MapKeyNode.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/MapKeyNode.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/MapKeyNode.java (working copy) >@@ -45,7 +45,6 @@ > * Apply this node to the passed query > */ > public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext) { >- ParseTreeContext context = generationContext.getParseTreeContext(); > if (theQuery instanceof ReportQuery) { > ReportQuery reportQuery = (ReportQuery)theQuery; > Expression expression = generateExpression(generationContext); >@@ -75,7 +74,6 @@ > } > > public void validate(ParseTreeContext context) { >- TypeHelper typeHelper = context.getTypeHelper(); > left.validate(context); > if (left.isVariableNode()){ > setType(((VariableNode)left).getTypeForMapKey(context)); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/NodeFactoryImpl.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/NodeFactoryImpl.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/NodeFactoryImpl.java (working copy) >@@ -262,7 +262,6 @@ > public Object newVariableDecl(int line, int column, > Object path, String variable) { > DotNode dotNode = (DotNode)path; >- AttributeNode rightNode = (AttributeNode)dotNode.getRight(); > JoinDeclNode node = new JoinDeclNode(); > node.setPath(dotNode); > node.setVariableName(variable); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/NullIfNode.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/NullIfNode.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/parsing/NullIfNode.java (working copy) >@@ -36,7 +36,6 @@ > * Apply this node to the passed query > */ > public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext) { >- ParseTreeContext context = generationContext.getParseTreeContext(); > if (theQuery instanceof ReportQuery) { > ReportQuery reportQuery = (ReportQuery)theQuery; > Expression expression = generateExpression(generationContext); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLObjectBuilder.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLObjectBuilder.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLObjectBuilder.java (working copy) >@@ -229,6 +229,7 @@ > * they were created from, we are able to preserve the structure and > * unmapped content of the document that was used to create these objects. > */ >+ @Override > public Object buildObject(ObjectBuildingQuery query, AbstractRecord databaseRow, JoinedAttributeManager joinManager) throws DatabaseException, QueryException { > XMLRecord row = (XMLRecord)databaseRow; > row.setSession(query.getSession()); >@@ -434,6 +435,7 @@ > * Override method in superclass in order to set the session on the record. > * Return the row with primary keys and their values from the given expression. > */ >+ @Override > public Vector extractPrimaryKeyFromExpression(boolean requiresExactMatch, Expression expression, AbstractRecord translationRow, AbstractSession session) { > AbstractRecord primaryKeyRow = createRecord(getPrimaryKeyMappings().size(), session); > expression.getBuilder().setSession(session.getRootSession(null)); >@@ -450,7 +452,8 @@ > > return extractPrimaryKeyFromRow(primaryKeyRow, session); > } >- >+ >+ @Override > public Vector extractPrimaryKeyFromObject(Object domainObject, AbstractSession session) { > if (getDescriptor().hasInheritance() && (domainObject.getClass() != getDescriptor().getJavaClass()) && (!domainObject.getClass().getSuperclass().equals(getDescriptor().getJavaClass()))) { > return session.getDescriptor(domainObject.getClass()).getObjectBuilder().extractPrimaryKeyFromObject(domainObject, session); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/queries/DirectMapContainerPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/queries/DirectMapContainerPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/queries/DirectMapContainerPolicy.java (working copy) >@@ -83,7 +83,7 @@ > ((SQLSelectStatement)((DataReadQuery)selectionQuery).getSQLStatement()).addField((DatabaseField)keyField.clone()); > ((SQLSelectStatement)((DataReadQuery)selectionQuery).getSQLStatement()).addTable((DatabaseTable)keyField.getTable().clone()); > } else { >- ((SQLSelectStatement)((DataReadQuery)selectionQuery).getSQLStatement()).addField(baseExpression.getTable((DatabaseTable)keyField.getTable()).getField(keyField)); >+ ((SQLSelectStatement)((DataReadQuery)selectionQuery).getSQLStatement()).addField(baseExpression.getTable(keyField.getTable()).getField(keyField)); > } > } > >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/queries/OrderedListContainerPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/queries/OrderedListContainerPolicy.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/queries/OrderedListContainerPolicy.java (working copy) >@@ -444,12 +444,8 @@ > } > } > synchronized (synchronizedValueOfTarget) { >- if (!changeRecord.getOrderedChangeObjectList().isEmpty()){ >- //Attribute change tracking merge behavior >- Vector removedList = new Vector(); >- >- Iterator objects =changeRecord.getOrderedChangeObjectList().iterator(); >- >+ if (!changeRecord.getOrderedChangeObjectList().isEmpty()) { >+ Iterator objects =changeRecord.getOrderedChangeObjectList().iterator(); > while (objects.hasNext()){ > OrderedChangeObject changeObject = (OrderedChangeObject)objects.next(); > objectChanges = changeObject.getChangeSet(); >@@ -462,7 +458,7 @@ > if (objectToRemove!=null){ > Integer index = changeObject.getIndex(); > if (index!=null){ >- if (objectToRemove.equals(get(index, valueOfTarget, mergeManager.getSession()) )){ >+ if (objectToRemove.equals(get(index, valueOfTarget, mergeManager.getSession()))) { > removeFromAtIndex(index, valueOfTarget); > } else { > //Object is in the cache, but the collection doesn't have it at the location we expect >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AggregateObjectChangeSet.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AggregateObjectChangeSet.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AggregateObjectChangeSet.java (working copy) >@@ -14,7 +14,6 @@ > > import org.eclipse.persistence.descriptors.ClassDescriptor; > import org.eclipse.persistence.internal.identitymaps.CacheKey; >-import java.util.Vector; > > public class AggregateObjectChangeSet extends ObjectChangeSet { > >@@ -28,7 +27,7 @@ > /** > * This constructor is used to create an ObjectChangeSet that represents a regular object. > */ >- public AggregateObjectChangeSet(Vector primaryKey, ClassDescriptor descriptor, Object cloneObject, UnitOfWorkChangeSet parent, boolean isNew) { >+ public AggregateObjectChangeSet(Object primaryKey, ClassDescriptor descriptor, Object cloneObject, UnitOfWorkChangeSet parent, boolean isNew) { > super(primaryKey, descriptor, cloneObject, parent, isNew); > } > >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/DirectCollectionChangeRecord.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/DirectCollectionChangeRecord.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/DirectCollectionChangeRecord.java (working copy) >@@ -333,7 +333,7 @@ > while(itEntries.hasNext()) { > Map.Entry<Object, Set[]> entry = itEntries.next(); > Object obj = entry.getValue(); >- Set[] indexes = (Set[])entry.getValue(); >+ Set[] indexes = entry.getValue(); > if(this.changedIndexes.containsKey(obj)) { > // we assuming that these are two consecutive change records: > // oldIndexes[1] should be equal to newIndexes[0] >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/IdentityMapAccessor.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/IdentityMapAccessor.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/IdentityMapAccessor.java (working copy) >@@ -66,7 +66,7 @@ > * Deferred lock the identity map for the object, this is used for avoiding deadlock > * The return cacheKey should be used to release the deferred lock. > */ >- public CacheKey acquireDeferredLock(Vector primarKey, Class javaClass, ClassDescriptor descriptor) { >+ public CacheKey acquireDeferredLock(Object primarKey, Class javaClass, ClassDescriptor descriptor) { > return getIdentityMapManager().acquireDeferredLock(primarKey, javaClass, descriptor); > } > >@@ -75,7 +75,7 @@ > * Lock the identity map for the object, this must be done when building objects. > * The return cacheKey should be used to release the lock. > */ >- public CacheKey acquireLock(Vector primarKey, Class javaClass, ClassDescriptor descriptor) { >+ public CacheKey acquireLock(Object primarKey, Class javaClass, ClassDescriptor descriptor) { > return acquireLock(primarKey, javaClass, false, descriptor); > } > >@@ -84,7 +84,7 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * Called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLock(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { >+ public CacheKey acquireLock(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { > return getIdentityMapManager().acquireLock(primaryKey, domainClass, forMerge, descriptor); > } > >@@ -93,7 +93,7 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * Called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLockNoWait(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { >+ public CacheKey acquireLockNoWait(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { > return getIdentityMapManager().acquireLockNoWait(primaryKey, domainClass, forMerge, descriptor); > } > >@@ -102,7 +102,7 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * Called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLockWithWait(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor, int wait) { >+ public CacheKey acquireLockWithWait(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor, int wait) { > return getIdentityMapManager().acquireLockWithWait(primaryKey, domainClass, forMerge, descriptor, wait); > } > >@@ -112,7 +112,7 @@ > * This will allow multiple users to read the same object but prevent writes to > * the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKey(Vector primaryKey, Class domainClass, ClassDescriptor descriptor) { >+ public CacheKey acquireReadLockOnCacheKey(Object primaryKey, Class domainClass, ClassDescriptor descriptor) { > return getIdentityMapManager().acquireReadLockOnCacheKey(primaryKey, domainClass, descriptor); > } > >@@ -123,7 +123,7 @@ > * the object while the read lock is held. > * If no readlock can be acquired then do not wait but return null. > */ >- public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey, Class domainClass, ClassDescriptor descriptor) { >+ public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey, Class domainClass, ClassDescriptor descriptor) { > return getIdentityMapManager().acquireReadLockOnCacheKeyNoWait(primaryKey, domainClass, descriptor); > } > >@@ -181,7 +181,7 @@ > * ADVANCED: > * Return if their is an object for the primary key. > */ >- public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass) { >+ public boolean containsObjectInIdentityMap(Object primaryKey, Class theClass) { > ClassDescriptor descriptor = getSession().getDescriptor(theClass); > return containsObjectInIdentityMap(primaryKey, theClass, descriptor); > } >@@ -190,7 +190,7 @@ > * INTERNAL: > * Return if their is an object for the primary key. > */ >- public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ public boolean containsObjectInIdentityMap(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > return getIdentityMapManager().containsKey(primaryKey, theClass, descriptor); > } > >@@ -206,7 +206,7 @@ > * INTERNAL: > * Extract primary key from a row. > */ >- protected Vector extractPrimaryKeyFromRow(Record rowContainingPrimaryKey, Class theClass) { >+ protected Object extractPrimaryKeyFromRow(Record rowContainingPrimaryKey, Class theClass) { > return this.session.getDescriptor(theClass).getObjectBuilder().extractPrimaryKeyFromRow((AbstractRecord)rowContainingPrimaryKey, this.session); > } > >@@ -301,7 +301,7 @@ > * @param primaryKey the primary key of the cache key to be retrieved. > * @param myClass the class of the cache key to be retrieved. > */ >- public CacheKey getCacheKeyForObjectForLock(Vector primaryKey, Class myClass, ClassDescriptor descriptor) { >+ public CacheKey getCacheKeyForObjectForLock(Object primaryKey, Class myClass, ClassDescriptor descriptor) { > return getIdentityMapManager().getCacheKeyForObjectForLock(primaryKey, myClass, descriptor); > } > >@@ -311,7 +311,7 @@ > * @param primaryKey the primary key of the cache key to be retrieved. > * @param myClass the class of the cache key to be retrieved. > */ >- public CacheKey getCacheKeyForObject(Vector primaryKey, Class myClass, ClassDescriptor descriptor) { >+ public CacheKey getCacheKeyForObject(Object primaryKey, Class myClass, ClassDescriptor descriptor) { > return getIdentityMapManager().getCacheKeyForObject(primaryKey, myClass, descriptor); > } > >@@ -319,7 +319,7 @@ > * ADVANCED: > * Return the object from the identity with the primary and class. > */ >- public Object getFromIdentityMap(Vector primaryKey, Class theClass) { >+ public Object getFromIdentityMap(Object primaryKey, Class theClass) { > return getFromIdentityMap(primaryKey, theClass, true); > } > >@@ -327,7 +327,7 @@ > * ADVANCED: > * Return the object from the identity with the primary and class. > */ >- public Object getFromIdentityMap(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ public Object getFromIdentityMap(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > return getFromIdentityMap(primaryKey, theClass, true, descriptor); > } > >@@ -336,7 +336,7 @@ > * Return the object from the identity with the primary and class. > * Only return invalidated objects if requested. > */ >- public Object getFromIdentityMap(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects) { >+ public Object getFromIdentityMap(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects) { > return getFromIdentityMap(primaryKey, theClass, shouldReturnInvalidatedObjects, getSession().getDescriptor(theClass)); > } > >@@ -345,7 +345,7 @@ > * Return the object from the identity with the primary and class. > * Only return invalidated objects if requested. > */ >- public Object getFromIdentityMap(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ public Object getFromIdentityMap(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > return getIdentityMapManager().getFromIdentityMap(primaryKey, theClass, shouldReturnInvalidatedObjects, descriptor); > } > >@@ -434,7 +434,7 @@ > * INTERNAL: > * Return the object from the identity with the primary and class. > */ >- public Object getFromIdentityMapWithDeferredLock(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ public Object getFromIdentityMapWithDeferredLock(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > return getFromIdentityMapWithDeferredLock(primaryKey, theClass, true, descriptor); > } > >@@ -443,7 +443,7 @@ > * Return the object from the identity with the primary and class. > * Only return invalidated objects if requested > */ >- public Object getFromIdentityMapWithDeferredLock(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ public Object getFromIdentityMapWithDeferredLock(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > return getIdentityMapManager().getFromIdentityMapWithDeferredLock(primaryKey, theClass, shouldReturnInvalidatedObjects, descriptor); > } > >@@ -519,7 +519,7 @@ > * Get the wrapper object from the cache key associated with the given primary key, > * this is used for EJB. > */ >- public Object getWrapper(Vector primaryKey, Class theClass) { >+ public Object getWrapper(Object primaryKey, Class theClass) { > return getIdentityMapManager().getWrapper(primaryKey, theClass); > } > >@@ -543,7 +543,7 @@ > * ADVANCED: > * Extract the write lock value from the identity map. > */ >- public Object getWriteLockValue(Vector primaryKey, Class theClass) { >+ public Object getWriteLockValue(Object primaryKey, Class theClass) { > return getWriteLockValue(primaryKey, theClass, getSession().getDescriptor(theClass)); > } > >@@ -551,7 +551,7 @@ > * ADVANCED: > * Extract the write lock value from the identity map. > */ >- public Object getWriteLockValue(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ public Object getWriteLockValue(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > return getIdentityMapManager().getWriteLockValue(primaryKey, theClass, descriptor); > } > >@@ -622,7 +622,7 @@ > * If the object does not exist in the cache, this method will return > * without any action. > */ >- public void invalidateObject(Vector primaryKey, Class theClass) { >+ public void invalidateObject(Object primaryKey, Class theClass) { > invalidateObject(primaryKey, theClass, false); > } > >@@ -631,7 +631,7 @@ > * Set an object to be invalid in the cache. > * @param invalidateCluster if true the invalidation will be broadcast to each server in the cluster. > */ >- public void invalidateObject(Vector primaryKey, Class theClass, boolean invalidateCluster) { >+ public void invalidateObject(Object primaryKey, Class theClass, boolean invalidateCluster) { > ClassDescriptor descriptor = getSession().getDescriptor(theClass); > //forward the call to getCacheKeyForObject locally in case subclasses overload > CacheKey key = this.getCacheKeyForObjectForLock(primaryKey, theClass, descriptor); >@@ -778,10 +778,10 @@ > * ADVANCED: > * Return if this object is valid in the cache. > */ >- public boolean isValid(Vector primaryKey, Class theClass) { >+ public boolean isValid(Object primaryKey, Class theClass) { > ClassDescriptor descriptor = getSession().getDescriptor(theClass); > //forward the call to getCacheKeyForObject locally in case subclasses overload >- CacheKey key = this.getCacheKeyForObjectForLock(primaryKey, theClass, descriptor); >+ CacheKey key = getCacheKeyForObjectForLock(primaryKey, theClass, descriptor); > if (key == null) { > throw QueryException.classPkDoesNotExistInCache(theClass, primaryKey); > } >@@ -843,7 +843,7 @@ > * Register the object with the cache. > * The object must always be registered with its version number if optimistic locking is used. > */ >- public Object putInIdentityMap(Object object, Vector key) { >+ public Object putInIdentityMap(Object object, Object key) { > return putInIdentityMap(object, key, null); > } > >@@ -852,7 +852,7 @@ > * Register the object with the cache. > * The object must always be registered with its version number if optimistic locking is used. > */ >- public Object putInIdentityMap(Object object, Vector key, Object writeLockValue) { >+ public Object putInIdentityMap(Object object, Object key, Object writeLockValue) { > return putInIdentityMap(object, key, writeLockValue, 0); > } > >@@ -862,7 +862,7 @@ > * The object must always be registered with its version number if optimistic locking is used. > * The readTime may also be included in the cache key as it is constructed. > */ >- public Object putInIdentityMap(Object object, Vector key, Object writeLockValue, long readTime) { >+ public Object putInIdentityMap(Object object, Object key, Object writeLockValue, long readTime) { > ClassDescriptor descriptor = getSession().getDescriptor(object); > return putInIdentityMap(object, key, writeLockValue, readTime, descriptor); > } >@@ -873,7 +873,7 @@ > * The object must always be registered with its version number if optimistic locking is used. > * The readTime may also be included in the cache key as it is constructed. > */ >- public Object putInIdentityMap(Object object, Vector key, Object writeLockValue, long readTime, ClassDescriptor descriptor) { >+ public Object putInIdentityMap(Object object, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor) { > CacheKey cacheKey = internalPutInIdentityMap(object, key, writeLockValue, readTime, descriptor); > if (cacheKey == null) { > return null; >@@ -898,7 +898,7 @@ > * The readTime may also be included in the cache key as it is constructed. > * Return the cache-key. > */ >- public CacheKey internalPutInIdentityMap(Object object, Vector key, Object writeLockValue, long readTime, ClassDescriptor descriptor) { >+ public CacheKey internalPutInIdentityMap(Object object, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor) { > return getIdentityMapManager().putInIdentityMap(object, key, writeLockValue, readTime, descriptor); > } > >@@ -927,7 +927,7 @@ > * ADVANCED: > * Remove the object from the object cache. > */ >- public Object removeFromIdentityMap(Vector key, Class theClass) { >+ public Object removeFromIdentityMap(Object key, Class theClass) { > ClassDescriptor descriptor = getSession().getDescriptor(theClass); > return removeFromIdentityMap(key, theClass, descriptor, null); > } >@@ -936,7 +936,7 @@ > * INTERNAL: > * Remove the object from the object cache. > */ >- public Object removeFromIdentityMap(Vector key, Class theClass, ClassDescriptor descriptor, Object object) { >+ public Object removeFromIdentityMap(Object key, Class theClass, ClassDescriptor descriptor, Object object) { > return getIdentityMapManager().removeFromIdentityMap(key, theClass, descriptor, object); > } > >@@ -953,7 +953,7 @@ > * Update the wrapper object the cache key associated with the given primary key, > * this is used for EJB. > */ >- public void setWrapper(Vector primaryKey, Class theClass, Object wrapper) { >+ public void setWrapper(Object primaryKey, Class theClass, Object wrapper) { > getIdentityMapManager().setWrapper(primaryKey, theClass, wrapper); > } > >@@ -969,7 +969,7 @@ > * ADVANCED: > * Update the write lock value in the cache. > */ >- public void updateWriteLockValue(Vector primaryKey, Class theClass, Object writeLockValue) { >+ public void updateWriteLockValue(Object primaryKey, Class theClass, Object writeLockValue) { > getIdentityMapManager().setWriteLockValue(primaryKey, theClass, writeLockValue); > } > >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/IsolatedClientSessionIdentityMapAccessor.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/IsolatedClientSessionIdentityMapAccessor.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/IsolatedClientSessionIdentityMapAccessor.java (working copy) >@@ -48,7 +48,8 @@ > * Deferred lock the identity map for the object, this is used for avoiding deadlock > * The return cacheKey should be used to release the deferred lock > */ >- public CacheKey acquireDeferredLock(Vector primaryKey, Class javaClass, ClassDescriptor descriptor) { >+ @Override >+ public CacheKey acquireDeferredLock(Object primaryKey, Class javaClass, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().acquireDeferredLock(primaryKey, javaClass, descriptor); > } else { >@@ -61,7 +62,8 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLock(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { >+ @Override >+ public CacheKey acquireLock(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().acquireLock(primaryKey, domainClass, forMerge, descriptor); > } else { >@@ -74,7 +76,8 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLockNoWait(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { >+ @Override >+ public CacheKey acquireLockNoWait(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().acquireLockNoWait(primaryKey, domainClass, forMerge, descriptor); > } else { >@@ -87,7 +90,8 @@ > * Provides access for setting a concurrency lock on an object in the IdentityMap. > * called with true from the merge process, if true then the refresh will not refresh the object. > */ >- public CacheKey acquireLockWithWait(Vector primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor, int wait) { >+ @Override >+ public CacheKey acquireLockWithWait(Object primaryKey, Class domainClass, boolean forMerge, ClassDescriptor descriptor, int wait) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().acquireLockWithWait(primaryKey, domainClass, forMerge, descriptor, wait); > } else { >@@ -101,7 +105,8 @@ > * This will allow multiple users to read the same object but prevent writes to > * the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKey(Vector primaryKey, Class domainClass, ClassDescriptor descriptor) { >+ @Override >+ public CacheKey acquireReadLockOnCacheKey(Object primaryKey, Class domainClass, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().acquireReadLockOnCacheKey(primaryKey, domainClass, descriptor); > } else { >@@ -116,7 +121,8 @@ > * the object while the read lock is held. > * If no readlock can be acquired then do not wait but return null. > */ >- public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey, Class domainClass, ClassDescriptor descriptor) { >+ @Override >+ public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey, Class domainClass, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().acquireReadLockOnCacheKeyNoWait(primaryKey, domainClass, descriptor); > } else { >@@ -130,6 +136,7 @@ > * By default concurrent reads and writes are allowed. > * By write, unit of work merge is meant. > */ >+ @Override > public boolean acquireWriteLock() { > getIdentityMapManager().acquireWriteLock(); > // must lock the parents cache as well. >@@ -140,7 +147,8 @@ > * ADVANCED: > * Return if their is an object for the primary key. > */ >- public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ @Override >+ public boolean containsObjectInIdentityMap(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > if (this.identityMapManager == null) { > return false; >@@ -155,6 +163,7 @@ > * INTERNAL: > * This method is used to get a list of those classes with IdentityMaps in the Session. > */ >+ @Override > public Vector getClassesRegistered() { > Vector results = getIdentityMapManager().getClassesRegistered(); > results.addAll(((IsolatedClientSession)session).getParent().getIdentityMapAccessorInstance().getClassesRegistered()); >@@ -167,6 +176,7 @@ > * If the expression is too complex an exception will be thrown. > * Only return objects that are invalid in the cache if specified. > */ >+ @Override > public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, int valueHolderPolicy, boolean shouldReturnInvalidatedObjects) throws QueryException { > if (session.getDescriptor(theClass).isIsolated()) { > return getIdentityMapManager().getAllFromIdentityMap(selectionCriteria, theClass, translationRow, valueHolderPolicy, shouldReturnInvalidatedObjects); >@@ -181,7 +191,8 @@ > * @param primaryKey the primary key of the cache key to be retrieved. > * @param myClass the class of the cache key to be retrieved. > */ >- public CacheKey getCacheKeyForObject(Vector primaryKey, Class myClass, ClassDescriptor descriptor) { >+ @Override >+ public CacheKey getCacheKeyForObject(Object primaryKey, Class myClass, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > if (this.identityMapManager == null) { > return null; >@@ -198,7 +209,8 @@ > * @param primaryKey the primary key of the cache key to be retrieved. > * @param myClass the class of the cache key to be retrieved. > */ >- public CacheKey getCacheKeyForObjectForLock(Vector primaryKey, Class myClass, ClassDescriptor descriptor) { >+ @Override >+ public CacheKey getCacheKeyForObjectForLock(Object primaryKey, Class myClass, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > if (this.identityMapManager == null) { > return null; >@@ -213,7 +225,8 @@ > * ADVANCED: > * Return the object from the identity with the primary and class. > */ >- public Object getFromIdentityMap(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ @Override >+ public Object getFromIdentityMap(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > if (this.identityMapManager == null) { > return null; >@@ -230,6 +243,7 @@ > * If the object is not found null is returned. > * If the expression is too complex an exception will be thrown. > */ >+ @Override > public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, int valueHolderPolicy, boolean conforming, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().getFromIdentityMap(selectionCriteria, theClass, translationRow, valueHolderPolicy, conforming, shouldReturnInvalidatedObjects, descriptor); >@@ -243,7 +257,8 @@ > * Return the object from the identity with the primary and class. > * Only return invalidated objects if requested > */ >- public Object getFromIdentityMapWithDeferredLock(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ @Override >+ public Object getFromIdentityMapWithDeferredLock(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > if (this.identityMapManager == null) { > return null; >@@ -260,6 +275,7 @@ > * This method should be used for all IdentityMapManager access since it may > * be overridden in sub classes. > */ >+ @Override > public IdentityMapManager getIdentityMapManager() { > // PERF: Lazy init manager as normally isolated object are only read in the unit of work. > if (this.identityMapManager == null) { >@@ -272,6 +288,7 @@ > * INTERNAL: > * Get the identity map for the given class from the IdentityMapManager > */ >+ @Override > public IdentityMap getIdentityMap(ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().getIdentityMap(descriptor); >@@ -286,6 +303,7 @@ > * values of the parameters to the query so different parameters will have > * different cached results. > */ >+ @Override > public Object getQueryResult(ReadQuery query, Vector parameters, boolean checkExpiry) { > if (((IsolatedClientSession)session).isIsolatedQuery(query)) { > return getIdentityMapManager().getQueryResult(query, parameters, checkExpiry); >@@ -298,6 +316,7 @@ > * INTERNAL: > * get the session associated with this IdentityMapAccessor > */ >+ @Override > public AbstractSession getSession() { > return session; > } >@@ -307,7 +326,8 @@ > * Get the wrapper object from the cache key associated with the given primary key, > * this is used for EJB. > */ >- public Object getWrapper(Vector primaryKey, Class theClass) { >+ @Override >+ public Object getWrapper(Object primaryKey, Class theClass) { > if (session.getDescriptor(theClass).isIsolated()) { > return getIdentityMapManager().getWrapper(primaryKey, theClass); > } else { >@@ -329,7 +349,8 @@ > * ADVANCED: > * Extract the write lock value from the identity map. > */ >- public Object getWriteLockValue(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ @Override >+ public Object getWriteLockValue(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().getWriteLockValue(primaryKey, theClass, descriptor); > } else { >@@ -346,6 +367,7 @@ > * be maintained for any objects currently read in. This should only be called > * if the application knows that it no longer has references to object held in the cache. > */ >+ @Override > public void initializeAllIdentityMaps() { > super.initializeAllIdentityMaps(); > ((IsolatedClientSession)session).getParent().getIdentityMapAccessorInstance().initializeAllIdentityMaps(); >@@ -358,6 +380,7 @@ > * Caution must be used in doing this to ensure that the objects within the identity map > * are not referenced from other objects of other classes or from the application. > */ >+ @Override > public void initializeIdentityMap(Class theClass) { > getSession().log(SessionLog.FINER, SessionLog.CACHE, "initialize_identitymap", theClass); > if (session.getDescriptor(theClass).isIsolated()) { >@@ -371,10 +394,11 @@ > * PUBLIC: > * Reset the entire local object cache. > * This throws away any objects that have been read in. >- * Extream caution should be used before doing this because object identity will no longer >+ * Extreme caution should be used before doing this because object identity will no longer > * be maintained for any objects currently read in. This should only be called > * if the application knows that it no longer has references to object held in the cache. > */ >+ @Override > public void initializeIdentityMaps() { > getSession().log(SessionLog.FINER, SessionLog.CACHE, "initialize_identitymaps"); > getIdentityMapManager().initializeIdentityMaps(); >@@ -387,6 +411,7 @@ > * Query results are cached based on the parameter values provided to the query > * different parameter values access different caches. > */ >+ @Override > public void putQueryResult(ReadQuery query, Vector parameters, Object results) { > if (((IsolatedClientSession)session).isIsolatedQuery(query)) { > getIdentityMapManager().putQueryResult(query, parameters, results); >@@ -400,6 +425,7 @@ > * Used to print all the objects in the identity map of the passed in class. > * The output of this method will be logged to this session's SessionLog at SEVERE level. > */ >+ @Override > public void printIdentityMap(Class businessClass) { > if (getSession().shouldLog(SessionLog.SEVERE, SessionLog.CACHE)) { > if (session.getDescriptor(businessClass).isIsolated()) { >@@ -415,6 +441,7 @@ > * Used to print all the objects in every identity map in this session. > * The output of this method will be logged to this session's SessionLog at SEVERE level. > */ >+ @Override > public void printIdentityMaps() { > if (getSession().shouldLog(SessionLog.SEVERE, SessionLog.CACHE)) { > getIdentityMapManager().printIdentityMaps(); >@@ -427,6 +454,7 @@ > * Used to print all the locks in every identity map in this session. > * The output of this method will be logged to this session's SessionLog at FINEST level. > */ >+ @Override > public void printIdentityMapLocks() { > if (getSession().shouldLog(SessionLog.FINEST, SessionLog.CACHE)) { > getIdentityMapManager().printLocks(); >@@ -440,7 +468,7 @@ > * The object must always be registered with its version number if optimistic locking is used. > * The readTime may also be included in the cache key as it is constructed. > */ >- public CacheKey internalPutInIdentityMap(Object domainObject, Vector key, Object writeLockValue, long readTime, ClassDescriptor descriptor) { >+ public CacheKey internalPutInIdentityMap(Object domainObject, Object key, Object writeLockValue, long readTime, ClassDescriptor descriptor) { > //no need to unwrap as the put will unwrap later anyway > if (descriptor.isIsolated()) { > return getIdentityMapManager().putInIdentityMap(domainObject, key, writeLockValue, readTime, descriptor); >@@ -458,6 +486,7 @@ > * @param translationRow Record > * @param shouldInvalidateOnException boolean indicates weather to invalidate the object if conform threw exception. > */ >+ @Override > public void invalidateObjects(Expression selectionCriteria, Class theClass, Record translationRow, boolean shouldInvalidateOnException) { > if (session.getDescriptor(theClass).isIsolated()) { > getIdentityMapManager().invalidateObjects(selectionCriteria, theClass, translationRow, shouldInvalidateOnException); >@@ -472,6 +501,7 @@ > * By default concurrent reads and writes are allowed. > * By write, unit of work merge is meant. > */ >+ @Override > public void releaseWriteLock() { > //release in the opposite order of the acquire > ((IsolatedClientSession)session).getParent().getIdentityMapAccessorInstance().releaseWriteLock(); >@@ -482,7 +512,8 @@ > * ADVANCED: > * Remove the object from the object cache. > */ >- public Object removeFromIdentityMap(Vector key, Class theClass, ClassDescriptor descriptor, Object object) { >+ @Override >+ public Object removeFromIdentityMap(Object key, Class theClass, ClassDescriptor descriptor, Object object) { > if (descriptor.isIsolated()) { > return getIdentityMapManager().removeFromIdentityMap(key, theClass, descriptor, object); > } else { >@@ -494,6 +525,7 @@ > * INTERNAL: > * Set the IdentityMapManager for this IdentityMapAccessor > */ >+ @Override > public void setIdentityMapManager(IdentityMapManager identityMapManager) { > this.identityMapManager = identityMapManager; > } >@@ -503,7 +535,8 @@ > * Update the wrapper object the cache key associated with the given primary key, > * this is used for EJB. > */ >- public void setWrapper(Vector primaryKey, Class theClass, Object wrapper) { >+ @Override >+ public void setWrapper(Object primaryKey, Class theClass, Object wrapper) { > if (getSession().getDescriptor(theClass).isIsolated()) { > getIdentityMapManager().setWrapper(primaryKey, theClass, wrapper); > } else { >@@ -515,7 +548,8 @@ > * ADVANCED: > * Update the write lock value in the identity map. > */ >- public void updateWriteLockValue(Vector primaryKey, Class theClass, Object writeLockValue) { >+ @Override >+ public void updateWriteLockValue(Object primaryKey, Class theClass, Object writeLockValue) { > if (getSession().getDescriptor(theClass).isIsolated()) { > getIdentityMapManager().setWriteLockValue(primaryKey, theClass, writeLockValue); > } else { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/ObjectChangeSet.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/ObjectChangeSet.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/ObjectChangeSet.java (working copy) >@@ -92,12 +92,12 @@ > /** > * This constructor is used to create an ObjectChangeSet that represents a regular object. > */ >- public ObjectChangeSet(Vector primaryKey, ClassDescriptor descriptor, Object cloneObject, UnitOfWorkChangeSet parent, boolean isNew) { >+ public ObjectChangeSet(Object primaryKey, ClassDescriptor descriptor, Object cloneObject, UnitOfWorkChangeSet parent, boolean isNew) { > this.cacheSynchronizationType = ClassDescriptor.UNDEFINED_OBJECT_CHANGE_BEHAVIOR; > this.cloneObject = cloneObject; > this.isNew = isNew; > this.shouldBeDeleted = false; >- if ((primaryKey != null) && !primaryKey.contains(null)) { >+ if ((primaryKey != null) && !((Vector)primaryKey).contains(null)) { > this.cacheKey = new CacheKey(primaryKey); > } > this.classType = descriptor.getJavaClass(); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/UnitOfWorkIdentityMapAccessor.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/UnitOfWorkIdentityMapAccessor.java (revision 6201) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/UnitOfWorkIdentityMapAccessor.java (working copy) >@@ -13,12 +13,14 @@ > package org.eclipse.persistence.internal.sessions; > > import java.util.*; >+ > import org.eclipse.persistence.descriptors.ClassDescriptor; > import org.eclipse.persistence.internal.identitymaps.*; > import org.eclipse.persistence.internal.sessions.IdentityMapAccessor; > import org.eclipse.persistence.expressions.*; > import org.eclipse.persistence.exceptions.*; > import org.eclipse.persistence.queries.*; >+import org.eclipse.persistence.sessions.Record; > > /** > * INTERNAL: >@@ -35,6 +37,7 @@ > * ADVANCED: > * Clear all the query caches > */ >+ @Override > public void clearQueryCache() { > ((UnitOfWorkImpl)this.session).getParent().getIdentityMapAccessor().clearQueryCache(); > } >@@ -43,6 +46,7 @@ > * ADVANCED: > * Clear the query class associated with the passed-in read query > */ >+ @Override > public void clearQueryCache(ReadQuery query) { > ((UnitOfWorkImpl)this.session).getParent().getIdentityMapAccessor().clearQueryCache(query); > } >@@ -51,6 +55,7 @@ > * ADVANCED: > * Clear the query cache associated with the named query on the session > */ >+ @Override > public void clearQueryCache(String sessionQueryName) { > ((UnitOfWorkImpl)this.session).getParent().getIdentityMapAccessor().clearQueryCache((ReadQuery)session.getQuery(sessionQueryName)); > } >@@ -59,6 +64,7 @@ > * ADVANCED: > * Clear the query cache associated with the named query on the descriptor for the given class > */ >+ @Override > public void clearQueryCache(String descriptorQueryName, Class queryClass) { > ((UnitOfWorkImpl)this.session).getParent().getIdentityMapAccessor().clearQueryCache((ReadQuery)session.getDescriptor(queryClass).getQueryManager().getQuery(descriptorQueryName)); > } >@@ -67,7 +73,8 @@ > * INTERNAL: > * Return if their is an object for the primary key. > */ >- public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass, ClassDescriptor descriptor) { >+ @Override >+ public boolean containsObjectInIdentityMap(Object primaryKey, Class theClass, ClassDescriptor descriptor) { > if (getIdentityMapManager().containsKey(primaryKey, theClass, descriptor)) { > return true; > } >@@ -79,7 +86,8 @@ > * This method overrides the getAllFromIdentityMap method in Session. Invalidated Objects > * will always be returned from a UnitOfWork. > */ >- public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, AbstractRecord translationRow, int valueHolderPolicy, boolean shouldReturnInvalidatedObjects) throws QueryException { >+ @Override >+ public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, int valueHolderPolicy, boolean shouldReturnInvalidatedObjects) throws QueryException { > return super.getAllFromIdentityMap(selectionCriteria, theClass, translationRow, valueHolderPolicy, true); > } > >@@ -88,7 +96,8 @@ > * Override the getFromIdentityMapWithDeferredLock method on the session to ensure that > * invalidated objects are always returned since this is a UnitOfWork > */ >- public Object getFromIdentityMapWithDeferredLock(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ @Override >+ public Object getFromIdentityMapWithDeferredLock(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > return super.getFromIdentityMapWithDeferredLock(primaryKey, theClass, true, descriptor); > } > >@@ -100,7 +109,8 @@ > * Note: in a UnitOfWork, invalidated objects will always be returned from the identity map > * In the parent session, only return the object if it has not been Invalidated > */ >- public Object getFromIdentityMap(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ @Override >+ public Object getFromIdentityMap(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > Object objectFromCache = super.getFromIdentityMap(primaryKey, theClass, true, descriptor); > > if (objectFromCache != null) { >@@ -114,7 +124,7 @@ > * INTERNAL: > * This method will return the object from the parent and clone it. > */ >- protected Object getAndCloneCacheKeyFromParent(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { >+ protected Object getAndCloneCacheKeyFromParent(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects, ClassDescriptor descriptor) { > // Note: Objects returned from the parent's identity map should include invalidated > // objects. This is important because this internal method is used in the existence > // check in the UnitOfWork. >@@ -179,6 +189,7 @@ > * > * results are only cached in the parent session for UnitOfWorks > */ >+ @Override > public Object getQueryResult(ReadQuery query, Vector parameters, boolean checkExpiry) { > return ((UnitOfWorkImpl)this.session).getParent().getIdentityMapAccessorInstance().getQueryResult(query, parameters, checkExpiry); > } >@@ -191,6 +202,7 @@ > * > * Results are only cached in the parent session for UnitOfWorks > */ >+ @Override > public void putQueryResult(ReadQuery query, Vector parameters, Object results) { > ((UnitOfWorkImpl)this.session).getParent().getIdentityMapAccessorInstance().putQueryResult(query, parameters, results); > } >@@ -206,6 +218,7 @@ > * be maintained for any objects currently read in. This should only be called > * if the application knows that it no longer has references to object held in the cache. > */ >+ @Override > public void initializeAllIdentityMaps() { > super.initializeAllIdentityMaps(); > ((UnitOfWorkImpl)this.session).getParent().getIdentityMapAccessor().initializeAllIdentityMaps(); >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java (revision 6201) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java (working copy) >@@ -5321,9 +5321,7 @@ > * On persist and flush operations we must update any derived id fields. > */ > protected Object updateDerivedIds(Object clone, ClassDescriptor descriptor) { >- if (descriptor.hasDerivedId()) { >- ObjectBuilder dependentBuilder = descriptor.getObjectBuilder(); >- >+ if (descriptor.hasDerivedId()) { > for (DatabaseMapping derivesIdMapping : descriptor.getDerivesIdMappinps()) { > DatabaseMapping derivedIdMapping = derivesIdMapping.getDerivedIdMapping(); > >@@ -5331,7 +5329,6 @@ > // from the JPA spec. > if (derivedIdMapping != null) { > ClassDescriptor parentDescriptor = derivesIdMapping.getReferenceDescriptor(); >- ObjectBuilder parentBuilder = parentDescriptor.getObjectBuilder(); > Object parentClone = derivesIdMapping.getRealAttributeValueFromObject(clone, this); > > // If the parent clone is null, we don't have any work to do, continue to the next >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/mappings/RelationTableMechanism.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/mappings/RelationTableMechanism.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/mappings/RelationTableMechanism.java (working copy) >@@ -512,7 +512,7 @@ > } > > if(mapping.extendPessimisticLockScope == ExtendPessimisticLockScope.DEDICATED_QUERY) { >- Expression startCriteria = (Expression)mapping.getSelectionQuery().getSelectionCriteria(); >+ Expression startCriteria = mapping.getSelectionQuery().getSelectionCriteria(); > if(startCriteria != null) { > startCriteria = (Expression)startCriteria.clone(); > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/database/oracle/plsql/PLSQLStoredProcedureCall.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/database/oracle/plsql/PLSQLStoredProcedureCall.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/database/oracle/plsql/PLSQLStoredProcedureCall.java (working copy) >@@ -615,7 +615,7 @@ > TypeInfo info = this.typesInfo.get(type.getTypeName()); > // If the info was not found in publisher, then generate it. > if (info == null) { >- info = generateNestedFunction((ComplexDatabaseType)type); >+ info = generateNestedFunction(type); > } > if (argument.direction == IN) { > if (!functions.contains(info.sql2PlConv)) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/server/wls/WebLogic_10_Platform.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/server/wls/WebLogic_10_Platform.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/server/wls/WebLogic_10_Platform.java (working copy) >@@ -35,13 +35,11 @@ > > import org.eclipse.persistence.internal.security.PrivilegedAccessHelper; > import org.eclipse.persistence.internal.security.PrivilegedMethodInvoker; >-import org.eclipse.persistence.internal.sessions.AbstractSession; > import org.eclipse.persistence.logging.AbstractSessionLog; > import org.eclipse.persistence.logging.SessionLog; > import org.eclipse.persistence.services.mbean.MBeanDevelopmentServices; > import org.eclipse.persistence.services.weblogic.MBeanWebLogicRuntimeServices; > import org.eclipse.persistence.sessions.DatabaseSession; >-import org.eclipse.persistence.sessions.Session; > > /** > * PUBLIC: >@@ -147,7 +145,7 @@ > AbstractSessionLog.getLog().log(SessionLog.WARNING, "problem_registering_mbean", exception); > } > >- MBeanDevelopmentServices mbean = new MBeanDevelopmentServices((Session)getDatabaseSession()); >+ MBeanDevelopmentServices mbean = new MBeanDevelopmentServices(getDatabaseSession()); > ObjectInstance info = null; > try { > info = mBeanServerRuntime.registerMBean(mbean, name); >@@ -170,7 +168,7 @@ > AbstractSessionLog.getLog().log(SessionLog.WARNING, "problem_registering_mbean", exception); > } > >- MBeanWebLogicRuntimeServices runtimeServices = new MBeanWebLogicRuntimeServices((AbstractSession)getDatabaseSession()); >+ MBeanWebLogicRuntimeServices runtimeServices = new MBeanWebLogicRuntimeServices(getDatabaseSession()); > ObjectInstance runtimeInstance = null; > try { > runtimeInstance = mBeanServerRuntime.registerMBean(runtimeServices, name); >@@ -235,7 +233,7 @@ > > AbstractSessionLog.getLog().log(SessionLog.FINEST, "unregistering_mbean", name); > try { >- ((MBeanServer)mBeanServerRuntime).unregisterMBean(name); >+ mBeanServerRuntime.unregisterMBean(name); > } catch(InstanceNotFoundException inf) { > AbstractSessionLog.getLog().log(SessionLog.WARNING, "problem_unregistering_mbean", inf); > } catch (MBeanRegistrationException mbre) { >@@ -254,7 +252,7 @@ > > AbstractSessionLog.getLog().log(SessionLog.FINEST, "unregistering_mbean", name); > try { >- ((MBeanServer)mBeanServerRuntime).unregisterMBean(name); >+ mBeanServerRuntime.unregisterMBean(name); > } catch(InstanceNotFoundException inf) { > AbstractSessionLog.getLog().log(SessionLog.WARNING, "problem_unregistering_mbean", inf); > } catch (MBeanRegistrationException registrationProblem) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/ObjectBuildingQuery.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/ObjectBuildingQuery.java (revision 6201) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/ObjectBuildingQuery.java (working copy) >@@ -336,7 +336,7 @@ > * > * @return a refreshed UnitOfWork queried object, unwrapped. > */ >- public Object registerIndividualResult(Object result, Vector primaryKey, UnitOfWorkImpl unitOfWork, JoinedAttributeManager joinManager, ClassDescriptor concreteDescriptor) { >+ public Object registerIndividualResult(Object result, Object primaryKey, UnitOfWorkImpl unitOfWork, JoinedAttributeManager joinManager, ClassDescriptor concreteDescriptor) { > if (concreteDescriptor == null) { > concreteDescriptor = unitOfWork.getDescriptor(result.getClass()); > } >@@ -375,7 +375,7 @@ > /** > * Post process the object once it is registered in the unit of work. > */ >- public void postRegisterIndividualResult(Object clone, Object original, Vector primaryKey, UnitOfWorkImpl unitOfWork, JoinedAttributeManager joinManager, ClassDescriptor concreteDescriptor) { >+ public void postRegisterIndividualResult(Object clone, Object original, Object primaryKey, UnitOfWorkImpl unitOfWork, JoinedAttributeManager joinManager, ClassDescriptor concreteDescriptor) { > // Check for refreshing, require to revert in the unit of work to accomplish a refresh. > if (shouldRefreshIdentityMapResult()) { > if (primaryKey == null) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/services/weblogic/WebLogicRuntimeServices.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/services/weblogic/WebLogicRuntimeServices.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/services/weblogic/WebLogicRuntimeServices.java (working copy) >@@ -211,7 +211,6 @@ > // get details for each class, and add the details to the summary > for (int index = 0; index < mappedClassNames.size(); index++) { > mappedClassName = (String)mappedClassNames.elementAt(index); >- String[] key = new String[] { mappedClassName }; > classSummaryDetails.add(buildLowlevelDetailsFor(mappedClassName)); > } > return classSummaryDetails; >@@ -1094,11 +1093,10 @@ > } > > /** >- * This method will answer the number of persistent classes contained in the session. >- * This does not include aggregates. >- */ >+ * This method will answer the number of persistent classes contained in the session. >+ * This does not include aggregates. >+ */ > public Integer getNumberOfPersistentClasses() { >- int count = 0; > Hashtable classesTable = new Hashtable(); > ClassDescriptor currentDescriptor; > >@@ -1316,7 +1314,7 @@ > * @param recurse Boolean indicating if we want to invalidate the children identity maps too > */ > public synchronized void invalidateIdentityMaps(String[] classNamesParam, Boolean recurse) throws ClassNotFoundException { >- String[] classNames = (String[])classNamesParam; >+ String[] classNames = classNamesParam; > for (int index = 0; index < classNames.length; index++) { > invalidateIdentityMap(classNames[index], recurse); > } >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/IdentityMapAccessor.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/IdentityMapAccessor.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/IdentityMapAccessor.java (working copy) >@@ -77,7 +77,7 @@ > * @param theClass Class > * @return boolean > */ >- public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass); >+ public boolean containsObjectInIdentityMap(Object primaryKey, Class theClass); > > /** > * ADVANCED: >@@ -168,7 +168,7 @@ > * @param theClass Class > * @return Object from identity map, may be null. > */ >- public Object getFromIdentityMap(Vector primaryKey, Class theClass); >+ public Object getFromIdentityMap(Object primaryKey, Class theClass); > > /** > * ADVANCED: >@@ -190,7 +190,7 @@ > * @param shouldReturnInvalidatedObjects InMemoryQueryIndirectionPolicy > * @return Object from identity map, may be null. > */ >- public Object getFromIdentityMap(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects); >+ public Object getFromIdentityMap(Object primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects); > > /** > * ADVANCED: >@@ -272,11 +272,8 @@ > * ADVANCED: > * Extracts the write lock value from the identity map through the passed in primaryKey and Class type. > * Write lock values are used when optimistic locking is stored in the cache instead of the object. >- * @param primaryKey Vector >- * @param theClass Class >- * @return Object for versioning > */ >- public Object getWriteLockValue(Vector primaryKey, Class theClass); >+ public Object getWriteLockValue(Object primaryKey, Class theClass); > > /** > * PUBLIC: >@@ -333,14 +330,14 @@ > * @param primaryKey Vector > * @param theClass Class > */ >- public void invalidateObject(Vector primaryKey, Class theClass); >+ public void invalidateObject(Object primaryKey, Class theClass); > > /** > * ADVANCED: > * Set an object to be invalid in the cache. > * @param invalidateCluster if true the invalidation will be broadcast to each server in the cluster. > */ >- public void invalidateObject(Vector primaryKey, Class theClass, boolean invalidateCluster); >+ public void invalidateObject(Object primaryKey, Class theClass, boolean invalidateCluster); > > /** > * ADVANCED: >@@ -442,7 +439,7 @@ > * @param theClass Class > * @return boolean > */ >- public boolean isValid(Vector primaryKey, Class theClass); >+ public boolean isValid(Object primaryKey, Class theClass); > > /** > * ADVANCED: >@@ -493,7 +490,7 @@ > * @param key Vector > * @return Object > */ >- public Object putInIdentityMap(Object domainObject, Vector key); >+ public Object putInIdentityMap(Object domainObject, Object key); > > /** > * ADVANCED: >@@ -504,7 +501,7 @@ > * @param writeLockValue Object for versioning > * @return Object > */ >- public Object putInIdentityMap(Object domainObject, Vector key, Object writeLockValue); >+ public Object putInIdentityMap(Object domainObject, Object key, Object writeLockValue); > > /** > * ADVANCED: >@@ -517,7 +514,7 @@ > * @param readTime long, time in milliseconds > * @return Object the Object put into the identity map > */ >- public Object putInIdentityMap(Object domainObject, Vector key, Object writeLockValue, long readTime); >+ public Object putInIdentityMap(Object domainObject, Object key, Object writeLockValue, long readTime); > > /** > * ADVANCED: >@@ -538,7 +535,7 @@ > * @param theClass Class > * @return Object the Object removed from the identity map > */ >- public Object removeFromIdentityMap(Vector key, Class theClass); >+ public Object removeFromIdentityMap(Object key, Class theClass); > > /** > * ADVANCED: >@@ -557,7 +554,7 @@ > * @param theClass Class > * @param writeLockValue Object for versioning > */ >- public void updateWriteLockValue(Vector primaryKey, Class theClass, Object writeLockValue); >+ public void updateWriteLockValue(Object primaryKey, Class theClass, Object writeLockValue); > > /** > * ADVANCED: >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/interceptors/CacheInterceptor.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/interceptors/CacheInterceptor.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/interceptors/CacheInterceptor.java (working copy) >@@ -14,7 +14,6 @@ > > import java.util.Enumeration; > import java.util.HashMap; >-import java.util.Vector; > > import org.eclipse.persistence.descriptors.ClassDescriptor; > import org.eclipse.persistence.internal.helper.Helper; >@@ -32,7 +31,7 @@ > * access. Once intercepted applications can allow the process to continue by > * calling the method on the class attribute targetIdentityMap as described in > * the API javadocs or redirect the process entirely. * As with IdentityMaps an >- * entire class inheritance heirachy will share the same interceptor. >+ * entire class inheritance hierarchy will share the same interceptor. > * <p> > * To implement a CacheInterceptor users should subclass this class implementing > * those methods they wish to intercept. >@@ -42,7 +41,7 @@ > * the target ClassDescriptor through the method > * setCacheInterceptorClass(Class). > */ >-public abstract class CacheInterceptor implements IdentityMap{ >+public abstract class CacheInterceptor implements IdentityMap { > /** > * This attribute stores the actual IdentityMap as configured by the user. > */ >@@ -60,7 +59,7 @@ > * This first thread will get an active lock. > * Other threads will get deferred locks, all threads will wait until all other threads are complete before releasing their locks. > */ >- public CacheKey acquireDeferredLock(Vector primaryKey){ >+ public CacheKey acquireDeferredLock(Object primaryKey){ > return createCacheKeyInterceptor(this.targetIdentityMap.acquireDeferredLock(primaryKey)); > } > >@@ -68,7 +67,7 @@ > * Acquire an active lock on the object. > * This is used by reading (when using indirection or no relationships) and by merge. > */ >- public CacheKey acquireLock(Vector primaryKey, boolean forMerge){ >+ public CacheKey acquireLock(Object primaryKey, boolean forMerge){ > return createCacheKeyInterceptor(this.targetIdentityMap.acquireLock(primaryKey, forMerge)); > } > >@@ -76,7 +75,7 @@ > * Acquire an active lock on the object, if not already locked. > * This is used by merge for missing existing objects. > */ >- public CacheKey acquireLockNoWait(Vector primaryKey, boolean forMerge){ >+ public CacheKey acquireLockNoWait(Object primaryKey, boolean forMerge){ > CacheKey cacheKeyToBeWrapped = this.targetIdentityMap.acquireLockNoWait(primaryKey, forMerge); > if (cacheKeyToBeWrapped != null){ > return createCacheKeyInterceptor(cacheKeyToBeWrapped); >@@ -88,7 +87,7 @@ > * Acquire an active lock on the object, if not already locked. > * This is used by merge for missing existing objects. > */ >- public CacheKey acquireLockWithWait(Vector primaryKey, boolean forMerge, int wait) { >+ public CacheKey acquireLockWithWait(Object primaryKey, boolean forMerge, int wait) { > CacheKey cacheKeyToBeWrapped = this.targetIdentityMap.acquireLockWithWait(primaryKey, forMerge, wait); > if (cacheKeyToBeWrapped != null) { > return createCacheKeyInterceptor(cacheKeyToBeWrapped); >@@ -101,7 +100,7 @@ > * This is used by UnitOfWork cloning. > * This will allow multiple users to read the same object but prevent writes to the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKey(Vector primaryKey){ >+ public CacheKey acquireReadLockOnCacheKey(Object primaryKey) { > return createCacheKeyInterceptor(this.targetIdentityMap.acquireReadLockOnCacheKey(primaryKey)); > } > >@@ -110,7 +109,7 @@ > * This is used by UnitOfWork cloning. > * This will allow multiple users to read the same object but prevent writes to the object while the read lock is held. > */ >- public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey){ >+ public CacheKey acquireReadLockOnCacheKeyNoWait(Object primaryKey) { > CacheKey cacheKeyToBeWrapped = this.targetIdentityMap.acquireReadLockOnCacheKeyNoWait(primaryKey); > if (cacheKeyToBeWrapped != null){ > return createCacheKeyInterceptor(cacheKeyToBeWrapped); >@@ -122,7 +121,7 @@ > * Add all locked CacheKeys to the map grouped by thread. > * Used to print all the locks in the identity map. > */ >- public void collectLocks(HashMap threadList){ >+ public void collectLocks(HashMap threadList) { > this.targetIdentityMap.collectLocks(threadList); > } > >@@ -137,7 +136,7 @@ > * User API. > * @param primaryKey is the primary key for the object to search for. > */ >- public boolean containsKey(Vector primaryKey){ >+ public boolean containsKey(Object primaryKey) { > return this.targetIdentityMap.containsKey(primaryKey); > } > >@@ -148,7 +147,7 @@ > * Allow for the cache to be iterated on. This method is only used during debugging when > * validateCache() has been called to print out the contents of the cache. > */ >- public Enumeration elements(){ >+ public Enumeration elements() { > return this.targetIdentityMap.elements(); > } > >@@ -156,42 +155,42 @@ > * Return the object cached in the identity map or null if it could not be found. > * User API. > */ >- public Object get(Vector primaryKey){ >+ public Object get(Object primaryKey){ > return this.targetIdentityMap.get(primaryKey); > } > > /** > * Get the cache key (with object) for the primary key. > */ >- public CacheKey getCacheKey(Vector primaryKey){ >+ public CacheKey getCacheKey(Object primaryKey) { > return this.targetIdentityMap.getCacheKey(primaryKey); > } > > /** > * Get the cache key (with object) for the primary key. > */ >- public CacheKey getCacheKeyForLock(Vector primaryKey){ >+ public CacheKey getCacheKeyForLock(Object primaryKey) { > return this.targetIdentityMap.getCacheKeyForLock(primaryKey); > } > > /** > * Return the descriptor that this is the map for. > */ >- public ClassDescriptor getDescriptor(){ >+ public ClassDescriptor getDescriptor() { > return this.targetIdentityMap.getDescriptor(); > } > > /** > * Return the class that this is the map for. > */ >- public Class getDescriptorClass(){ >+ public Class getDescriptorClass() { > return this.targetIdentityMap.getDescriptorClass(); > } > > /** > * @return The maxSize for the IdentityMap (NOTE: some subclasses may use this differently). > */ >- public int getMaxSize(){ >+ public int getMaxSize() { > return this.targetIdentityMap.getMaxSize(); > } > >@@ -199,7 +198,7 @@ > * Return the number of CacheKeys in the IdentityMap. > * This may contain weak referenced objects that have been garbage collected. > */ >- public int getSize(){ >+ public int getSize() { > return this.targetIdentityMap.getSize(); > } > >@@ -207,7 +206,7 @@ > * Return the number of actual objects of type myClass in the IdentityMap. > * Recurse = true will include subclasses of myClass in the count. > */ >- public int getSize(Class myClass, boolean recurse){ >+ public int getSize(Class myClass, boolean recurse) { > return this.targetIdentityMap.getSize(myClass, recurse); > } > >@@ -215,7 +214,7 @@ > * Return the instance of the IdentityMap that this intercpetor is wrapping. Any call that > * is to be passed on to the underlying EclipseLink cache should be passed to this IdentityMap. > */ >- public IdentityMap getTargetIdenttyMap(){ >+ public IdentityMap getTargetIdenttyMap() { > return this.targetIdentityMap; > } > >@@ -223,7 +222,7 @@ > * Get the wrapper object from the cache key associated with the given primary key, > * this is used for EJB2. > */ >- public Object getWrapper(Vector primaryKey){ >+ public Object getWrapper(Object primaryKey) { > return this.targetIdentityMap.getWrapper(primaryKey); > } > >@@ -231,14 +230,14 @@ > * Get the write lock value from the cache key associated to the primarykey. > * User API. > */ >- public Object getWriteLockValue(Vector primaryKey){ >+ public Object getWriteLockValue(Object primaryKey) { > return this.targetIdentityMap.getWriteLockValue(primaryKey); > } > > /** > * Allow for the CacheKeys to be iterated on. > */ >- public Enumeration keys(){ >+ public Enumeration keys() { > return this.targetIdentityMap.keys(); > } > >@@ -246,7 +245,7 @@ > * Allow for the CacheKeys to be iterated on. - value should be true > * if readloacks are to be used, false otherwise. > */ >- public Enumeration keys(boolean checkReadLocks){ >+ public Enumeration keys(boolean checkReadLocks) { > return this.targetIdentityMap.keys(checkReadLocks); > } > >@@ -259,7 +258,7 @@ > * @param object is the domain object to cache. > * @param writeLockValue is the current write lock value of object, if null the version is ignored. > */ >- public CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime){ >+ public CacheKey put(Object primaryKey, Object object, Object writeLockValue, long readTime) { > return this.targetIdentityMap.put(primaryKey, object, writeLockValue, readTime); > } > >@@ -268,14 +267,14 @@ > * This is used by DeleteObjectQuery and merge. > * This is also an advanced (very) user API. > */ >- public Object remove(Vector primaryKey, Object object){ >+ public Object remove(Object primaryKey, Object object) { > return this.targetIdentityMap.remove(primaryKey, object); > } > > /** > * Remove the CacheKey from the map. > */ >- public Object remove(CacheKey cacheKey){ >+ public Object remove(CacheKey cacheKey) { > if (cacheKey.isWrapper()){ > return this.targetIdentityMap.remove(cacheKey.getWrappedCacheKey()); > } >@@ -302,7 +301,7 @@ > * Update the wrapper object in the CacheKey associated with the given primaryKey, > * this is used for EJB2. > */ >- public void setWrapper(Vector primaryKey, Object wrapper){ >+ public void setWrapper(Object primaryKey, Object wrapper) { > this.targetIdentityMap.setWrapper(primaryKey, wrapper); > } > >@@ -310,7 +309,7 @@ > * Update the write lock value of the CacheKey associated with the given primaryKey. > * This is used by UpdateObjectQuery, and is also an advanced (very) user API. > */ >- public void setWriteLockValue(Vector primaryKey, Object writeLockValue) { >+ public void setWriteLockValue(Object primaryKey, Object writeLockValue) { > this.targetIdentityMap.setWriteLockValue(primaryKey, writeLockValue); > } > >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/tools/PackageRenamer.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/tools/PackageRenamer.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/tools/PackageRenamer.java (working copy) >@@ -465,14 +465,13 @@ > } > String[] aStringArrayOfSortedKeyPackageName = new String[aVector.size()]; > aVector.copyInto(aStringArrayOfSortedKeyPackageName); >- Arrays anArray = null; > Arrays.sort(aStringArrayOfSortedKeyPackageName); > > // Starting to rename. > boolean alreadyPrint = false; > int index = aStringArrayOfSortedKeyPackageName.length; > for (Enumeration enumtr = properties.keys(); enumtr.hasMoreElements();) { >- String garbage = (String)enumtr.nextElement(); >+ enumtr.nextElement(); > String key = aStringArrayOfSortedKeyPackageName[index - 1]; > String value = (String)properties.get(key); > index -= 1; >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/tools/schemaframework/DefaultTableGenerator.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/tools/schemaframework/DefaultTableGenerator.java (revision 6192) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/tools/schemaframework/DefaultTableGenerator.java (working copy) >@@ -863,7 +863,7 @@ > if (!error) { > // if target fields are primary keys > resolved = true; >- for (String pkField : (Vector<String>)targetTableDef.getPrimaryKeyFieldNames()) { >+ for (String pkField : targetTableDef.getPrimaryKeyFieldNames()) { > String fkField = targetToFkField.get(pkField); > if (fkField == null) { > //primary key column not found >@@ -913,7 +913,6 @@ > } > > private void addUniqueKeyConstraints(TableDefinition sourceTableDef, Map<String, Vector<List<String>>> uniqueConstraintsMap) { >- UniqueKeyConstraint uniqueKeyConstraint; > int serialNumber = -1; > > for (String name : uniqueConstraintsMap.keySet()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 298985
:
155445
| 155774 |
156022
|
157311
|
157786
|
226667