| hu.netmind.persistence.TypeHandler
All known Subclasses: hu.netmind.persistence.AbstractTypeHandler,
TypeHandler | public interface TypeHandler (Code) | | Classes implementing this interface can handle custom attribute types
aside from primitive types.
author: Brautigam Robert version: Revision: $Revision$ |
Method Summary | |
void | ensureTableExists(ClassInfo parentInfo, String attributeName, boolean create) Ensure that the table or tables (if there are some) backing this
attribute exist. | Map | getAttributeTypes(String attributeName) Get the attribute types that are representing this type
in the original object. | WhereResolver.SymbolTableEntry | getSymbolEntry(AttributeSpecifier spec, WhereResolver.SymbolTableEntry previousEntry, ClassInfo previousInfo, ReferenceTerm previousTerm) Create the approriate symbol entry when parsing a query. | ClassInfo | getSymbolInfo(WhereResolver.SymbolTableEntry entry, AttributeSpecifier spec) Determine the next class info after the given specifier. | boolean | hasChanged(ClassInfo info, Object obj, String attributeName, Map dbAttributes) Determine whether the two values differ. | void | postSave(Object value) Called when all save operations have completed, and all dependent
objects were saved. | Object | save(ClassInfo classInfo, Object current, String attributeName, Transaction transaction, Long currentSerial, Object oldValue, Object newValue, Set waitingObjects, List events, Map changedAttributes, Map dbAttributes) Save the changes occured.
Parameters: classInfo - The class info of the parent object. Parameters: current - The parent object. Parameters: attributeName - The name of the attribute about to save. Parameters: transaction - The transaction the saves must occur in. Parameters: currentSerial - The serial id the current saved are in. Parameters: oldValue - The old value as known by the object tracker. Parameters: newValue - The new value. Parameters: waitingObjects - List of object on which this operation depends on.This is writable. Parameters: events - The events the type save generated. Parameters: changedAttributes - The attributes need to be updated in thedatabase. Parameters: dbAttributes - The database attributes. Parameters: updatedAttributes - The attributes that need to be updatedin the object tracker. | Object | unmarshallType(ClassInfo classInfo, Object obj, String attributeName, Map marshalledValues, TimeControl timeControl) Get the umarshalled instance. |
ensureTableExists | void ensureTableExists(ClassInfo parentInfo, String attributeName, boolean create)(Code) | | Ensure that the table or tables (if there are some) backing this
attribute exist.
Parameters: parentInfo - The ClassInfo of the container class. Parameters: attributeName - The attribute name of the handled attribute. Parameters: create - Whether to physically create the tables or not. |
getAttributeTypes | Map getAttributeTypes(String attributeName)(Code) | | Get the attribute types that are representing this type
in the original object.
|
postSave | void postSave(Object value)(Code) | | Called when all save operations have completed, and all dependent
objects were saved.
|
save | Object save(ClassInfo classInfo, Object current, String attributeName, Transaction transaction, Long currentSerial, Object oldValue, Object newValue, Set waitingObjects, List events, Map changedAttributes, Map dbAttributes)(Code) | | Save the changes occured.
Parameters: classInfo - The class info of the parent object. Parameters: current - The parent object. Parameters: attributeName - The name of the attribute about to save. Parameters: transaction - The transaction the saves must occur in. Parameters: currentSerial - The serial id the current saved are in. Parameters: oldValue - The old value as known by the object tracker. Parameters: newValue - The new value. Parameters: waitingObjects - List of object on which this operation depends on.This is writable. Parameters: events - The events the type save generated. Parameters: changedAttributes - The attributes need to be updated in thedatabase. Parameters: dbAttributes - The database attributes. Parameters: updatedAttributes - The attributes that need to be updatedin the object tracker. The new object of the attribute. |
unmarshallType | Object unmarshallType(ClassInfo classInfo, Object obj, String attributeName, Map marshalledValues, TimeControl timeControl)(Code) | | Get the umarshalled instance.
Parameters: classInfo - The info of the parent object. Parameters: obj - The object itself. Parameters: attributeName - The name of the attribute in question. Parameters: marshalledValues - All the values of the parent object. Parameters: timeControl - The time control in which the parent was selected. |
|
|