comparison src/main/java/de/intevation/lada/util/data/DefaultRepository.java @ 1290:14876c62f692

Push down refreshing of persisted objects deeper into the stack. There are more places besides creation of Probe objects where it is useful to return within the response what has been really written to the database (including modifications by the database itself) instead of merely the request data, e.g. creation of Ort objects, which includes database generated ort_ids.
author Tom Gottfried <tom@intevation.de>
date Wed, 08 Feb 2017 18:02:05 +0100
parents 58fc5b5fad4b
children
comparison
equal deleted inserted replaced
1289:788311087838 1290:14876c62f692
42 * Create and persist a new object in the database. 42 * Create and persist a new object in the database.
43 * 43 *
44 * @param object The new object. 44 * @param object The new object.
45 * @param dataSource The datasource. 45 * @param dataSource The datasource.
46 * 46 *
47 * @return Response object containing the new object. 47 * @return Response object containing the new object, potentially
48 * modified by the database.
48 */ 49 */
49 @Override 50 @Override
50 public Response create(Object object, String dataSource) { 51 public Response create(Object object, String dataSource) {
51 try { 52 try {
52 transaction.persistInDatabase(object, dataSource); 53 transaction.persistInDatabase(object, dataSource);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)