public Class<?> getHint(int index) { return getHints().get(index); }
public boolean hasMoreThanOneHint() { return getHints().size() > 1; }
public boolean hasMoreThanOneHint() { return getHints().size() > 1; }
public boolean hasMoreThanOneHint() { return getHints().size() > 1; }
public Class<?> getHint(int index) { return getHints().get(index); }
public Class<?> getHint(int index) { return getHints().get(index); }
public Class<?> getHint() { Class<?> result; if (hasMoreThanOneHint()) { return null; } else { result = getHints().get(0); } return result; }
public Class<?> getHint() { Class<?> result; if (hasMoreThanOneHint()) { return null; } else { result = getHints().get(0); } return result; }
public Class<?> getHint() { Class<?> result; if (hasMoreThanOneHint()) { return null; } else { result = getHints().get(0); } return result; }
public boolean hasHintType(int index) { return index < getHints().size() && getHint(index) != null; }
public boolean hasHintType(int index) { return index < getHints().size() && getHint(index) != null; }
public Class<?> getHint(Class<?> clazz, List<Class<?>> clazzHints) { List<Class<?>> hintTypes = getHints(); int hintsSize = hintTypes.size(); if (hintsSize == 1) { return getHint(); } // validate sizes if (clazzHints.size() != hintsSize) { MappingUtils.throwMappingException( "When using multiple source and destination hints there must be exactly the same number of hints on the source and the destination."); } int count = 0; String myClazName = MappingUtils.getRealClass(clazz).getName(); int size = clazzHints.size(); for (int i = 0; i < size; i++) { Class<?> element = clazzHints.get(i); if (element.getName().equals(myClazName)) { return hintTypes.get(count); } count++; } return clazz; }
public Class<?> getHint(Class<?> clazz, List<Class<?>> clazzHints) { List<Class<?>> hints = getHints(); int hintsSize = hints.size(); if (hintsSize == 1) { return getHint(); } // validate sizes if (clazzHints.size() != hintsSize) { MappingUtils .throwMappingException("When using multiple source and destination hints there must be exactly the same number of hints on the source and the destination."); } int count = 0; String myClazName = MappingUtils.getRealClass(clazz).getName(); int size = clazzHints.size(); for (int i = 0; i < size; i++) { Class<?> element = clazzHints.get(i); if (element.getName().equals(myClazName)) { return hints.get(count); } count++; } return clazz; }
public Class<?> getHint(Class<?> clazz, List<Class<?>> clazzHints) { List<Class<?>> hintTypes = getHints(); int hintsSize = hintTypes.size(); if (hintsSize == 1) { return getHint(); } // validate sizes if (clazzHints.size() != hintsSize) { MappingUtils .throwMappingException("When using multiple source and destination hints there must be exactly the same number of hints on the source and the destination."); } int count = 0; String myClazName = MappingUtils.getRealClass(clazz).getName(); int size = clazzHints.size(); for (int i = 0; i < size; i++) { Class<?> element = clazzHints.get(i); if (element.getName().equals(myClazName)) { return hintTypes.get(count); } count++; } return clazz; }
public Class<?> getDestHintType(Class<?> runtimeSrcClass) { if (getDestHintContainer() != null) { if (getSrcHintContainer() != null) { return getDestHintContainer().getHint(runtimeSrcClass, getSrcHintContainer().getHints()); } else { return getDestHintContainer().getHint(); } } else { return runtimeSrcClass; } }
public Class<?> getDestHintType(Class<?> runtimeSrcClass) { if (getDestHintContainer() != null) { if (getSrcHintContainer() != null) { return getDestHintContainer().getHint(runtimeSrcClass, getSrcHintContainer().getHints()); } else { return getDestHintContainer().getHint(); } } else { return runtimeSrcClass; } }
public Class<?> getDestHintType(Class<?> runtimeSrcClass) { if (getDestHintContainer() != null) { if (getSrcHintContainer() != null) { return getDestHintContainer().getHint(runtimeSrcClass, getSrcHintContainer().getHints()); } else { return getDestHintContainer().getHint(); } } else { return runtimeSrcClass; } }
log.warn(fieldName + " is in a Collection with an unspecified type."); if (destDeepIndexHintContainer != null && destDeepIndexHintContainer.getHints() != null && destDeepIndexHintContainer.getHints().size() > 0) { collectionEntryType = destDeepIndexHintContainer.getHints().get(0); if (log.isWarnEnabled()) { log.warn("Using deep-index-hint to predict containing Collection type for field "