@OneToOne TriggerEntity getTrigger();
private static void validateOneToOneAnnotation(final Method method) { final OneToOne oneToOne = method.getAnnotation(OneToOne.class); if (oneToOne != null) { final String reverse = oneToOne.reverse(); if (reverse.length() != 0) { try { method.getReturnType().getMethod(reverse); } catch (final NoSuchMethodException exception) { throw new IllegalArgumentException(method + " has OneToMany annotation with an invalid reverse element value. It be the name of the corresponding getter method on the related entity.", exception); } } } }
public static String where(OneToOne oneToOne, final FieldNameConverter fnc) { return where(oneToOne.where(), fnc); }
private static void validateOneToOneAnnotation(final Method method) { final OneToOne oneToOne = method.getAnnotation(OneToOne.class); if (oneToOne != null) { final String reverse = oneToOne.reverse(); if (reverse.length() != 0) { try { method.getReturnType().getMethod(reverse); } catch (final NoSuchMethodException exception) { throw new IllegalArgumentException(method + " has OneToMany annotation with an invalid reverse element value. It be the name of the corresponding getter method on the related entity.", exception); } } } }
public static String where(OneToOne oneToOne, final FieldNameConverter fnc) { return where(oneToOne.where(), fnc); }
@OneToOne public Nose getNose();
ret = values.get(methodName); } else if (isOneToOne) { if (oneToOneAnnotation.reverse().isEmpty()) { ret = legacyFetchOneToOne((RawEntity<K>) proxy, method, oneToOneAnnotation); } else {
final String remotePrimaryKeyFieldName = Common.getPrimaryKeyField(remoteType, getFieldNameConverter()); final String whereClause = Common.where(annotation, getFieldNameConverter()); final Method remoteMethod = remoteType.getMethod(annotation.reverse()); final String remotePolymorphicTypeFieldName = getPolymorphicTypeFieldName(remoteMethod); final Preload preloadAnnotation = (Preload) remoteType.getAnnotation(Preload.class);
ret = values.get(methodName); } else if (isOneToOne) { if (oneToOneAnnotation.reverse().isEmpty()) { ret = legacyFetchOneToOne((RawEntity<K>) proxy, method, oneToOneAnnotation); } else {
final String remotePrimaryKeyFieldName = Common.getPrimaryKeyField(remoteType, getFieldNameConverter()); final String whereClause = Common.where(annotation, getFieldNameConverter()); final Method remoteMethod = remoteType.getMethod(annotation.reverse()); final String remotePolymorphicTypeFieldName = getPolymorphicTypeFieldName(remoteMethod); final Preload preloadAnnotation = (Preload) remoteType.getAnnotation(Preload.class);