================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/sessions/DatabaseRecord.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.5 Report generated at Thu Jul 13 11:36:42 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/sessions/DatabaseRecord.java Thu Jul 13 11:36:42 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.5 Wed Jul 12 14:32:24 2006 *************** *** 18,29 **** * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ ! // Copyright (c) 1998, 2006, Oracle. All rights reserved. package oracle.toplink.essentials.sessions; ! import java.util.*; ! import oracle.toplink.essentials.exceptions.ValidationException; ! import oracle.toplink.essentials.internal.helper.DatabaseField; import oracle.toplink.essentials.internal.sessions.AbstractRecord; /** --- 18,27 ---- * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ ! // Copyright (c) 1998, 2005, Oracle. All rights reserved. package oracle.toplink.essentials.sessions; ! import java.util.Vector; import oracle.toplink.essentials.internal.sessions.AbstractRecord; /** *************** *** 42,50 **** */ public class DatabaseRecord extends AbstractRecord { ! /** * INTERNAL: ! * Returns a record (of default size). */ public DatabaseRecord() { super(); --- 40,48 ---- */ public class DatabaseRecord extends AbstractRecord { ! /** * INTERNAL: ! * Return default sized record. */ public DatabaseRecord() { super(); *************** *** 52,59 **** /** * INTERNAL: ! * Returns a record of the given initial capacity. ! * @param initialCapacity */ public DatabaseRecord(int initialCapacity) { super(initialCapacity); --- 50,56 ---- /** * INTERNAL: ! * Return set sized record. */ public DatabaseRecord(int initialCapacity) { super(initialCapacity); *************** *** 61,278 **** /** * INTERNAL: ! * Builds row from database result fields and values. ! * Note: the entire database result will share the same fields vector. ! * @param fields Vector of fields ! * @param values Vector of values */ public DatabaseRecord(Vector fields, Vector values) { super(fields, values); } - - /** - * PUBLIC: - * Clears the contents of the database row, both fields and values. - */ - public void clear() { - super.clear(); - } - - /** - * PUBLIC: - * Checks if the given Object value is contained in the values held - * in the database row. - * @param value the Object to be considered - * @return boolean - true if the Object value is in the row. - */ - public boolean contains(Object value) { - return super.containsValue(value); - } - - /** - * PUBLIC: - * Checks if a key (ie. the field) is contained in the database row. - * Conforms to a hashtable interface. - * @param key an Object, either String or DatabaseField - * @return boolean - true if the row with the corresponding key is in the row. - */ - public boolean containsKey(Object key) { - return super.containsKey(key); - } - - /** - * PUBLIC: - * Checks if a given field is contained in the database row. - * @param key String, the DatabaseField name - * @return boolean - true if the row contains the key with the corresponding fieldName. - */ - public boolean containsKey(String fieldName) { - return super.containsKey(fieldName); - } - - /** - * PUBLIC: - * Checks if the given Object value is contained in the values held - * in the database row. - * @param value the Object under consideration - * @return boolean - true if the row contains the Object as a value - */ - public boolean containsValue(Object value) { - return super.containsValue(value); - } - - /** - * PUBLIC: - * Returns an Enumeration of the values in the database row. - * @return Enumeration - */ - public Enumeration elements() { - return super.elements(); - } - - /** - * PUBLIC: - * Returns a set of map entries (ie. field-value pairs)in the database row - * with the DatabaseFields as keys and the value Objects as values. - * @see java.util.Map#entrySet() - * @return Set - the set of all the field-value entries (see java.util.Map.Entry) - */ - public Set entrySet() { - return super.entrySet(); - } - - /** - * PUBLIC: - * Retrieves the value for the given key. - * A field is constructed with the key to check the hash table. - * If missing, null is returned. - * @param key Object, either String or DatabaseField - * @return Object - */ - public Object get(Object key) { - return super.get(key); - } - - /** - * PUBLIC: - * Retrieves the value with the given name of the DatabaseField. - * A field is constructed on the name to check the hash table. - * If missing, null is returned. - * @param fieldName String, the DatabaseField name - * @return Object - the value - */ - public Object get(String fieldName) { - return super.get(fieldName); - } - - /** - * PUBLIC: - * Retrieves the value with the given field name. - * A field is constructed on the name to check the hash table. - * If missing, DatabaseRow.noEntry is returned. - * @param fieldName String, the DatabaseField name - * @return Object - the value - */ - public Object getIndicatingNoEntry(String fieldName) { - return super.getIndicatingNoEntry(fieldName); - } - - /** - * PUBLIC: - * Returns the Object associated with the given key - * (null if the key does not map to an Object.) - * @param key DatabaseField - * @return Object - the value associated with the key - */ - public Object getValues(DatabaseField key) { - return super.get(key); - } - - /** - * PUBLIC: - * Returns the Object associated with the given key - * (null if the key does not map to an Object.) - * @param key String - * @return Object - the value associated with the key - */ - public Object getValues(String key) { - return super.get(key); - } - - /** - * PUBLIC: - * Checks if the database row is empty (ie. there are no field-value pairs.) - * @return boolean - true if the database row is empty - */ - public boolean isEmpty() { - return super.isEmpty(); - } - - /** - * PUBLIC: - * Returns an Enumeration of the DatabaseField Objects. - * @return Enumeration - */ - public Enumeration keys() { - return super.keys(); - } - - /** - * PUBLIC: - * Returns a set of the keys, the DatabaseField Objects, for the database row. - * @return Set of the keys - */ - public Set keySet() { - return super.keySet(); - } - - /** - * PUBLIC: - * Adds a field-value pair to the row. - * @param key Object, either String or DatabaseField - * @param value Object - * @return Object - the previous Object with that key, could be null - * @throws ValidationException if inappropriate key is used - */ - public Object put(Object key, Object value) throws ValidationException { - return super.put(key, value); - } - - /** - * PUBLIC: - * Adds a field-value pair to the row. - * @param key String - * @param value Object - * @return Object - the previous Object with that key, could be null - */ - public Object put(String key, Object value) { - return super.put(key, value); - } - - /** - * PUBLIC: - * Adds all of the elements in the given map to the database row. - * @param map Map of all the field-value elements to be added - */ - public void putAll(Map map){ - super.putAll(map); - } - - /** - * PUBLIC: - * Returns the number of field-value pairs in the database row. - * @return int - */ - public int size() { - return super.size(); - } - - /** - * PUBLIC: - * Returns a collection of the values held in the database row. - * @return Collection of value Objects - */ - public Collection values() { - return super.values(); - } } --- 58,67 ---- /** * INTERNAL: ! * Build row from database result fields and values. ! * Note that the entire database result will share the same fields vector. */ public DatabaseRecord(Vector fields, Vector values) { super(fields, values); } } ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/sessions/IdentityMapAccessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.7 Report generated at Thu Jul 13 11:36:42 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/sessions/IdentityMapAccessor.java Thu Jul 13 11:36:42 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.7 Wed Jul 12 14:51:39 2006 *************** *** 18,24 **** * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ ! // Copyright (c) 1998, 2006, Oracle. All rights reserved. package oracle.toplink.essentials.sessions; import java.util.*; --- 18,24 ---- * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ ! // Copyright (c) 1998, 2005, Oracle. All rights reserved. package oracle.toplink.essentials.sessions; import java.util.*; *************** *** 30,375 **** /** * PUBLIC: * IdentityMapAccessor provides the public interface into all functionality associated with ! * TopLink identity maps. An appropriate IdentityMapAccessor can be obtained from a session ! * with its getIdentityMapAccessor() method. * Methods that used to be called on the Session to access identity maps can now be called * through the IdentityMapAccessor. ! *

! * For instance, to initialize identity maps the code used to be: ! * session.initializeIdentityIdentityMaps()
! * With this class, the code now is: ! * session.getIdentityMapAccessor().initializeIdentityMaps() ! * @see oracle.toplink.sessions.Session */ public interface IdentityMapAccessor { /** ! * ADVANCED: ! * Returns true if the identity map contains an Object with the same primary ! * key and Class type of the given domainObject. ! * @param domainObject Object ! * @return boolean */ public boolean containsObjectInIdentityMap(Object domainObject); /** * ADVANCED: ! * Returns true if the identity map contains an Object with the same ! * primary key and Class type as those specified. ! * @param primaryKey Vector ! * @param theClass Class ! * @return boolean */ public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Returns true if the identity map contains an Object with the same primary key ! * of the specified row (ie. the database record) and Class type. ! * @param rowContainingPrimaryKey Record ! * @param theClass Class type to be found ! * @return boolean - true if Object in indentity map */ public boolean containsObjectInIdentityMap(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Queries the cache in-memory with the passed in criteria and returns matching Objects. * If the expression is too complex an exception will be thrown. ! * Only returns Objects that are invalid from the map if specified with the ! * boolean shouldReturnInvalidatedObjects. ! * @param selectionCriteria Expression selecting the Objects to be returned ! * @param theClass Class to be considered ! * @param translationRow Record ! * @param valueHolderPolicy see ! * {@link oracle.toplink.queryframework.InMemoryQueryIndirectionPolicy InMemoryQueryIndirectionPolicy} ! * @param shouldReturnInvalidatedObjects boolean - true if only invalid Objects should be returned ! * @return Vector of Objects ! * @throws QueryException ! */ ! public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, ! Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, ! boolean shouldReturnInvalidatedObjects) ! throws QueryException; /** * ADVANCED: ! * Queries the cache in-memory with the passed in criteria and returns matching Objects. * If the expression is too complex an exception will be thrown. ! * @param selectionCriteria Expression selecting the Objects to be returned ! * @param theClass Class to be considered ! * @param translationRow Record ! * @param valueHolderPolicy see ! * {@link oracle.toplink.queryframework.InMemoryQueryIndirectionPolicy InMemoryQueryIndirectionPolicy} ! * @return Vector of Objects with type theClass and matching the selectionCriteria ! * @throws QueryException ! */ ! public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, ! Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) ! throws QueryException; /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key ! * and Class type of the given domainObject. ! * @param domainObject Object ! * @return Object from identity map, may be null. */ public Object getFromIdentityMap(Object domainObject); /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key ! * and Class type as those specified. ! * @param primaryKey Vector ! * @param theClass Class ! * @return Object from identity map, may be null. */ public Object getFromIdentityMap(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key ! * of the specified row (ie. the database record) and Class type. ! * @param rowContainingPrimaryKey Record ! * @param theClass Class ! * @return Object from identity map, may be null. */ public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key and Class type ! * as specified. May return null and will only return an Object that is invalidated ! * if specified with the boolean shouldReturnInvalidatedObjects. ! * @param primaryKey Vector ! * @param theClass Class ! * @param shouldReturnInvalidatedObjects InMemoryQueryIndirectionPolicy ! * @return Object from identity map, may be null. */ public Object getFromIdentityMap(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects); /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key of the specified ! * row and Class type. May return null and will only Only return an Object that is ! * invalidated if specified with the boolean shouldReturnInvalidatedObjects. ! * @param rowContainingPrimaryKey Record ! * @param theClass Class ! * @param shouldReturnInvalidatedObjects boolean ! * @return Object from identity map, may be null. */ ! public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass, ! boolean shouldReturnInvalidatedObjects); /** * ADVANCED: ! * Queries the cache in-memory and returns an Object from this identity map. ! * If the Object is not found with the passed in Class type, Row and selectionCriteria, ! * null is returned. If the expression is too complex an exception will be thrown. ! * @param selectionCriteria Expression ! * @param theClass Class ! * @param translationRow Record ! * @return Object from identity map, may be null ! * @throws QueryException */ ! public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow) ! throws QueryException; /** * ADVANCED: ! * Queries the cache in-memory and returns an Object from this identity map. ! * If the Object is not found with the passed in Class type, Row and selectionCriteria, ! * null is returned. This method allows for control of un-instantiated indirection access ! * with valueHolderPolicy. If the expression is too complex an exception will be thrown. ! * @param selectionCriteria Expression ! * @param theClass Class ! * @param translationRow Record ! * @param valueHolderPolicy ! * see {@link oracle.toplink.queryframework.InMemoryQueryIndirectionPolicy InMemoryQueryIndirectionPolicy} ! * @return Object from identity map, may be null ! * @throws QueryException */ ! public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, ! InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException; /** * ADVANCED: ! * Returns the remaining life of the given Object. This method is associated with use of * TopLink's cache invalidation feature and returns the difference between the next expiry ! * time of the Object and its read time. The method will return 0 for invalidated Objects. ! * @param object Object under consideration ! * @return long time in milliseconds */ public long getRemainingValidTime(Object object); /** * ADVANCED: ! * Extracts and returns the write lock value from the identity map through the given Object. ! * Write lock values are used when optimistic locking is stored in the cache instead of the object. ! * @param domainObject Object ! * @return Object for versioning */ public Object getWriteLockValue(Object domainObject); /** * 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: ! * Resets the entire Object cache. ! *

NOTE: Be careful using this method. This method blows away both this session's and its parent's caches. ! * This includes the server cache or any other cache. This throws away any Objects that have been read in. ! * 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 Objects held in the cache. */ public void initializeAllIdentityMaps(); /** ! * PUBLIC: ! * Resets the identity map for only the instances of the given Class type. ! * For inheritance the user must make sure that they only use the root class. ! *

NOTE: 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. ! * @param theClass Class ! */ public void initializeIdentityMap(Class theClass); /** * PUBLIC: ! * Resets the entire local Object cache. ! *

NOTE: This throws away any Objects that have been read in. ! * 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 Objects held in the cache. */ public void initializeIdentityMaps(); /** * ADVANCED: ! * Sets an Object to be invalid in the TopLink identity maps. ! * If this Object does not exist in the cache, this method will return ! * without any action. ! * @param object Object */ public void invalidateObject(Object object); /** * ADVANCED: ! * Sets an Object with the specified primary key and Class type to be invalid in ! * the TopLink identity maps. If the Object does not exist in the cache, ! * this method will return without any action. ! * @param primaryKey Vector ! * @param theClass Class */ public void invalidateObject(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Sets an Object with the specified primary key of the passed in Row and Class type to ! * be invalid in the TopLink identity maps. If the Object does not exist in the cache, ! * this method will return without any action. ! * @param rowContainingPrimaryKey Record ! * @param theClass Class */ public void invalidateObject(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Sets all of the Objects in the given collection to be invalid in the TopLink identity maps. ! * This method will take no action for any Objects in the collection that do not exist in the cache. ! * @param collection Vector of Objects to be invalidated */ public void invalidateObjects(Vector collection); /** * ADVANCED: ! * Sets all of the Objects matching the given Expression to be invalid in the TopLink identity maps. ! *

! * Example - Invalidating Employee Objects with non-null first names: ! *

! * ! * ExpressionBuilder eb = new ExpressionBuilder(Employee.class);
! * Expression exp = eb.get("firstName").notNull();
! * session.getIdentityMapAccessor().invalidateObjects(exp);
! *
! * @param selectionCriteria Expression */ public void invalidateObjects(Expression selectionCriteria); /** * ADVANCED: ! * Sets all of the Objects for all classes to be invalid in TopLink's identity maps. ! * It will recurse on inheritance. */ public void invalidateAll(); /** * ADVANCED: ! * Sets all of the Objects of the specified Class type to be invalid in TopLink's identity maps * Will set the recurse on inheritance to true. - * @param myClass Class */ public void invalidateClass(Class myClass); /** ! * ADVANCED: ! * Sets all of the Objects of the specified Class type to be invalid in TopLink's identity maps. * User can set the recurse flag to false if they do not want to invalidate ! * all the same Class types within an inheritance tree. ! * @param myClass Class ! * @param recurse boolean ! */ public void invalidateClass(Class myClass, boolean recurse); /** * ADVANCED: ! * Returns true if an Object with the same primary key and Class type of the ! * the given Object is valid in TopLink's identity maps. ! * @param object Object ! * @return boolean */ public boolean isValid(Object object); /** * ADVANCED: ! * Returns true if the Object described by the given primary key and Class type is valid ! * in TopLink's identity maps. ! * @param primaryKey Vector ! * @param theClass Class ! * @return boolean */ public boolean isValid(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Returns true if this Object with the given primary key of the Row and Class type ! * given is valid in TopLink's identity maps. ! * @param rowContainingPrimaryKey AbstractRecord ! * @param theClass Class ! * @return boolean */ public boolean isValid(AbstractRecord rowContainingPrimaryKey, Class theClass); /** * PUBLIC: ! * Used to print all the Objects in the identity map of the given Class type. * The output of this method will be logged to this session's SessionLog at SEVERE level. - * @param businessClass Class */ public void printIdentityMap(Class businessClass); /** * PUBLIC: ! * 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. */ public void printIdentityMaps(); --- 30,269 ---- /** * PUBLIC: * IdentityMapAccessor provides the public interface into all functionality associated with ! * TopLink identity maps. ! * As appropriate IdentityMapAccessor can be obtained from a session with it's getIdentityMapAccessor() ! * method. * Methods that used to be called on the Session to access identity maps can now be called * through the IdentityMapAccessor. ! * For instance, to initialize identity maps the code used to be: ! * session.initializeIdentityIdentityMaps() ! * The code now is: ! * session.getIdentityMapAccessor().initializeIdentityMaps() ! * @see oracle.toplink.essentials.sessions.Session */ public interface IdentityMapAccessor { /** ! * ADVANCED: ! * Return if there is an object for the primary key. */ public boolean containsObjectInIdentityMap(Object domainObject); /** * ADVANCED: ! * Return if there is an object for the primary key. */ public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Return if there is an object for the row containing primary key and the class. */ public boolean containsObjectInIdentityMap(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Query the cache in-memory. * If the expression is too complex an exception will be thrown. ! * Only return objects that are invalid in the cache if specified. ! */ ! public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean shouldReturnInvalidatedObjects) throws QueryException; /** * ADVANCED: ! * Query the cache in-memory. * If the expression is too complex an exception will be thrown. ! */ ! public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException; /** * ADVANCED: ! * Return the object from the identity with primary and class of the given object. */ public Object getFromIdentityMap(Object domainObject); /** * ADVANCED: ! * Return the object from the identity with the primary and class. */ public Object getFromIdentityMap(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Return the object from the identity with the primary and class. */ public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * 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); /** * ADVANCED: ! * Return the object from the identity with the primary and class. ! * Only return invalidated objects if requested. */ ! public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass, boolean shouldReturnInvalidatedObjects); /** * ADVANCED: ! * Query the cache in-memory. ! * If the object is not found null is returned. ! * If the expression is too complex an exception will be thrown. */ ! public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow) throws QueryException; /** * ADVANCED: ! * Query the cache in-memory. ! * If the object is not found null is returned. ! * If the expression is too complex an exception will be thrown. */ ! public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException; /** * ADVANCED: ! * Return the remaining life of this object. This method is associated with use of * TopLink's cache invalidation feature and returns the difference between the next expiry ! * time of the object and its read time. The method will return 0 for invalidated objects. */ public long getRemainingValidTime(Object object); /** * ADVANCED: ! * Extract the write lock value from the identity map. */ public Object getWriteLockValue(Object domainObject); /** * ADVANCED: ! * Extract the write lock value from the identity map. */ public Object getWriteLockValue(Vector primaryKey, Class theClass); /** * PUBLIC: ! * Reset the entire object cache. ! *

NOTE: be careful using this method. This method blows away both this session's and its parents caches, ! * this includes the server cache or any other 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 ! * 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. */ public void initializeAllIdentityMaps(); /** ! * PUBLIC: ! * Reset the identity map for only the instances of the class. ! * For inheritance the user must make sure that they only use the root class. ! * 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. ! */ public void initializeIdentityMap(Class theClass); /** * 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 ! * 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. */ public void initializeIdentityMaps(); /** * ADVANCED: ! * Set an object to be invalid in the TopLink identity maps. ! * If the object does not exist in the cache, this method will return ! * without any action */ public void invalidateObject(Object object); /** * ADVANCED: ! * Set an object to be invalid in the TopLink identity maps. ! * If the object does not exist in the cache, this method will return ! * without any action */ public void invalidateObject(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Set an object to be invalid in the TopLink identity maps. ! * If the object does not exist in the cache, this method will return ! * without any action */ public void invalidateObject(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Set all of the objects in the given collection to be invalid in the TopLink Identity Maps ! * This method will take no action for any objects in the collection that do not exist in the cache. */ public void invalidateObjects(Vector collection); /** * ADVANCED: ! * Set all of the objects from the given Expression to be invalid in the TopLink Identity Maps */ public void invalidateObjects(Expression selectionCriteria); /** * ADVANCED: ! * Set all of the objects for all classes to be invalid in TopLink's ! * identity maps. It will recurse on inheritance. */ public void invalidateAll(); /** * ADVANCED: ! * Set all of the objects of a specific class to be invalid in TopLink's identity maps * Will set the recurse on inheritance to true. */ public void invalidateClass(Class myClass); /** ! * ADVANCED: ! * Set all of the objects of a specific class to be invalid in TopLink's identity maps. * User can set the recurse flag to false if they do not want to invalidate ! * all the classes within an inheritance tree. ! */ public void invalidateClass(Class myClass, boolean recurse); /** * ADVANCED: ! * Return true if this object is valid in TopLink's identity maps ! * return false otherwise */ public boolean isValid(Object object); /** * ADVANCED: ! * Return true if this object is valid in TopLink's identity maps ! * return false otherwise */ public boolean isValid(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Return true if this object is valid in TopLink's identity maps ! * return false otherwise */ public boolean isValid(AbstractRecord rowContainingPrimaryKey, Class theClass); /** * PUBLIC: ! * 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. */ public void printIdentityMap(Class businessClass); /** * PUBLIC: ! * 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. */ public void printIdentityMaps(); *************** *** 383,475 **** /** * ADVANCED: ! * Registers the given Object with the identity map. ! * The Object must always be registered with its version number if optimistic locking is used. ! * @param domainObject Object ! * @return Object */ public Object putInIdentityMap(Object domainObject); /** * ADVANCED: ! * Registers the Object and given key with the identity map. ! * The Object must always be registered with its version number if optimistic locking is used. ! * @param domainObject Object ! * @param key Vector ! * @return Object */ public Object putInIdentityMap(Object domainObject, Vector key); /** * ADVANCED: ! * Registers the Object and given key with the identity map. ! * The Object must always be registered with its version number if optimistic locking is used. ! * @param domainObject Object ! * @param key Vector ! * @param writeLockValue Object for versioning ! * @return Object */ public Object putInIdentityMap(Object domainObject, Vector key, Object writeLockValue); /** * ADVANCED: ! * Registers the given Object with the identity map. ! * 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. ! * @param domainObject Object ! * @param key Vector ! * @param writeLockValue Object for versioning ! * @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); /** ! * ADVANCED: ! * Removes the Object from the Object cache. ! *

NOTE: Caution should be used when calling to avoid violating Object identity. ! * The application should only call this if its known that no references to the Object exist. ! * @param domainObject Object ! * @return Object the Object removed from the identity map ! */ public Object removeFromIdentityMap(Object domainObject); /** * ADVANCED: ! * Removes the Object with given primary key and Class from the Object cache. ! *

NOTE: Caution should be used when calling to avoid violating Object identity. ! * The application should only call this if its known that no references to the Object exist. ! * @param key Vector ! * @param theClass Class ! * @return Object the Object removed from the identity map */ public Object removeFromIdentityMap(Vector key, Class theClass); /** ! * ADVANCED: ! * Updates the write lock value in the identity map for cache key of the primary key ! * the given Object. ! * @param domainObject Object ! * @param writeLockValue Object for versioning ! */ public void updateWriteLockValue(Object domainObject, Object writeLockValue); /** * ADVANCED: ! * Updates the write lock value in the cache for the Object with same primary key as the given Object. ! * The write lock values is used when optimistic locking is stored in the cache instead of in the object. ! * @param primaryKey Vector ! * @param theClass Class ! * @param writeLockValue Object for versioning */ public void updateWriteLockValue(Vector primaryKey, Class theClass, Object writeLockValue); /** * ADVANCED: ! * This can be used to help debugging an Object identity problem. ! * An Object identity problem is when an Object in the cache references an ! * Object that is not in the cache. This method will validate that all cached ! * Objects are in a correct state. */ public void validateCache(); ! } \ No newline at end of file --- 277,340 ---- /** * ADVANCED: ! * Register the object with the identity map. ! * The object must always be registered with its version number if optimistic locking is used. */ public Object putInIdentityMap(Object domainObject); /** * ADVANCED: ! * Register the object with the identity map. ! * The object must always be registered with its version number if optimistic locking is used. */ public Object putInIdentityMap(Object domainObject, Vector key); /** * ADVANCED: ! * Register the object with the identity map. ! * The object must always be registered with its version number if optimistic locking is used. */ public Object putInIdentityMap(Object domainObject, Vector key, Object writeLockValue); /** * ADVANCED: ! * Register the object with the identity map. ! * 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 domainObject, Vector key, Object writeLockValue, long readTime); /** ! * ADVANCED: ! * Remove the object from the object cache. ! * Caution should be used when calling to avoid violating object identity. ! * The application should only call this is it knows that no references to the object exist. ! */ public Object removeFromIdentityMap(Object domainObject); /** * ADVANCED: ! * Remove the object from the object cache. */ public Object removeFromIdentityMap(Vector key, Class theClass); /** ! * ADVANCED: ! * Update the write lock value in the identity map. ! */ public void updateWriteLockValue(Object domainObject, Object writeLockValue); /** * ADVANCED: ! * Update the write lock value in the identity map. */ public void updateWriteLockValue(Vector primaryKey, Class theClass, Object writeLockValue); /** * ADVANCED: ! * This can be used to help debugging an object identity problem. ! * An object identity problem is when an object in the cache references an object not in the cache. ! * This method will validate that all cached objects are in a correct state. */ public void validateCache(); ! } ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/queryframework/UpdateAllQuery.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.14 Report generated at Thu Jul 13 11:36:42 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/queryframework/UpdateAllQuery.java Thu Jul 13 11:36:42 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.14 Wed Jul 12 15:23:39 2006 *************** *** 32,56 **** /** * PUBLIC: ! * A Query Class used to perform a bulk update using TopLink's expression framework. ! * This class is provided to help optimize performance. It can be used in place ! * of reading in all the objects to be changed and issuing single updates per ! * instance. With this approach a single SQL UPDATE statement can be issued and ! * then, based on the Expression provided, any objects in the cache that are ! * effected by the update can be invalidated. ! *

! * Notes:

! *

! * Example of Usage: Adding an area code.
! * ! * UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class);
! * updateQuery.setSelectionCriteria(eb.get("areaCode").isNull());
! * updateQuery.addUpdate(eb.get("areaCode"), "613");
! *
! * * @author Guy Pelletier * @date March 1, 2004 */ --- 32,39 ---- /** * PUBLIC: ! * Query used to perform a bulk update using TopLink's expression framework. ! * * @author Guy Pelletier * @date March 1, 2004 */ *************** *** 60,66 **** /** * PUBLIC: - * Constructs a default update all query. */ public UpdateAllQuery() { super(); --- 43,48 ---- *************** *** 68,75 **** /** * PUBLIC: ! * Constructs an update all query for the Class type specified. ! * @param referenceClass Class */ public UpdateAllQuery(Class referenceClass) { super(referenceClass); --- 50,56 ---- /** * PUBLIC: ! * Create a new update all query for the class specified. */ public UpdateAllQuery(Class referenceClass) { super(referenceClass); *************** *** 77,85 **** /** * PUBLIC: ! * Constructs an update all query for the specified Class type and selection criteria. ! * @param referenceClass Class type to be considered ! * @param selectionCriteria Expression */ public UpdateAllQuery(Class referenceClass, Expression selectionCriteria) { super(referenceClass, selectionCriteria); --- 58,65 ---- /** * PUBLIC: ! * Create a new update all query for the class and the selection criteria ! * specified. */ public UpdateAllQuery(Class referenceClass, Expression selectionCriteria) { super(referenceClass, selectionCriteria); *************** *** 87,97 **** /** * PUBLIC: ! * Constructs an update all query for the Class type specified and the given ! * ExpressionBuilder. This sets the default builder which is used for all associated ! * expressions in the query.
! * @param referenceClass Class type to be considered ! * @param builder ExpressionBuilder */ public UpdateAllQuery(Class referenceClass, ExpressionBuilder expressionBuilder) { super(referenceClass); --- 67,74 ---- /** * PUBLIC: ! * Create a new update all query for the class and expression builder ! * specified. */ public UpdateAllQuery(Class referenceClass, ExpressionBuilder expressionBuilder) { super(referenceClass); *************** *** 100,108 **** /** * PUBLIC: ! * Adds the update (SET) clause to the query. Uses default ExpressionBuilder. ! * @param field Expression Object level representation of a database query 'where' clause ! * @param value Object, the new value */ public void addUpdate(Expression field, Object value) { addUpdateInternal(field, value); --- 77,84 ---- /** * PUBLIC: ! * Add the update (SET) clause to the query. Use the default expression ! * builder. */ public void addUpdate(Expression field, Object value) { addUpdateInternal(field, value); *************** *** 110,118 **** /** * PUBLIC: ! * Adds the update (SET) clause to the query. Uses default ExpressionBuilder. ! * @param attributeName String, the name of the attribute ! * @param value Object, the new value */ public void addUpdate(String attributeName, Object value) { addUpdateInternal(attributeName, value); --- 86,93 ---- /** * PUBLIC: ! * Add the update (SET) clause to the query. Use the default expression ! * builder. */ public void addUpdate(String attributeName, Object value) { addUpdateInternal(attributeName, value); *************** *** 120,130 **** /** * PUBLIC: ! * Adds the update (SET) clause to the query. This method ensures that ! * the builder has the session and reference class set for both given Expressions. ! * Uses default ExpressionBuilder. ! * @param field Expression, representation of a database query 'where' clause that describes the field ! * @param value Expression, representation of a database query 'where' clause that describes the new value */ public void addUpdate(Expression field, Expression value) { addUpdateInternal(field, value); --- 95,102 ---- /** * PUBLIC: ! * Add the update (SET) clause to the query. Use the default expression ! * builder. */ public void addUpdate(Expression field, Expression value) { addUpdateInternal(field, value); *************** *** 132,148 **** /** * PUBLIC: ! * Adds the update (SET) clause to the query. Uses default ExpressionBuilder. ! * @param attributeName String, the name of the attribute ! * @param value Expression, the new value */ public void addUpdate(String attributeName, Expression value) { addUpdateInternal(attributeName, value); } ! ! /** ! * INTERNAL: ! */ protected void addUpdateInternal(Object fieldObject, Object valueObject) { if(fieldObject == null) { throw QueryException.updateAllQueryAddUpdateFieldIsNull(this); --- 104,116 ---- /** * PUBLIC: ! * Add the update (SET) clause to the query. Use the default expression ! * builder. */ public void addUpdate(String attributeName, Expression value) { addUpdateInternal(attributeName, value); } ! protected void addUpdateInternal(Object fieldObject, Object valueObject) { if(fieldObject == null) { throw QueryException.updateAllQueryAddUpdateFieldIsNull(this); *************** *** 156,162 **** /** * INTERNAL: * Issue the SQL to the database and then merge into the cache. ! * If we are within a UoW, the merge to the cache must not be done until * the UoW merges into the parent. The UoW will trigger the merge to occur * at the correct time and will ensure the cache setting is set to none at * that time. --- 124,130 ---- /** * INTERNAL: * Issue the SQL to the database and then merge into the cache. ! * If we are withing a UoW, the merge to the cache must not be done until * the UoW merges into the parent. The UoW will trigger the merge to occur * at the correct time and will ensure the cache setting is set to none at * that time. *************** *** 176,184 **** } /** ! * INTERNAL: ! * Return true if this is an update all query. ! */ public boolean isUpdateAllQuery() { return true; } --- 144,152 ---- } /** ! * INTERNAL: ! * Return true if this is an update all query. ! */ public boolean isUpdateAllQuery() { return true; } *************** *** 259,263 **** } } } ! ! } \ No newline at end of file --- 227,230 ---- } } } ! } ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/sessions/DatabaseRecord.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.5 Report generated at Thu Jul 13 11:38:05 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/sessions/DatabaseRecord.java Thu Jul 13 11:36:42 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.5 Wed Jul 12 14:32:24 2006 *************** *** 18,29 **** * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ ! // Copyright (c) 1998, 2006, Oracle. All rights reserved. package oracle.toplink.essentials.sessions; ! import java.util.*; ! import oracle.toplink.essentials.exceptions.ValidationException; ! import oracle.toplink.essentials.internal.helper.DatabaseField; import oracle.toplink.essentials.internal.sessions.AbstractRecord; /** --- 18,27 ---- * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ ! // Copyright (c) 1998, 2005, Oracle. All rights reserved. package oracle.toplink.essentials.sessions; ! import java.util.Vector; import oracle.toplink.essentials.internal.sessions.AbstractRecord; /** *************** *** 42,50 **** */ public class DatabaseRecord extends AbstractRecord { ! /** * INTERNAL: ! * Returns a record (of default size). */ public DatabaseRecord() { super(); --- 40,48 ---- */ public class DatabaseRecord extends AbstractRecord { ! /** * INTERNAL: ! * Return default sized record. */ public DatabaseRecord() { super(); *************** *** 52,59 **** /** * INTERNAL: ! * Returns a record of the given initial capacity. ! * @param initialCapacity */ public DatabaseRecord(int initialCapacity) { super(initialCapacity); --- 50,56 ---- /** * INTERNAL: ! * Return set sized record. */ public DatabaseRecord(int initialCapacity) { super(initialCapacity); *************** *** 61,278 **** /** * INTERNAL: ! * Builds row from database result fields and values. ! * Note: the entire database result will share the same fields vector. ! * @param fields Vector of fields ! * @param values Vector of values */ public DatabaseRecord(Vector fields, Vector values) { super(fields, values); } - - /** - * PUBLIC: - * Clears the contents of the database row, both fields and values. - */ - public void clear() { - super.clear(); - } - - /** - * PUBLIC: - * Checks if the given Object value is contained in the values held - * in the database row. - * @param value the Object to be considered - * @return boolean - true if the Object value is in the row. - */ - public boolean contains(Object value) { - return super.containsValue(value); - } - - /** - * PUBLIC: - * Checks if a key (ie. the field) is contained in the database row. - * Conforms to a hashtable interface. - * @param key an Object, either String or DatabaseField - * @return boolean - true if the row with the corresponding key is in the row. - */ - public boolean containsKey(Object key) { - return super.containsKey(key); - } - - /** - * PUBLIC: - * Checks if a given field is contained in the database row. - * @param key String, the DatabaseField name - * @return boolean - true if the row contains the key with the corresponding fieldName. - */ - public boolean containsKey(String fieldName) { - return super.containsKey(fieldName); - } - - /** - * PUBLIC: - * Checks if the given Object value is contained in the values held - * in the database row. - * @param value the Object under consideration - * @return boolean - true if the row contains the Object as a value - */ - public boolean containsValue(Object value) { - return super.containsValue(value); - } - - /** - * PUBLIC: - * Returns an Enumeration of the values in the database row. - * @return Enumeration - */ - public Enumeration elements() { - return super.elements(); - } - - /** - * PUBLIC: - * Returns a set of map entries (ie. field-value pairs)in the database row - * with the DatabaseFields as keys and the value Objects as values. - * @see java.util.Map#entrySet() - * @return Set - the set of all the field-value entries (see java.util.Map.Entry) - */ - public Set entrySet() { - return super.entrySet(); - } - - /** - * PUBLIC: - * Retrieves the value for the given key. - * A field is constructed with the key to check the hash table. - * If missing, null is returned. - * @param key Object, either String or DatabaseField - * @return Object - */ - public Object get(Object key) { - return super.get(key); - } - - /** - * PUBLIC: - * Retrieves the value with the given name of the DatabaseField. - * A field is constructed on the name to check the hash table. - * If missing, null is returned. - * @param fieldName String, the DatabaseField name - * @return Object - the value - */ - public Object get(String fieldName) { - return super.get(fieldName); - } - - /** - * PUBLIC: - * Retrieves the value with the given field name. - * A field is constructed on the name to check the hash table. - * If missing, DatabaseRow.noEntry is returned. - * @param fieldName String, the DatabaseField name - * @return Object - the value - */ - public Object getIndicatingNoEntry(String fieldName) { - return super.getIndicatingNoEntry(fieldName); - } - - /** - * PUBLIC: - * Returns the Object associated with the given key - * (null if the key does not map to an Object.) - * @param key DatabaseField - * @return Object - the value associated with the key - */ - public Object getValues(DatabaseField key) { - return super.get(key); - } - - /** - * PUBLIC: - * Returns the Object associated with the given key - * (null if the key does not map to an Object.) - * @param key String - * @return Object - the value associated with the key - */ - public Object getValues(String key) { - return super.get(key); - } - - /** - * PUBLIC: - * Checks if the database row is empty (ie. there are no field-value pairs.) - * @return boolean - true if the database row is empty - */ - public boolean isEmpty() { - return super.isEmpty(); - } - - /** - * PUBLIC: - * Returns an Enumeration of the DatabaseField Objects. - * @return Enumeration - */ - public Enumeration keys() { - return super.keys(); - } - - /** - * PUBLIC: - * Returns a set of the keys, the DatabaseField Objects, for the database row. - * @return Set of the keys - */ - public Set keySet() { - return super.keySet(); - } - - /** - * PUBLIC: - * Adds a field-value pair to the row. - * @param key Object, either String or DatabaseField - * @param value Object - * @return Object - the previous Object with that key, could be null - * @throws ValidationException if inappropriate key is used - */ - public Object put(Object key, Object value) throws ValidationException { - return super.put(key, value); - } - - /** - * PUBLIC: - * Adds a field-value pair to the row. - * @param key String - * @param value Object - * @return Object - the previous Object with that key, could be null - */ - public Object put(String key, Object value) { - return super.put(key, value); - } - - /** - * PUBLIC: - * Adds all of the elements in the given map to the database row. - * @param map Map of all the field-value elements to be added - */ - public void putAll(Map map){ - super.putAll(map); - } - - /** - * PUBLIC: - * Returns the number of field-value pairs in the database row. - * @return int - */ - public int size() { - return super.size(); - } - - /** - * PUBLIC: - * Returns a collection of the values held in the database row. - * @return Collection of value Objects - */ - public Collection values() { - return super.values(); - } } --- 58,67 ---- /** * INTERNAL: ! * Build row from database result fields and values. ! * Note that the entire database result will share the same fields vector. */ public DatabaseRecord(Vector fields, Vector values) { super(fields, values); } } ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/sessions/IdentityMapAccessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.7 Report generated at Thu Jul 13 11:38:05 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/sessions/IdentityMapAccessor.java Thu Jul 13 11:36:42 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.7 Wed Jul 12 14:51:39 2006 *************** *** 18,24 **** * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ ! // Copyright (c) 1998, 2006, Oracle. All rights reserved. package oracle.toplink.essentials.sessions; import java.util.*; --- 18,24 ---- * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ ! // Copyright (c) 1998, 2005, Oracle. All rights reserved. package oracle.toplink.essentials.sessions; import java.util.*; *************** *** 30,375 **** /** * PUBLIC: * IdentityMapAccessor provides the public interface into all functionality associated with ! * TopLink identity maps. An appropriate IdentityMapAccessor can be obtained from a session ! * with its getIdentityMapAccessor() method. * Methods that used to be called on the Session to access identity maps can now be called * through the IdentityMapAccessor. ! *

! * For instance, to initialize identity maps the code used to be: ! * session.initializeIdentityIdentityMaps()
! * With this class, the code now is: ! * session.getIdentityMapAccessor().initializeIdentityMaps() ! * @see oracle.toplink.sessions.Session */ public interface IdentityMapAccessor { /** ! * ADVANCED: ! * Returns true if the identity map contains an Object with the same primary ! * key and Class type of the given domainObject. ! * @param domainObject Object ! * @return boolean */ public boolean containsObjectInIdentityMap(Object domainObject); /** * ADVANCED: ! * Returns true if the identity map contains an Object with the same ! * primary key and Class type as those specified. ! * @param primaryKey Vector ! * @param theClass Class ! * @return boolean */ public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Returns true if the identity map contains an Object with the same primary key ! * of the specified row (ie. the database record) and Class type. ! * @param rowContainingPrimaryKey Record ! * @param theClass Class type to be found ! * @return boolean - true if Object in indentity map */ public boolean containsObjectInIdentityMap(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Queries the cache in-memory with the passed in criteria and returns matching Objects. * If the expression is too complex an exception will be thrown. ! * Only returns Objects that are invalid from the map if specified with the ! * boolean shouldReturnInvalidatedObjects. ! * @param selectionCriteria Expression selecting the Objects to be returned ! * @param theClass Class to be considered ! * @param translationRow Record ! * @param valueHolderPolicy see ! * {@link oracle.toplink.queryframework.InMemoryQueryIndirectionPolicy InMemoryQueryIndirectionPolicy} ! * @param shouldReturnInvalidatedObjects boolean - true if only invalid Objects should be returned ! * @return Vector of Objects ! * @throws QueryException ! */ ! public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, ! Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, ! boolean shouldReturnInvalidatedObjects) ! throws QueryException; /** * ADVANCED: ! * Queries the cache in-memory with the passed in criteria and returns matching Objects. * If the expression is too complex an exception will be thrown. ! * @param selectionCriteria Expression selecting the Objects to be returned ! * @param theClass Class to be considered ! * @param translationRow Record ! * @param valueHolderPolicy see ! * {@link oracle.toplink.queryframework.InMemoryQueryIndirectionPolicy InMemoryQueryIndirectionPolicy} ! * @return Vector of Objects with type theClass and matching the selectionCriteria ! * @throws QueryException ! */ ! public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, ! Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) ! throws QueryException; /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key ! * and Class type of the given domainObject. ! * @param domainObject Object ! * @return Object from identity map, may be null. */ public Object getFromIdentityMap(Object domainObject); /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key ! * and Class type as those specified. ! * @param primaryKey Vector ! * @param theClass Class ! * @return Object from identity map, may be null. */ public Object getFromIdentityMap(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key ! * of the specified row (ie. the database record) and Class type. ! * @param rowContainingPrimaryKey Record ! * @param theClass Class ! * @return Object from identity map, may be null. */ public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key and Class type ! * as specified. May return null and will only return an Object that is invalidated ! * if specified with the boolean shouldReturnInvalidatedObjects. ! * @param primaryKey Vector ! * @param theClass Class ! * @param shouldReturnInvalidatedObjects InMemoryQueryIndirectionPolicy ! * @return Object from identity map, may be null. */ public Object getFromIdentityMap(Vector primaryKey, Class theClass, boolean shouldReturnInvalidatedObjects); /** * ADVANCED: ! * Returns the Object from the identity map with the same primary key of the specified ! * row and Class type. May return null and will only Only return an Object that is ! * invalidated if specified with the boolean shouldReturnInvalidatedObjects. ! * @param rowContainingPrimaryKey Record ! * @param theClass Class ! * @param shouldReturnInvalidatedObjects boolean ! * @return Object from identity map, may be null. */ ! public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass, ! boolean shouldReturnInvalidatedObjects); /** * ADVANCED: ! * Queries the cache in-memory and returns an Object from this identity map. ! * If the Object is not found with the passed in Class type, Row and selectionCriteria, ! * null is returned. If the expression is too complex an exception will be thrown. ! * @param selectionCriteria Expression ! * @param theClass Class ! * @param translationRow Record ! * @return Object from identity map, may be null ! * @throws QueryException */ ! public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow) ! throws QueryException; /** * ADVANCED: ! * Queries the cache in-memory and returns an Object from this identity map. ! * If the Object is not found with the passed in Class type, Row and selectionCriteria, ! * null is returned. This method allows for control of un-instantiated indirection access ! * with valueHolderPolicy. If the expression is too complex an exception will be thrown. ! * @param selectionCriteria Expression ! * @param theClass Class ! * @param translationRow Record ! * @param valueHolderPolicy ! * see {@link oracle.toplink.queryframework.InMemoryQueryIndirectionPolicy InMemoryQueryIndirectionPolicy} ! * @return Object from identity map, may be null ! * @throws QueryException */ ! public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, ! InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException; /** * ADVANCED: ! * Returns the remaining life of the given Object. This method is associated with use of * TopLink's cache invalidation feature and returns the difference between the next expiry ! * time of the Object and its read time. The method will return 0 for invalidated Objects. ! * @param object Object under consideration ! * @return long time in milliseconds */ public long getRemainingValidTime(Object object); /** * ADVANCED: ! * Extracts and returns the write lock value from the identity map through the given Object. ! * Write lock values are used when optimistic locking is stored in the cache instead of the object. ! * @param domainObject Object ! * @return Object for versioning */ public Object getWriteLockValue(Object domainObject); /** * 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: ! * Resets the entire Object cache. ! *

NOTE: Be careful using this method. This method blows away both this session's and its parent's caches. ! * This includes the server cache or any other cache. This throws away any Objects that have been read in. ! * 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 Objects held in the cache. */ public void initializeAllIdentityMaps(); /** ! * PUBLIC: ! * Resets the identity map for only the instances of the given Class type. ! * For inheritance the user must make sure that they only use the root class. ! *

NOTE: 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. ! * @param theClass Class ! */ public void initializeIdentityMap(Class theClass); /** * PUBLIC: ! * Resets the entire local Object cache. ! *

NOTE: This throws away any Objects that have been read in. ! * 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 Objects held in the cache. */ public void initializeIdentityMaps(); /** * ADVANCED: ! * Sets an Object to be invalid in the TopLink identity maps. ! * If this Object does not exist in the cache, this method will return ! * without any action. ! * @param object Object */ public void invalidateObject(Object object); /** * ADVANCED: ! * Sets an Object with the specified primary key and Class type to be invalid in ! * the TopLink identity maps. If the Object does not exist in the cache, ! * this method will return without any action. ! * @param primaryKey Vector ! * @param theClass Class */ public void invalidateObject(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Sets an Object with the specified primary key of the passed in Row and Class type to ! * be invalid in the TopLink identity maps. If the Object does not exist in the cache, ! * this method will return without any action. ! * @param rowContainingPrimaryKey Record ! * @param theClass Class */ public void invalidateObject(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Sets all of the Objects in the given collection to be invalid in the TopLink identity maps. ! * This method will take no action for any Objects in the collection that do not exist in the cache. ! * @param collection Vector of Objects to be invalidated */ public void invalidateObjects(Vector collection); /** * ADVANCED: ! * Sets all of the Objects matching the given Expression to be invalid in the TopLink identity maps. ! *

! * Example - Invalidating Employee Objects with non-null first names: ! *

! * ! * ExpressionBuilder eb = new ExpressionBuilder(Employee.class);
! * Expression exp = eb.get("firstName").notNull();
! * session.getIdentityMapAccessor().invalidateObjects(exp);
! *
! * @param selectionCriteria Expression */ public void invalidateObjects(Expression selectionCriteria); /** * ADVANCED: ! * Sets all of the Objects for all classes to be invalid in TopLink's identity maps. ! * It will recurse on inheritance. */ public void invalidateAll(); /** * ADVANCED: ! * Sets all of the Objects of the specified Class type to be invalid in TopLink's identity maps * Will set the recurse on inheritance to true. - * @param myClass Class */ public void invalidateClass(Class myClass); /** ! * ADVANCED: ! * Sets all of the Objects of the specified Class type to be invalid in TopLink's identity maps. * User can set the recurse flag to false if they do not want to invalidate ! * all the same Class types within an inheritance tree. ! * @param myClass Class ! * @param recurse boolean ! */ public void invalidateClass(Class myClass, boolean recurse); /** * ADVANCED: ! * Returns true if an Object with the same primary key and Class type of the ! * the given Object is valid in TopLink's identity maps. ! * @param object Object ! * @return boolean */ public boolean isValid(Object object); /** * ADVANCED: ! * Returns true if the Object described by the given primary key and Class type is valid ! * in TopLink's identity maps. ! * @param primaryKey Vector ! * @param theClass Class ! * @return boolean */ public boolean isValid(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Returns true if this Object with the given primary key of the Row and Class type ! * given is valid in TopLink's identity maps. ! * @param rowContainingPrimaryKey AbstractRecord ! * @param theClass Class ! * @return boolean */ public boolean isValid(AbstractRecord rowContainingPrimaryKey, Class theClass); /** * PUBLIC: ! * Used to print all the Objects in the identity map of the given Class type. * The output of this method will be logged to this session's SessionLog at SEVERE level. - * @param businessClass Class */ public void printIdentityMap(Class businessClass); /** * PUBLIC: ! * 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. */ public void printIdentityMaps(); --- 30,269 ---- /** * PUBLIC: * IdentityMapAccessor provides the public interface into all functionality associated with ! * TopLink identity maps. ! * As appropriate IdentityMapAccessor can be obtained from a session with it's getIdentityMapAccessor() ! * method. * Methods that used to be called on the Session to access identity maps can now be called * through the IdentityMapAccessor. ! * For instance, to initialize identity maps the code used to be: ! * session.initializeIdentityIdentityMaps() ! * The code now is: ! * session.getIdentityMapAccessor().initializeIdentityMaps() ! * @see oracle.toplink.essentials.sessions.Session */ public interface IdentityMapAccessor { /** ! * ADVANCED: ! * Return if there is an object for the primary key. */ public boolean containsObjectInIdentityMap(Object domainObject); /** * ADVANCED: ! * Return if there is an object for the primary key. */ public boolean containsObjectInIdentityMap(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Return if there is an object for the row containing primary key and the class. */ public boolean containsObjectInIdentityMap(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Query the cache in-memory. * If the expression is too complex an exception will be thrown. ! * Only return objects that are invalid in the cache if specified. ! */ ! public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean shouldReturnInvalidatedObjects) throws QueryException; /** * ADVANCED: ! * Query the cache in-memory. * If the expression is too complex an exception will be thrown. ! */ ! public Vector getAllFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException; /** * ADVANCED: ! * Return the object from the identity with primary and class of the given object. */ public Object getFromIdentityMap(Object domainObject); /** * ADVANCED: ! * Return the object from the identity with the primary and class. */ public Object getFromIdentityMap(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Return the object from the identity with the primary and class. */ public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * 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); /** * ADVANCED: ! * Return the object from the identity with the primary and class. ! * Only return invalidated objects if requested. */ ! public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass, boolean shouldReturnInvalidatedObjects); /** * ADVANCED: ! * Query the cache in-memory. ! * If the object is not found null is returned. ! * If the expression is too complex an exception will be thrown. */ ! public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow) throws QueryException; /** * ADVANCED: ! * Query the cache in-memory. ! * If the object is not found null is returned. ! * If the expression is too complex an exception will be thrown. */ ! public Object getFromIdentityMap(Expression selectionCriteria, Class theClass, Record translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException; /** * ADVANCED: ! * Return the remaining life of this object. This method is associated with use of * TopLink's cache invalidation feature and returns the difference between the next expiry ! * time of the object and its read time. The method will return 0 for invalidated objects. */ public long getRemainingValidTime(Object object); /** * ADVANCED: ! * Extract the write lock value from the identity map. */ public Object getWriteLockValue(Object domainObject); /** * ADVANCED: ! * Extract the write lock value from the identity map. */ public Object getWriteLockValue(Vector primaryKey, Class theClass); /** * PUBLIC: ! * Reset the entire object cache. ! *

NOTE: be careful using this method. This method blows away both this session's and its parents caches, ! * this includes the server cache or any other 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 ! * 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. */ public void initializeAllIdentityMaps(); /** ! * PUBLIC: ! * Reset the identity map for only the instances of the class. ! * For inheritance the user must make sure that they only use the root class. ! * 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. ! */ public void initializeIdentityMap(Class theClass); /** * 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 ! * 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. */ public void initializeIdentityMaps(); /** * ADVANCED: ! * Set an object to be invalid in the TopLink identity maps. ! * If the object does not exist in the cache, this method will return ! * without any action */ public void invalidateObject(Object object); /** * ADVANCED: ! * Set an object to be invalid in the TopLink identity maps. ! * If the object does not exist in the cache, this method will return ! * without any action */ public void invalidateObject(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Set an object to be invalid in the TopLink identity maps. ! * If the object does not exist in the cache, this method will return ! * without any action */ public void invalidateObject(Record rowContainingPrimaryKey, Class theClass); /** * ADVANCED: ! * Set all of the objects in the given collection to be invalid in the TopLink Identity Maps ! * This method will take no action for any objects in the collection that do not exist in the cache. */ public void invalidateObjects(Vector collection); /** * ADVANCED: ! * Set all of the objects from the given Expression to be invalid in the TopLink Identity Maps */ public void invalidateObjects(Expression selectionCriteria); /** * ADVANCED: ! * Set all of the objects for all classes to be invalid in TopLink's ! * identity maps. It will recurse on inheritance. */ public void invalidateAll(); /** * ADVANCED: ! * Set all of the objects of a specific class to be invalid in TopLink's identity maps * Will set the recurse on inheritance to true. */ public void invalidateClass(Class myClass); /** ! * ADVANCED: ! * Set all of the objects of a specific class to be invalid in TopLink's identity maps. * User can set the recurse flag to false if they do not want to invalidate ! * all the classes within an inheritance tree. ! */ public void invalidateClass(Class myClass, boolean recurse); /** * ADVANCED: ! * Return true if this object is valid in TopLink's identity maps ! * return false otherwise */ public boolean isValid(Object object); /** * ADVANCED: ! * Return true if this object is valid in TopLink's identity maps ! * return false otherwise */ public boolean isValid(Vector primaryKey, Class theClass); /** * ADVANCED: ! * Return true if this object is valid in TopLink's identity maps ! * return false otherwise */ public boolean isValid(AbstractRecord rowContainingPrimaryKey, Class theClass); /** * PUBLIC: ! * 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. */ public void printIdentityMap(Class businessClass); /** * PUBLIC: ! * 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. */ public void printIdentityMaps(); *************** *** 383,475 **** /** * ADVANCED: ! * Registers the given Object with the identity map. ! * The Object must always be registered with its version number if optimistic locking is used. ! * @param domainObject Object ! * @return Object */ public Object putInIdentityMap(Object domainObject); /** * ADVANCED: ! * Registers the Object and given key with the identity map. ! * The Object must always be registered with its version number if optimistic locking is used. ! * @param domainObject Object ! * @param key Vector ! * @return Object */ public Object putInIdentityMap(Object domainObject, Vector key); /** * ADVANCED: ! * Registers the Object and given key with the identity map. ! * The Object must always be registered with its version number if optimistic locking is used. ! * @param domainObject Object ! * @param key Vector ! * @param writeLockValue Object for versioning ! * @return Object */ public Object putInIdentityMap(Object domainObject, Vector key, Object writeLockValue); /** * ADVANCED: ! * Registers the given Object with the identity map. ! * 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. ! * @param domainObject Object ! * @param key Vector ! * @param writeLockValue Object for versioning ! * @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); /** ! * ADVANCED: ! * Removes the Object from the Object cache. ! *

NOTE: Caution should be used when calling to avoid violating Object identity. ! * The application should only call this if its known that no references to the Object exist. ! * @param domainObject Object ! * @return Object the Object removed from the identity map ! */ public Object removeFromIdentityMap(Object domainObject); /** * ADVANCED: ! * Removes the Object with given primary key and Class from the Object cache. ! *

NOTE: Caution should be used when calling to avoid violating Object identity. ! * The application should only call this if its known that no references to the Object exist. ! * @param key Vector ! * @param theClass Class ! * @return Object the Object removed from the identity map */ public Object removeFromIdentityMap(Vector key, Class theClass); /** ! * ADVANCED: ! * Updates the write lock value in the identity map for cache key of the primary key ! * the given Object. ! * @param domainObject Object ! * @param writeLockValue Object for versioning ! */ public void updateWriteLockValue(Object domainObject, Object writeLockValue); /** * ADVANCED: ! * Updates the write lock value in the cache for the Object with same primary key as the given Object. ! * The write lock values is used when optimistic locking is stored in the cache instead of in the object. ! * @param primaryKey Vector ! * @param theClass Class ! * @param writeLockValue Object for versioning */ public void updateWriteLockValue(Vector primaryKey, Class theClass, Object writeLockValue); /** * ADVANCED: ! * This can be used to help debugging an Object identity problem. ! * An Object identity problem is when an Object in the cache references an ! * Object that is not in the cache. This method will validate that all cached ! * Objects are in a correct state. */ public void validateCache(); ! } \ No newline at end of file --- 277,340 ---- /** * ADVANCED: ! * Register the object with the identity map. ! * The object must always be registered with its version number if optimistic locking is used. */ public Object putInIdentityMap(Object domainObject); /** * ADVANCED: ! * Register the object with the identity map. ! * The object must always be registered with its version number if optimistic locking is used. */ public Object putInIdentityMap(Object domainObject, Vector key); /** * ADVANCED: ! * Register the object with the identity map. ! * The object must always be registered with its version number if optimistic locking is used. */ public Object putInIdentityMap(Object domainObject, Vector key, Object writeLockValue); /** * ADVANCED: ! * Register the object with the identity map. ! * 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 domainObject, Vector key, Object writeLockValue, long readTime); /** ! * ADVANCED: ! * Remove the object from the object cache. ! * Caution should be used when calling to avoid violating object identity. ! * The application should only call this is it knows that no references to the object exist. ! */ public Object removeFromIdentityMap(Object domainObject); /** * ADVANCED: ! * Remove the object from the object cache. */ public Object removeFromIdentityMap(Vector key, Class theClass); /** ! * ADVANCED: ! * Update the write lock value in the identity map. ! */ public void updateWriteLockValue(Object domainObject, Object writeLockValue); /** * ADVANCED: ! * Update the write lock value in the identity map. */ public void updateWriteLockValue(Vector primaryKey, Class theClass, Object writeLockValue); /** * ADVANCED: ! * This can be used to help debugging an object identity problem. ! * An object identity problem is when an object in the cache references an object not in the cache. ! * This method will validate that all cached objects are in a correct state. */ public void validateCache(); ! } ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/queryframework/UpdateAllQuery.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.14 Report generated at Thu Jul 13 11:38:05 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/queryframework/UpdateAllQuery.java Thu Jul 13 11:36:42 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_main_javadoc-comments_060712/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.14 Wed Jul 12 15:23:39 2006 *************** *** 32,56 **** /** * PUBLIC: ! * A Query Class used to perform a bulk update using TopLink's expression framework. ! * This class is provided to help optimize performance. It can be used in place ! * of reading in all the objects to be changed and issuing single updates per ! * instance. With this approach a single SQL UPDATE statement can be issued and ! * then, based on the Expression provided, any objects in the cache that are ! * effected by the update can be invalidated. ! *

! * Notes:

! *

! * Example of Usage: Adding an area code.
! * ! * UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class);
! * updateQuery.setSelectionCriteria(eb.get("areaCode").isNull());
! * updateQuery.addUpdate(eb.get("areaCode"), "613");
! *
! * * @author Guy Pelletier * @date March 1, 2004 */ --- 32,39 ---- /** * PUBLIC: ! * Query used to perform a bulk update using TopLink's expression framework. ! * * @author Guy Pelletier * @date March 1, 2004 */ *************** *** 60,66 **** /** * PUBLIC: - * Constructs a default update all query. */ public UpdateAllQuery() { super(); --- 43,48 ---- *************** *** 68,75 **** /** * PUBLIC: ! * Constructs an update all query for the Class type specified. ! * @param referenceClass Class */ public UpdateAllQuery(Class referenceClass) { super(referenceClass); --- 50,56 ---- /** * PUBLIC: ! * Create a new update all query for the class specified. */ public UpdateAllQuery(Class referenceClass) { super(referenceClass); *************** *** 77,85 **** /** * PUBLIC: ! * Constructs an update all query for the specified Class type and selection criteria. ! * @param referenceClass Class type to be considered ! * @param selectionCriteria Expression */ public UpdateAllQuery(Class referenceClass, Expression selectionCriteria) { super(referenceClass, selectionCriteria); --- 58,65 ---- /** * PUBLIC: ! * Create a new update all query for the class and the selection criteria ! * specified. */ public UpdateAllQuery(Class referenceClass, Expression selectionCriteria) { super(referenceClass, selectionCriteria); *************** *** 87,97 **** /** * PUBLIC: ! * Constructs an update all query for the Class type specified and the given ! * ExpressionBuilder. This sets the default builder which is used for all associated ! * expressions in the query.
! * @param referenceClass Class type to be considered ! * @param builder ExpressionBuilder */ public UpdateAllQuery(Class referenceClass, ExpressionBuilder expressionBuilder) { super(referenceClass); --- 67,74 ---- /** * PUBLIC: ! * Create a new update all query for the class and expression builder ! * specified. */ public UpdateAllQuery(Class referenceClass, ExpressionBuilder expressionBuilder) { super(referenceClass); *************** *** 100,108 **** /** * PUBLIC: ! * Adds the update (SET) clause to the query. Uses default ExpressionBuilder. ! * @param field Expression Object level representation of a database query 'where' clause ! * @param value Object, the new value */ public void addUpdate(Expression field, Object value) { addUpdateInternal(field, value); --- 77,84 ---- /** * PUBLIC: ! * Add the update (SET) clause to the query. Use the default expression ! * builder. */ public void addUpdate(Expression field, Object value) { addUpdateInternal(field, value); *************** *** 110,118 **** /** * PUBLIC: ! * Adds the update (SET) clause to the query. Uses default ExpressionBuilder. ! * @param attributeName String, the name of the attribute ! * @param value Object, the new value */ public void addUpdate(String attributeName, Object value) { addUpdateInternal(attributeName, value); --- 86,93 ---- /** * PUBLIC: ! * Add the update (SET) clause to the query. Use the default expression ! * builder. */ public void addUpdate(String attributeName, Object value) { addUpdateInternal(attributeName, value); *************** *** 120,130 **** /** * PUBLIC: ! * Adds the update (SET) clause to the query. This method ensures that ! * the builder has the session and reference class set for both given Expressions. ! * Uses default ExpressionBuilder. ! * @param field Expression, representation of a database query 'where' clause that describes the field ! * @param value Expression, representation of a database query 'where' clause that describes the new value */ public void addUpdate(Expression field, Expression value) { addUpdateInternal(field, value); --- 95,102 ---- /** * PUBLIC: ! * Add the update (SET) clause to the query. Use the default expression ! * builder. */ public void addUpdate(Expression field, Expression value) { addUpdateInternal(field, value); *************** *** 132,148 **** /** * PUBLIC: ! * Adds the update (SET) clause to the query. Uses default ExpressionBuilder. ! * @param attributeName String, the name of the attribute ! * @param value Expression, the new value */ public void addUpdate(String attributeName, Expression value) { addUpdateInternal(attributeName, value); } ! ! /** ! * INTERNAL: ! */ protected void addUpdateInternal(Object fieldObject, Object valueObject) { if(fieldObject == null) { throw QueryException.updateAllQueryAddUpdateFieldIsNull(this); --- 104,116 ---- /** * PUBLIC: ! * Add the update (SET) clause to the query. Use the default expression ! * builder. */ public void addUpdate(String attributeName, Expression value) { addUpdateInternal(attributeName, value); } ! protected void addUpdateInternal(Object fieldObject, Object valueObject) { if(fieldObject == null) { throw QueryException.updateAllQueryAddUpdateFieldIsNull(this); *************** *** 156,162 **** /** * INTERNAL: * Issue the SQL to the database and then merge into the cache. ! * If we are within a UoW, the merge to the cache must not be done until * the UoW merges into the parent. The UoW will trigger the merge to occur * at the correct time and will ensure the cache setting is set to none at * that time. --- 124,130 ---- /** * INTERNAL: * Issue the SQL to the database and then merge into the cache. ! * If we are withing a UoW, the merge to the cache must not be done until * the UoW merges into the parent. The UoW will trigger the merge to occur * at the correct time and will ensure the cache setting is set to none at * that time. *************** *** 176,184 **** } /** ! * INTERNAL: ! * Return true if this is an update all query. ! */ public boolean isUpdateAllQuery() { return true; } --- 144,152 ---- } /** ! * INTERNAL: ! * Return true if this is an update all query. ! */ public boolean isUpdateAllQuery() { return true; } *************** *** 259,263 **** } } } ! ! } \ No newline at end of file --- 227,230 ---- } } } ! }