Class NewObjectIdInstance2

  • public class NewObjectIdInstance2
    extends ClassMethod
    Method to generate the method "dnNewObjectIdInstance" using ASM. For datastore/nondurable identity this is
     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);
    • Constructor Detail

      • NewObjectIdInstance2

        public NewObjectIdInstance2​(ClassEnhancer enhancer,
                                    String name,
                                    int access,
                                    Object returnType,
                                    Object[] argTypes,
                                    String[] argNames)
        enhancer - ClassEnhancer
        name - Name of method
        access - Access type
        returnType - Return type
        argTypes - Argument types
        argNames - Argument names