/** * Factory method for building and throwing an UnresolvableObjectException if the entity is null. * * @param entity The entity to check for nullness * @param identifier The identifier of the entity * @param entityName The name of the entity * * @throws UnresolvableObjectException Thrown if entity is null */ public static void throwIfNull(Object entity, Serializable identifier, String entityName) throws UnresolvableObjectException { if ( entity == null ) { throw new UnresolvableObjectException( identifier, entityName ); } }
throw new UnresolvableObjectException( e.getId(), "this instance does not yet exist as a row in the database"
public static void throwIfNull(Object o, Serializable id, String clazz) throws UnresolvableObjectException { if (o==null) throw new UnresolvableObjectException(id, clazz); }
public static void throwIfNull(Object o, Serializable id, String clazz) throws UnresolvableObjectException { if (o==null) throw new UnresolvableObjectException(id, clazz); }
public static void throwIfNull(Object o, Serializable id, String clazz) throws UnresolvableObjectException { if (o==null) throw new UnresolvableObjectException(id, clazz); }
public static void throwIfNull(Object o, Serializable id, String clazz) throws UnresolvableObjectException { if (o==null) throw new UnresolvableObjectException(id, clazz); }
/** * Factory method for building and throwing an UnresolvableObjectException if the entity is null. * * @param entity The entity to check for nullness * @param identifier The identifier of the entity * @param entityName The name of the entity * * @throws UnresolvableObjectException Thrown if entity is null */ public static void throwIfNull(Object entity, Object identifier, String entityName) throws UnresolvableObjectException { if ( entity == null ) { throw new UnresolvableObjectException( identifier, entityName ); } }
/** * @deprecated Use {@link #throwIfNull(Object, Object, String)} instead */ @Deprecated public static void throwIfNull(Object entity, Serializable identifier, String entityName) throws UnresolvableObjectException { if ( entity == null ) { throw new UnresolvableObjectException( identifier, entityName ); } }
throw new UnresolvableObjectException( e.getId(), "this instance does not yet exist as a row in the database"