/** * Returns the managed type which declared this attribute. */ @SuppressWarnings("unchecked") public final ManagedType<X> getDeclaringType() { return (ManagedType<X>)owner.model.managedType(fmd.getDeclaringType()); }
/** * Returns the managed type which declared this attribute. */ @SuppressWarnings("unchecked") public final ManagedType<X> getDeclaringType() { return (ManagedType<X>)owner.model.managedType(fmd.getDeclaringType()); }
/** * Returns the managed type which declared this attribute. */ @SuppressWarnings("unchecked") public final ManagedType<X> getDeclaringType() { return (ManagedType<X>)owner.model.managedType(fmd.getDeclaringType()); }
/** * Returns the managed type which declared this attribute. */ @SuppressWarnings("unchecked") public final ManagedType<X> getDeclaringType() { return (ManagedType<X>)owner.model.managedType(fmd.getDeclaringType()); }
private Method setterForField(FieldMetaData fmd) { try { return fmd.getDeclaringType().getDeclaredMethod( "set" + StringUtils.capitalize(fmd.getName()), new Class[]{ fmd.getDeclaredType() }); } catch (NoSuchMethodException e) { return null; } }
private Method setterForField(FieldMetaData fmd) { try { return fmd.getDeclaringType().getDeclaredMethod( "set" + StringUtils.capitalize(fmd.getName()), new Class[]{ fmd.getDeclaredType() }); } catch (NoSuchMethodException e) { return null; } }
private Method setterForField(FieldMetaData fmd) { try { return fmd.getDeclaringType().getDeclaredMethod( "set" + StringUtils.capitalize(fmd.getName()), new Class[]{ fmd.getDeclaredType() }); } catch (NoSuchMethodException e) { return null; } }
private Method setterForField(FieldMetaData fmd) { try { return fmd.getDeclaringType().getDeclaredMethod( "set" + StringUtil.capitalize(fmd.getName()), new Class[]{ fmd.getDeclaredType() }); } catch (NoSuchMethodException e) { return null; } }
private Method setterForField(FieldMetaData fmd) { try { return fmd.getDeclaringType().getDeclaredMethod( "set" + StringUtil.capitalize(fmd.getName()), new Class[]{ fmd.getDeclaredType() }); } catch (NoSuchMethodException e) { return null; } }
/** * Return metadata for primary key fields declared in the given class. */ private static FieldMetaData[] getDeclaredPrimaryKeyFields (ClassMetaData meta) { if (meta.getPCSuperclass() == null) return meta.getPrimaryKeyFields(); // remove the primary key fields that are not declared // in the current class FieldMetaData[] fields = meta.getPrimaryKeyFields(); List decs = new ArrayList(fields.length); for (int i = 0; i < fields.length; i++) if (fields[i].getDeclaringType() == meta.getDescribedType()) decs.add(fields[i]); return (FieldMetaData[]) decs.toArray(new FieldMetaData[decs.size()]); }
/** * Return metadata for primary key fields declared in the given class. */ private static FieldMetaData[] getDeclaredPrimaryKeyFields (ClassMetaData meta) { if (meta.getPCSuperclass() == null) return meta.getPrimaryKeyFields(); // remove the primary key fields that are not declared // in the current class FieldMetaData[] fields = meta.getPrimaryKeyFields(); List decs = new ArrayList(fields.length); for (int i = 0; i < fields.length; i++) if (fields[i].getDeclaringType() == meta.getDescribedType()) decs.add(fields[i]); return (FieldMetaData[]) decs.toArray(new FieldMetaData[decs.size()]); }
/** * The field name, qualified by the owning class and optionally the * embedding owner's name (if any). */ public String getFullName(boolean embedOwner) { if (_fullName == null) _fullName = getDeclaringType().getName() + "." + _name; if (embedOwner && _embedFullName == null) { if (_owner.getEmbeddingMetaData() == null) _embedFullName = _fullName; else _embedFullName = _owner.getEmbeddingMetaData(). getFieldMetaData().getFullName(true) + "." + _fullName; } return (embedOwner) ? _embedFullName : _fullName; }
/** * The field name, qualified by the owning class and optionally the * embedding owner's name (if any). */ public String getFullName(boolean embedOwner) { if (_fullName == null) _fullName = getDeclaringType().getName() + "." + _name; if (embedOwner && _embedFullName == null) { if (_owner.getEmbeddingMetaData() == null) _embedFullName = _fullName; else _embedFullName = _owner.getEmbeddingMetaData(). getFieldMetaData().getFullName(true) + "." + _fullName; } return (embedOwner) ? _embedFullName : _fullName; }
/** * Check the given name against the same set of standard packages used * when parsing metadata. */ public static Class<?> classForName(String name, ValueMetaData context, ClassLoader loader) { return classForName(name, context.getFieldMetaData().getDefiningMetaData(), context.getFieldMetaData().getDeclaringType(), context, loader); }
/** * Check the given name against the same set of standard packages used * when parsing metadata. */ public static Class<?> classForName(String name, ValueMetaData context, ClassLoader loader) { return classForName(name, context.getFieldMetaData().getDefiningMetaData(), context.getFieldMetaData().getDeclaringType(), context, loader); }
/** * Check the given name against the same set of standard packages used * when parsing metadata. */ public static Class classForName(String name, ValueMetaData context, ClassLoader loader) { return classForName(name, context.getFieldMetaData().getDefiningMetaData(), context.getFieldMetaData().getDeclaringType(), context, loader); }
/** * Check the given name against the same set of standard packages used * when parsing metadata. */ public static Class<?> classForName(String name, ValueMetaData context, ClassLoader loader) { return classForName(name, context.getFieldMetaData().getDefiningMetaData(), context.getFieldMetaData().getDeclaringType(), context, loader); }
/** * Check the given name against the same set of standard packages used * when parsing metadata. */ public static Class<?> classForName(String name, ValueMetaData context, ClassLoader loader) { return classForName(name, context.getFieldMetaData().getDefiningMetaData(), context.getFieldMetaData().getDeclaringType(), context, loader); }
/** * Try to load a class using the provided loader. Optionally tries the * configuration's ClassResolver if the supplied loader cannot find the class. * * @param name Name of the class to load. * @param loader ClassLoader to use. If null, the configuration's ClassResolver will be used. * @param mustExist Whether the supplied loader <b>must</b> be able to load the class. If true no attempt to use a * different classloader will be made. If false the ClassResolver from the configuration will be used. */ public static Class<?> classForName(String name, ValueMetaData context, ClassLoader loader, boolean mustExist) { return classForName(name, context.getFieldMetaData().getDefiningMetaData(), context.getFieldMetaData().getDeclaringType(), context, loader, mustExist); }
/** * Try to load a class using the provided loader. Optionally tries the * configuration's ClassResolver if the supplied loader cannot find the class. * * @param name Name of the class to load. * @param loader ClassLoader to use. If null, the configuration's ClassResolver will be used. * @param mustExist Whether the supplied loader <b>must</b> be able to load the class. If true no attempt to use a * different classloader will be made. If false the ClassResolver from the configuration will be used. */ public static Class<?> classForName(String name, ValueMetaData context, ClassLoader loader, boolean mustExist) { return classForName(name, context.getFieldMetaData().getDefiningMetaData(), context.getFieldMetaData().getDeclaringType(), context, loader, mustExist); }