public class JdoMakeDirty extends ClassMethod
public void jdoMakeDirty(String fieldName)
{
if (jdoStateManager != null)
jdoStateManager.makeDirty(this, fieldName);
if (jdoIsDetached() && fieldName != null)
{
String fldName = null;
if (fieldName.indexOf('.') >= 0)
fldName = fieldName.substring(fieldName.lastIndexOf('.') + 1);
else
fldName = fieldName;
for (int i = 0; i < jdoFieldNames.length; i++)
{
if (jdoFieldNames[i].equals(fldName))
{
if (((BitSet) jdoDetachedState[2]).get(i + jdoInheritedFieldCount))
((BitSet) jdoDetachedState[3]).set(i + jdoInheritedFieldCount);
else
throw new JDODetachedFieldAccessException
("You have just attempted to access a field/property");
break;
}
}
}
}
and if not detachable
public void jdoMakeDirty(String fieldName)
{
if (jdoStateManager != null)
jdoStateManager.makeDirty(this, fieldName);
}
TODO This currently doesnt cater for a fully-qualified field where the class name part
doesnt define a field at that levelaccess, argNames, argTypes, enhancer, exceptions, LOCALISER, methodName, returnType, visitor| Constructor and Description |
|---|
JdoMakeDirty(ClassEnhancer enhancer,
String name,
int access,
Object returnType,
Object[] argTypes,
String[] argNames)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Method to add the contents of the class method.
|
static JdoMakeDirty |
getInstance(ClassEnhancer enhancer) |
close, equals, getAccess, getClassEnhancer, getDescriptor, getMethodAdditionMessage, getName, getNamer, hashCode, initialise, initialisepublic JdoMakeDirty(ClassEnhancer enhancer, String name, int access, Object returnType, Object[] argTypes, String[] argNames)
enhancer - ClassEnhancername - Name of methodaccess - Access typereturnType - Return typeargTypes - Argument typesargNames - Argument namespublic static JdoMakeDirty getInstance(ClassEnhancer enhancer)
public void execute()
execute in class ClassMethodCopyright © 2013. All Rights Reserved.