public class NewObjectIdInstance2 extends ClassMethod
public Object dnNewObjectIdInstance(Object key)
{
return null;
}
and for SingleFieldIdentity
public Object dnNewObjectIdInstance(Object key)
{
if (key == null)
throw new IllegalArgumentException("key is null");
if (key instanceof String != true)
return new YYYIdentity(this.getClass(), (YYY) key);
return new YYYIdentity(this.getClass(), (String) key);
}
and for user-supplied object ids
public Object dnNewObjectIdInstance(Object key)
{
return new UserPrimaryKey((String) key);
}
access, argNames, argTypes, enhancer, exceptions, methodName, returnType, visitor| Constructor and Description |
|---|
NewObjectIdInstance2(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 NewObjectIdInstance2 |
getInstance(ClassEnhancer enhancer) |
close, equals, getAccess, getClassEnhancer, getDescriptor, getMethodAdditionMessage, getName, getNamer, hashCode, initialise, initialisepublic NewObjectIdInstance2(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 NewObjectIdInstance2 getInstance(ClassEnhancer enhancer)
public void execute()
execute in class ClassMethodCopyright © 2017. All rights reserved.