View Javadoc

1   /*
2    * Copyright (C) 2003-2012 David E. Berry
3    *
4    * This library is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Lesser General Public
6    * License as published by the Free Software Foundation; either
7    * version 2.1 of the License, or (at your option) any later version.
8    *
9    * This library is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   * Lesser General Public License for more details.
13   *
14   * You should have received a copy of the GNU Lesser General Public
15   * License along with this library; if not, write to the Free Software
16   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17   *
18   * A copy of the GNU Lesser General Public License may also be found at
19   * http://www.gnu.org/licenses/lgpl.txt
20   */
21  package org.synchronoss.cpo.jdbc;
22  
23  import org.synchronoss.cpo.meta.domain.CpoArgument;
24  
25  /**
26   * JdbcCpoArgument is a class that defines the arguments to a JDBC expression
27   *
28   * @author david berry
29   */
30  public class JdbcCpoArgument extends CpoArgument implements java.io.Serializable, java.lang.Cloneable {
31  
32    /**
33     * Version Id for this class.
34     */
35    private static final long serialVersionUID = 1L;
36    private static final String IN_PARAMETER = "IN";
37    private static final String OUT_PARAMETER = "OUT";
38    private static final String INOUT_PARAMETER = "BOTH";  
39    private String scope = null;
40    private String typeInfo = null;
41  
42    public JdbcCpoArgument() {
43      super();
44    }
45  
46    @Override
47    public JdbcCpoAttribute getAttribute() {
48      return (JdbcCpoAttribute) super.getAttribute();
49    }
50  
51    public boolean isInParameter() {
52      return IN_PARAMETER.equals(getScope()) || INOUT_PARAMETER.equals(getScope());
53    }
54  
55    public boolean isOutParameter() {
56      return OUT_PARAMETER.equals(getScope()) || INOUT_PARAMETER.equals(getScope());
57    }
58  
59    public String getScope() {
60      return scope;
61    }
62  
63    public void setScope(String scope) {
64      this.scope = scope;
65    }
66  
67    public String getTypeInfo() {
68      return typeInfo;
69    }
70  
71    public void setTypeInfo(String typeInfo) {
72      this.typeInfo = typeInfo;
73    }
74      
75  }