001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.orm.hibernate; 020 021 022public class ColumnInfo { 023 024 private String name; 025 private int type; 026 private String typeName; 027 private int size; 028 private boolean nullable; 029 030 public ColumnInfo(String name, int type, String typeName, int size,boolean nullable) { 031 032 033 this.name = name; 034 this.type = type; 035 this.typeName = typeName; 036 this.size = size; 037 this.nullable = nullable; 038 } 039 040 /** 041 * @return the name 042 */ 043 public String getName() { 044 return name; 045 } 046 /** 047 * @param name the name to set 048 */ 049 public void setName(String name) { 050 this.name = name; 051 } 052 /** 053 * @return the type 054 */ 055 public int getType() { 056 return type; 057 } 058 /** 059 * @param type the type to set 060 */ 061 public void setType(int type) { 062 this.type = type; 063 } 064 /** 065 * @return the typeName 066 */ 067 public String getTypeName() { 068 return typeName; 069 } 070 /** 071 * @param typeName the typeName to set 072 */ 073 public void setTypeName(String typeName) { 074 this.typeName = typeName; 075 } 076 /** 077 * @return the size 078 */ 079 public int getSize() { 080 return size; 081 } 082 /** 083 * @param size the size to set 084 */ 085 public void setSize(int size) { 086 this.size = size; 087 } 088 /** 089 * @return the nullable 090 */ 091 public boolean isNullable() { 092 return nullable; 093 } 094 /** 095 * @param nullable the nullable to set 096 */ 097 public void setNullable(boolean nullable) { 098 this.nullable = nullable; 099 } 100 101 @Override 102 public String toString() { 103 return "name:"+name+";type:"+type+";typeName:"+typeName+";size:"+size+";nullable:"+nullable+";"; 104 } 105}