* public void _persistence_checkSetFetched(String attribute) { if
* (this._persistence_fetchGroup != null) {
* EntityManagerImpl.processUnfetchedAttributeForSet(this, attribute); } }
*/
public void addFetchGroupMethods(ClassDetails classDetails) {
MethodVisitor cv_getSession = cv.visitMethod(ACC_PUBLIC, "_persistence_getSession", "()" + SESSION_SIGNATURE, null, null);
cv_getSession.visitVarInsn(ALOAD, 0);
cv_getSession.visitFieldInsn(GETFIELD, classDetails.getClassName(), "_persistence_session", SESSION_SIGNATURE);
cv_getSession.visitInsn(ARETURN);
cv_getSession.visitMaxs(0, 0);
MethodVisitor cv_setSession = cv.visitMethod(ACC_PUBLIC, "_persistence_setSession", "(" + SESSION_SIGNATURE + ")V", null, null);
cv_setSession.visitVarInsn(ALOAD, 0);
cv_setSession.visitVarInsn(ALOAD, 1);
cv_setSession.visitFieldInsn(PUTFIELD, classDetails.getClassName(), "_persistence_session", SESSION_SIGNATURE);
cv_setSession.visitInsn(RETURN);
cv_setSession.visitMaxs(0, 0);
MethodVisitor cv_getFetchGroup = cv.visitMethod(ACC_PUBLIC, "_persistence_getFetchGroup", "()" + FETCHGROUP_SIGNATURE, null, null);
cv_getFetchGroup.visitVarInsn(ALOAD, 0);
cv_getFetchGroup.visitFieldInsn(GETFIELD, classDetails.getClassName(), "_persistence_fetchGroup", FETCHGROUP_SIGNATURE);
cv_getFetchGroup.visitInsn(ARETURN);
cv_getFetchGroup.visitMaxs(0, 0);
MethodVisitor cv_setFetchGroup = cv.visitMethod(ACC_PUBLIC, "_persistence_setFetchGroup", "(" + FETCHGROUP_SIGNATURE + ")V", null, null);
cv_setFetchGroup.visitVarInsn(ALOAD, 0);
cv_setFetchGroup.visitVarInsn(ALOAD, 1);
cv_setFetchGroup.visitFieldInsn(PUTFIELD, classDetails.getClassName(), "_persistence_fetchGroup", FETCHGROUP_SIGNATURE);
cv_setFetchGroup.visitInsn(RETURN);
cv_setFetchGroup.visitMaxs(0, 0);
MethodVisitor cv_shouldRefreshFetchGroup = cv.visitMethod(ACC_PUBLIC, "_persistence_shouldRefreshFetchGroup", "()" + PBOOLEAN_SIGNATURE, null, null);
cv_shouldRefreshFetchGroup.visitVarInsn(ALOAD, 0);
cv_shouldRefreshFetchGroup.visitFieldInsn(GETFIELD, classDetails.getClassName(), "_persistence_shouldRefreshFetchGroup", PBOOLEAN_SIGNATURE);
cv_shouldRefreshFetchGroup.visitInsn(IRETURN);
cv_shouldRefreshFetchGroup.visitMaxs(0, 0);
MethodVisitor cv_setShouldRefreshFetchGroup = cv.visitMethod(ACC_PUBLIC, "_persistence_setShouldRefreshFetchGroup", "(" + PBOOLEAN_SIGNATURE + ")V", null, null);
cv_setShouldRefreshFetchGroup.visitVarInsn(ALOAD, 0);
cv_setShouldRefreshFetchGroup.visitVarInsn(ILOAD, 1);
cv_setShouldRefreshFetchGroup.visitFieldInsn(PUTFIELD, classDetails.getClassName(), "_persistence_shouldRefreshFetchGroup", PBOOLEAN_SIGNATURE);
cv_setShouldRefreshFetchGroup.visitInsn(RETURN);
cv_setShouldRefreshFetchGroup.visitMaxs(0, 0);
MethodVisitor cv_resetFetchGroup = cv.visitMethod(ACC_PUBLIC, "_persistence_resetFetchGroup", "()V", null, null);
cv_resetFetchGroup.visitInsn(RETURN);
cv_resetFetchGroup.visitMaxs(0, 0);
MethodVisitor cv_isAttributeFetched = cv.visitMethod(ACC_PUBLIC, "_persistence_isAttributeFetched", "(Ljava/lang/String;)Z", null, null);
cv_isAttributeFetched.visitVarInsn(ALOAD, 0);
cv_isAttributeFetched.visitFieldInsn(GETFIELD, classDetails.getClassName(), "_persistence_fetchGroup", FETCHGROUP_SIGNATURE);
Label gotoTrue = new Label();
cv_isAttributeFetched.visitJumpInsn(IFNULL, gotoTrue);
cv_isAttributeFetched.visitVarInsn(ALOAD, 0);
cv_isAttributeFetched.visitFieldInsn(GETFIELD, classDetails.getClassName(), "_persistence_fetchGroup", FETCHGROUP_SIGNATURE);
cv_isAttributeFetched.visitVarInsn(ALOAD, 1);
cv_isAttributeFetched.visitMethodInsn(INVOKEVIRTUAL, FETCHGROUP_SHORT_SIGNATURE, "containsAttributeInternal", "(Ljava/lang/String;)Z");
Label gotoFalse = new Label();
cv_isAttributeFetched.visitJumpInsn(IFEQ, gotoFalse);
cv_isAttributeFetched.visitLabel(gotoTrue);
cv_isAttributeFetched.visitInsn(ICONST_1);
Label gotoReturn = new Label();
cv_isAttributeFetched.visitJumpInsn(GOTO, gotoReturn);
cv_isAttributeFetched.visitLabel(gotoFalse);
cv_isAttributeFetched.visitInsn(ICONST_0);
cv_isAttributeFetched.visitLabel(gotoReturn);
cv_isAttributeFetched.visitInsn(IRETURN);
cv_isAttributeFetched.visitMaxs(0, 0);
MethodVisitor cv_checkFetched = cv.visitMethod(ACC_PUBLIC, "_persistence_checkFetched", "(Ljava/lang/String;)V", null, null);
cv_checkFetched.visitVarInsn(ALOAD, 0);
cv_checkFetched.visitVarInsn(ALOAD, 1);
cv_checkFetched.visitMethodInsn(INVOKEVIRTUAL, classDetails.getClassName(), "_persistence_isAttributeFetched", "(Ljava/lang/String;)Z");
gotoReturn = new Label();
cv_checkFetched.visitJumpInsn(IFNE, gotoReturn);
cv_checkFetched.visitVarInsn(ALOAD, 0);
cv_checkFetched.visitTypeInsn(CHECKCAST, FETCHGROUP_TRACKER_SHORT_SIGNATURE);
cv_checkFetched.visitVarInsn(ALOAD, 1);
cv_checkFetched.visitMethodInsn(INVOKESTATIC, ENTITY_MANAGER_IMPL_SHORT_SIGNATURE, "processUnfetchedAttribute", "(" + FETCHGROUP_TRACKER_SIGNATURE + "Ljava/lang/String;)V");
cv_checkFetched.visitLabel(gotoReturn);
cv_checkFetched.visitInsn(RETURN);
cv_checkFetched.visitMaxs(0, 0);
MethodVisitor cv_checkFetchedForSet = cv.visitMethod(ACC_PUBLIC, "_persistence_checkFetchedForSet", "(Ljava/lang/String;)V", null, null);
cv_checkFetchedForSet.visitVarInsn(ALOAD, 0);
cv_checkFetchedForSet.visitVarInsn(ALOAD, 1);
cv_checkFetchedForSet.visitMethodInsn(INVOKEVIRTUAL, classDetails.getClassName(), "_persistence_isAttributeFetched", "(Ljava/lang/String;)Z");
gotoReturn = new Label();
cv_checkFetchedForSet.visitJumpInsn(IFNE, gotoReturn);
cv_checkFetchedForSet.visitVarInsn(ALOAD, 0);
cv_checkFetchedForSet.visitTypeInsn(CHECKCAST, FETCHGROUP_TRACKER_SHORT_SIGNATURE);
cv_checkFetchedForSet.visitVarInsn(ALOAD, 1);
cv_checkFetchedForSet.visitMethodInsn(INVOKESTATIC, ENTITY_MANAGER_IMPL_SHORT_SIGNATURE, "processUnfetchedAttributeForSet", "(" + FETCHGROUP_TRACKER_SIGNATURE + "Ljava/lang/String;)V");
cv_checkFetchedForSet.visitLabel(gotoReturn);
cv_checkFetchedForSet.visitInsn(RETURN);
cv_checkFetchedForSet.visitMaxs(0, 0);
}