Revision 23de68fc
Added by Andreas Müller almost 2 years ago
cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/ResultWrapper.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.cdm.common; |
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
13 |
|
|
14 |
//import org.apache.log4j.Logger; |
|
12 |
import org.apache.logging.log4j.LogManager; |
|
13 |
import org.apache.logging.log4j.Logger; |
|
15 | 14 |
|
16 | 15 |
/** |
17 | 16 |
* Wrapps a result object so it can be used as method parameter and changed within the method. |
... | ... | |
27 | 26 |
* __}<br> |
28 | 27 |
* } |
29 | 28 |
* </code> |
30 |
* Here a String is returned but the boolean value may also be changed and it's value is useable
|
|
29 |
* Here a String is returned but the boolean value may also be changed and it's value is useable |
|
31 | 30 |
* by the calling method |
32 |
*
|
|
31 |
* |
|
33 | 32 |
* @author a.mueller |
34 | 33 |
* @since 01.11.2008 |
35 |
* @version 1.0 |
|
36 | 34 |
*/ |
37 | 35 |
public class ResultWrapper<T> { |
38 |
private static final Logger logger = Logger.getLogger(ResultWrapper.class); |
|
36 |
|
|
37 |
private static final Logger logger = LogManager.getLogger(ResultWrapper.class); |
|
39 | 38 |
|
40 | 39 |
public static final ResultWrapper<Boolean> NewInstance(Boolean value){ |
41 | 40 |
ResultWrapper<Boolean> result = new ResultWrapper<Boolean>(); |
... | ... | |
43 | 42 |
if (logger.isDebugEnabled()){logger.debug("New Instance");} |
44 | 43 |
return result; |
45 | 44 |
} |
46 |
|
|
47 |
T object; |
|
48 | 45 |
|
49 |
/** |
|
50 |
* @return the object |
|
51 |
*/ |
|
46 |
private T object; |
|
47 |
|
|
52 | 48 |
public T getValue() { |
53 | 49 |
return object; |
54 | 50 |
} |
55 | 51 |
|
56 |
/** |
|
57 |
* @param object the object to set |
|
58 |
*/ |
|
59 | 52 |
public void setValue(T value) { |
60 | 53 |
this.object = value; |
61 | 54 |
} |
Also available in: Unified diff
ref #9359 upgrade cdmlib to log4j 2