/** * Gives the Object classname, give the real object class name if this is a VirtualProxy class * * @param obj the object for which we request the real class name. * * @return the real class name. */ public static <T> Class<T> getRealClassName( T obj ) { return removeCglibEnhanced( obj.getClass() ); }
/** * Gives the Object classname, give the real object class name if this is a VirtualProxy class * * @param obj the object for which we request the real class name. * * @return the real class name. */ public static <T> Class<T> getRealClassName( T obj ) { return removeCglibEnhanced( obj.getClass() ); }
@Column( name = "objclass", insertable = false, updatable = false ) public String getObjClass() { if (objClass == null) { objClass = CgLibUtil.removeCglibEnhanced( getClass() ).getName(); } return objClass; }
@Column( name = "objclass", insertable = false, updatable = false ) public String getObjClass() { if (objClass == null) { objClass = CgLibUtil.removeCglibEnhanced( getClass() ).getName(); } return objClass; }
public static String intactObjectToString(IntactObject io, boolean showAttributesCount) { if (io instanceof AnnotatedObject) { return annotatedObjectToString((AnnotatedObject) io, showAttributesCount); } Class clazz = CgLibUtil.removeCglibEnhanced(io.getClass()); StringBuilder sb = new StringBuilder(); sb.append(clazz.getSimpleName()).append(", ac=").append(io.getAc()).append("}"); return sb.toString(); } }
public static String intactObjectToString(IntactObject io, boolean showAttributesCount) { if (io instanceof AnnotatedObject) { return annotatedObjectToString((AnnotatedObject) io, showAttributesCount); } Class clazz = CgLibUtil.removeCglibEnhanced(io.getClass()); StringBuilder sb = new StringBuilder(); sb.append(clazz.getSimpleName()).append(", ac=").append(io.getAc()).append("}"); return sb.toString(); } }
public AnnotatedObjectStatsUnit(AnnotatedObject ao) { this.shortLabel = ao.getShortLabel(); this.ac = ao.getAc(); this.type = CgLibUtil.removeCglibEnhanced(ao.getClass()); }
protected Key keyForAnnotatedObject(AnnotatedObject annotatedObject) { Class normalizedClass = CgLibUtil.removeCglibEnhanced(annotatedObject.getClass()); return new Key(normalizedClass.getSimpleName() + ":" + annotatedObject.getShortLabel()); }
/** * Get an item using its AC * * @param ac the identifier * * @return the object */ public T getByAc( String ac ) { return ( T ) getSession().get( CgLibUtil.removeCglibEnhanced( getEntityClass() ), ac ); }
protected Key keyForAnnotatedObject(AnnotatedObject annotatedObject) { Class normalizedClass = CgLibUtil.removeCglibEnhanced(annotatedObject.getClass()); return new Key(normalizedClass.getSimpleName() + ":" + annotatedObject.getShortLabel()); }
/** * Get an item using its AC * * @param ac the identifier * * @return the object */ public T getByAc( String ac ) { return ( T ) getSession().get( CgLibUtil.removeCglibEnhanced( getEntityClass() ), ac ); }
public AnnotatedObjectStatsUnit(AnnotatedObject ao) { this.shortLabel = ao.getShortLabel(); this.ac = ao.getAc(); this.type = CgLibUtil.removeCglibEnhanced(ao.getClass()); }
/** * Gets the generic Xref type for an AnnotatedObject class * * @param clazz an AnnotatedObject class * @return the Xref type used in the class * @since 1.6.1 */ public static Class<? extends Alias> getAliasClassType(Class<? extends AnnotatedObject> clazz) { clazz = CgLibUtil.removeCglibEnhanced(clazz); PropertyDescriptor propDesc = null; try { propDesc = new PropertyDescriptor("aliases", clazz); } catch (IntrospectionException e) { e.printStackTrace(); } Method method = propDesc.getReadMethod(); return getParameterizedType(method.getGenericReturnType()); }
/** * Gets the generic Xref type for an AnnotatedObject class * * @param clazz an AnnotatedObject class * @return the Xref type used in the class */ public static Class<? extends Xref> getXrefClassType(Class<? extends AnnotatedObject> clazz) { clazz = CgLibUtil.removeCglibEnhanced(clazz); PropertyDescriptor propDesc = null; try { propDesc = new PropertyDescriptor("xrefs", clazz); } catch (IntrospectionException e) { e.printStackTrace(); } Method method = propDesc.getReadMethod(); return getParameterizedType(method.getGenericReturnType()); }
/** * Gets the generic Xref type for an AnnotatedObject class * * @param clazz an AnnotatedObject class * @return the Xref type used in the class * @since 1.6.1 */ public static Class<? extends Alias> getAliasClassType(Class<? extends AnnotatedObject> clazz) { clazz = CgLibUtil.removeCglibEnhanced(clazz); PropertyDescriptor propDesc = null; try { propDesc = new PropertyDescriptor("aliases", clazz); } catch (IntrospectionException e) { e.printStackTrace(); } Method method = propDesc.getReadMethod(); return getParameterizedType(method.getGenericReturnType()); }
/** * Gets the generic Xref type for an AnnotatedObject class * * @param clazz an AnnotatedObject class * @return the Xref type used in the class */ public static Class<? extends Xref> getXrefClassType(Class<? extends AnnotatedObject> clazz) { clazz = CgLibUtil.removeCglibEnhanced(clazz); PropertyDescriptor propDesc = null; try { propDesc = new PropertyDescriptor("xrefs", clazz); } catch (IntrospectionException e) { e.printStackTrace(); } Method method = propDesc.getReadMethod(); return getParameterizedType(method.getGenericReturnType()); }
protected Key keyForInteractor(Interactor interactor) { final Collection<InteractorXref> interactorXrefs = XrefUtils.getIdentityXrefs(interactor); Key key; if (interactorXrefs.isEmpty()) { key = keyForAnnotatedObject(interactor); } else { Class normalizedClass = CgLibUtil.removeCglibEnhanced(interactor.getClass()); key = new Key(normalizedClass.getSimpleName() + ":" + concatPrimaryIds(interactorXrefs)); } return key; }
protected Key keyForInteractor(Interactor interactor) { final Collection<InteractorXref> interactorXrefs = XrefUtils.getIdentityXrefs(interactor); Key key; if (interactorXrefs.isEmpty()) { key = keyForAnnotatedObject(interactor); } else { Class normalizedClass = CgLibUtil.removeCglibEnhanced(interactor.getClass()); key = new Key(normalizedClass.getSimpleName() + ":" + concatPrimaryIds(interactorXrefs)); } return key; }
protected Alias cloneAlias(Alias alias) throws IntactClonerException { if (alias == null) return null; Class clazz = CgLibUtil.removeCglibEnhanced(alias.getClass()); Alias clone = null; try { final Constructor constructor = clazz.getConstructor(); clone = (Alias) constructor.newInstance(); clonerManager.addClone(alias, clone); clone.setCvAliasType(clone(alias.getCvAliasType())); clone.setName(alias.getName()); } catch (Exception e) { throw new IntactClonerException("An error occured upon building a " + clazz.getSimpleName(), e); } return clone; }
protected Alias cloneAlias(Alias alias) throws IntactClonerException { if (alias == null) return null; Class clazz = CgLibUtil.removeCglibEnhanced(alias.getClass()); Alias clone = null; try { final Constructor constructor = clazz.getConstructor(); clone = (Alias) constructor.newInstance(); clonerManager.addClone(alias, clone); clone.setCvAliasType(clone(alias.getCvAliasType())); clone.setName(alias.getName()); } catch (Exception e) { throw new IntactClonerException("An error occured upon building a " + clazz.getSimpleName(), e); } return clone; }