Methods Summary |
---|
public java.lang.Object | convertDataValueToObjectValue(java.lang.Object fieldValue, oracle.toplink.essentials.sessions.Session session)INTERNAL:
Convert the class name to a class, then create an instance of the class.
Object attributeValue = null;
if (fieldValue != null) {
Class attributeClass = (Class)((AbstractSession)session).getDatasourcePlatform().convertObject(fieldValue, ClassConstants.CLASS);
try {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
attributeValue = AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(attributeClass));
} catch (PrivilegedActionException exception) {
throw ConversionException.couldNotBeConverted(fieldValue, attributeClass, exception.getException());
}
} else {
attributeValue = PrivilegedAccessHelper.newInstanceFromClass(attributeClass);
}
} catch (Exception exception) {
throw ConversionException.couldNotBeConverted(fieldValue, attributeClass, exception);
}
}
return attributeValue;
|
public java.lang.Object | convertObjectValueToDataValue(java.lang.Object attributeValue, oracle.toplink.essentials.sessions.Session session)INTERNAL:
Convert to the field class.
if (attributeValue == null) {
return null;
}
return attributeValue.getClass().getName();
|
protected oracle.toplink.essentials.mappings.DatabaseMapping | getMapping()INTERNAL:
Return the mapping.
return mapping;
|
public void | initialize(oracle.toplink.essentials.mappings.DatabaseMapping mapping, oracle.toplink.essentials.sessions.Session session)INTERNAL:
Set the mapping.
this.mapping = mapping;
// CR#... Mapping must also have the field classification.
if (getMapping().isDirectToFieldMapping()) {
AbstractDirectMapping directMapping = (AbstractDirectMapping)getMapping();
// Allow user to specify field type to override computed value. (i.e. blob, nchar)
if (directMapping.getFieldClassification() == null) {
directMapping.setFieldClassification(ClassConstants.STRING);
}
}
|
public boolean | isMutable()INTERNAL:
If the converter converts the value to a non-atomic value, i.e.
a value that can have its' parts changed without being replaced,
then it must return false, serialization can be non-atomic.
return false;
|