| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||||
| AbstractAliasedSQLElement |
|
| 1.0;1 |
| 1 | /* |
|
| 2 | * SQLElements object-oriented SQL parsing and generation library |
|
| 3 | * |
|
| 4 | * Copyright (c) 2003, 2004, 2005 Israfil Consulting Services Corporation |
|
| 5 | * Copyright (c) 2003, 2004, 2005 Christian Edward Gruber |
|
| 6 | * All Rights Reserved |
|
| 7 | * |
|
| 8 | * This library is free software; you can redistribute it and/or modify |
|
| 9 | * it under the terms of the GNU Lesser General Public License as published |
|
| 10 | * by the Free Software Foundation; either version 2.1 of the License, or |
|
| 11 | * (at your option) any later version. |
|
| 12 | * |
|
| 13 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
|
| 14 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
| 15 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
| 16 | * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
|
| 17 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
|
| 18 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
|
| 19 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
|
| 20 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
|
| 21 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
|
| 22 | * OF SUCH DAMAGE. |
|
| 23 | * |
|
| 24 | * You should have received a copy of the GNU Lesser General Public License |
|
| 25 | * along with this library; if not, please visit http://www.gnu.org/licenses/lgpl.html |
|
| 26 | * |
|
| 27 | * $Id: AbstractAliasedSQLElement.java 16 2005-12-08 23:03:58 -0500 (Thu, 08 Dec 2005) cgruber $ |
|
| 28 | */ |
|
| 29 | package org.israfil.sqlelements; |
|
| 30 | ||
| 31 | /** |
|
| 32 | * |
|
| 33 | * @author <a href="mailto:cgruber@israfil.net">Christian Edward Gruber </a> |
|
| 34 | * @author Latest: $Author: cgruber $ |
|
| 35 | * @version $Revision: 16 $ |
|
| 36 | */ |
|
| 37 | public abstract class AbstractAliasedSQLElement implements AliasedSQLElement { |
|
| 38 | protected String alias; |
|
| 39 | ||
| 40 | public String getAlias() { |
|
| 41 | 30 | return alias; |
| 42 | } |
|
| 43 | ||
| 44 | public void setAlias(String value) { |
|
| 45 | 0 | alias = value; |
| 46 | 0 | } |
| 47 | ||
| 48 | public boolean hasAlias() { |
|
| 49 | 108 | return (alias != null && !alias.equals("")); |
| 50 | } |
|
| 51 | ||
| 52 | 25 | public AbstractAliasedSQLElement() { |
| 53 | 25 | } |
| 54 | ||
| 55 | 154 | public AbstractAliasedSQLElement(String alias) { |
| 56 | 154 | this.alias = alias; |
| 57 | 154 | } |
| 58 | ||
| 59 | public void finalize() throws Throwable { |
|
| 60 | 135 | alias = null; |
| 61 | 135 | } |
| 62 | ||
| 63 | } |
|
| 64 |