1 19 package org.apache.cayenne.enhancer; 20 21 import org.apache.cayenne.map.ObjEntity; 22 import org.objectweb.asm.ClassVisitor; 23 24 30 public class PersistentAccessorVisitor extends AccessorVisitor { 31 32 private ObjEntity entity; 33 34 public PersistentAccessorVisitor(ClassVisitor visitor, ObjEntity entity) { 35 super(visitor); 36 this.entity = entity; 37 } 38 39 @Override 40 protected boolean isEnhancedProperty(String property) { 41 return entity.getAttribute(property) != null 42 || entity.getRelationship(property) != null; 43 } 44 45 @Override 46 protected boolean isLazyFaulted(String property) { 47 return entity.getRelationship(property) != null; 48 } 49 } 50 | Popular Tags |