|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BusinessObject | Line # 35 | 2 | 2 | 0% |
0.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| No Tests | |||
| 1 | /* | |
| 2 | * The SmartWeb Framework | |
| 3 | * Copyright (C) 2004-2006 | |
| 4 | * | |
| 5 | * This library is free software; you can redistribute it and/or | |
| 6 | * modify it under the terms of the GNU Lesser General Public | |
| 7 | * License as published by the Free Software Foundation; either | |
| 8 | * version 2.1 of the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This library is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General Public | |
| 16 | * License along with this library; if not, write to the Free Software | |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 18 | * | |
| 19 | * For further informations on the SmartWeb Framework please visit | |
| 20 | * | |
| 21 | * http://smartweb.sourceforge.net | |
| 22 | */ | |
| 23 | package net.smartlab.web; | |
| 24 | ||
| 25 | import org.apache.commons.logging.Log; | |
| 26 | import org.apache.commons.logging.LogFactory; | |
| 27 | ||
| 28 | /** | |
| 29 | * TODO documentation | |
| 30 | * | |
| 31 | * @author rlogiacco | |
| 32 | * @uml.dependency supplier="net.smartlab.web.Enumeration" | |
| 33 | * @uml.dependency supplier="net.smartlab.web.StringEnumeration" | |
| 34 | */ | |
| 35 | public abstract class BusinessObject implements DataTransferObject { | |
| 36 | ||
| 37 | private final static long serialVersionUID = 8960870409825593855L; | |
| 38 | ||
| 39 | /** | |
| 40 | * Allows for business operations logging. | |
| 41 | */ | |
| 42 | protected final transient Log logger = LogFactory.getLog(this.getClass()); | |
| 43 | ||
| 44 | /** | |
| 45 | * This number stores the object version and is used for optimistical | |
| 46 | * locking. | |
| 47 | * | |
| 48 | * @uml.property name="version" | |
| 49 | */ | |
| 50 | private long version; | |
| 51 | ||
| 52 | ||
| 53 | /** | |
| 54 | * Returns the object version. This property ensures optimistical locking | |
| 55 | * support to every subclass. | |
| 56 | * | |
| 57 | * @return returns the version. | |
| 58 | * @hibernate.version | |
| 59 | * @uml.property name="version" | |
| 60 | */ | |
| 61 | 0 |
public long getVersion() { |
| 62 | 0 | return version; |
| 63 | } | |
| 64 | ||
| 65 | /** | |
| 66 | * Sets the object version. This property ensures optimistical locking | |
| 67 | * support to every subclass. | |
| 68 | * | |
| 69 | * @param version the version to set. | |
| 70 | * @uml.property name="version" | |
| 71 | */ | |
| 72 | 0 |
public void setVersion(long version) { |
| 73 | 0 | this.version = version; |
| 74 | } | |
| 75 | } | |
|
||||||||||