List of usage examples for org.hibernate PropertyNotFoundException PropertyNotFoundException
public PropertyNotFoundException(String message)
From source file:at.nullpointer.trayrss.monitor.Monitor.java
License:Open Source License
public static synchronized Monitor getInstance() { if (trayNotifier == null) throw new PropertyNotFoundException("No TrayNotifier was set!"); if (instance == null) { instance = new Monitor(); }/*from ww w. j a va 2s . co m*/ return instance; }
From source file:com.ncs.gsyt.core.base.search.hibernate.HibernateMetadataUtil.java
License:Apache License
public Metadata get(Class<?> rootEntityClass, String propertyPath) { try {/*from ww w. ja va 2 s .com*/ Metadata md = get(rootEntityClass); if (propertyPath == null || "".equals(propertyPath)) return md; String[] chain = propertyPath.split("\\."); for (int i = 0; i < chain.length; i++) { md = md.getPropertyType(chain[i]); } return md; } catch (HibernateException ex) { throw new PropertyNotFoundException( "Could not find property '" + propertyPath + "' on class " + rootEntityClass + "."); } }
From source file:gov.nih.nci.iso21090.hibernate.property.CollectionPropertyAccessor.java
License:BSD License
/** * @param theClass Target class in which the value is to be set * @param propertyName Target property name * @return returns Setter class instance *//*ww w .j ava 2s . co m*/ private static Setter createSetter(Class theClass, String propertyName) { CollectionPropertySetter result = getSetterOrNull(theClass, propertyName); if (result == null) { throw new PropertyNotFoundException( "Could not find a setter for property " + propertyName + " in class " + theClass.getName()); } return result; }
From source file:org.hl7.hibernate.WrappingAccessor.java
License:Open Source License
private Setter createSetter(Class theClass, String propertyName) throws PropertyNotFoundException { WrappingSetter result = getSetterOrNull(theClass, propertyName); if (result == null) { throw new PropertyNotFoundException( "Could not find a setter for property " + propertyName + " in class " + theClass.getName()); }//from ww w. ja va 2 s .c o m return result; }
From source file:org.hl7.hibernate.WrappingAccessor.java
License:Open Source License
public Getter createGetter(Class theClass, String propertyName) throws PropertyNotFoundException { UnwrappingGetter result = getGetterOrNull(theClass, propertyName); if (result == null) { throw new PropertyNotFoundException( "Could not find a getter for " + propertyName + " in class " + theClass.getName()); }/*from w ww .j a v a 2 s . co m*/ return result; }