001/* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 1.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl1.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.ole.sys.web.dddumper; 017 018public class DataDictionaryDumperDocumentRow implements Comparable<DataDictionaryDumperDocumentRow> { 019 020 private String name; 021 private String fieldName; 022 private String column; 023 private int columnNo; 024 private boolean required; 025 private String fieldType; 026 private String defaultValue; 027 private boolean readOnly; 028 private String validationRules; 029 private String maxLength; 030 private boolean existenceCheck; 031 private boolean lookupParam; 032 private boolean lookupResult; 033 private boolean onInquiry; 034 private String controlDefinition; 035 private String fieldSecurity; 036 037 public int sortColumnValue(int colNo){ 038 if (colNo==0) return 10000; 039 return colNo; 040 } 041// public String toString(){ 042// return this.getName()+this.getClass().getName()+this.getFieldName()+this.getFieldType(); 043// } 044 045 public int compareTo(DataDictionaryDumperDocumentRow other){ 046 int tmpVal = new Integer(sortColumnValue(this.getColumnNo())).compareTo(sortColumnValue(other.getColumnNo())); 047 if (tmpVal !=0) { 048 return tmpVal; 049 }else{ 050 return (this.getName()+this.getClass().getName()+this.getFieldName()+this.getFieldType()).compareTo(other.getName()+other.getClass().getName()+other.getFieldName()+other.getFieldType()); 051 } 052 } 053 054 public String getName() { 055 return this.name; 056 } 057 public void setName(String name) { 058 this.name = name; 059 } 060 061 public String getFieldName() { 062 return fieldName; 063 } 064 public void setFieldName(String fieldName) { 065 this.fieldName = fieldName; 066 } 067 public String getColumn() { 068 return this.column; 069 } 070 public void setColumn(String column) { 071 this.column = column; 072 } 073 074 public int getColumnNo() { 075 return columnNo; 076 } 077 public void setColumnNo(int columnNo) { 078 this.columnNo = columnNo; 079 } 080 public boolean isRequired() { 081 return this.required; 082 } 083 public void setRequired(boolean required) { 084 this.required = required; 085 } 086 public String getFieldType() { 087 return this.fieldType; 088 } 089 public void setFieldType(String fieldType) { 090 this.fieldType = fieldType; 091 } 092 public String getDefaultValue() { 093 return this.defaultValue; 094 } 095 public void setDefaultValue(String defaultValue) { 096 this.defaultValue = defaultValue; 097 } 098 public boolean isReadOnly() { 099 return this.readOnly; 100 } 101 public void setReadOnly(boolean readOnly) { 102 this.readOnly = readOnly; 103 } 104 public String getValidationRules() { 105 return this.validationRules; 106 } 107 public void setValidationRules(String validationRules) { 108 this.validationRules = validationRules; 109 } 110 public String getMaxLength() { 111 return this.maxLength; 112 } 113 public void setMaxLength(String maxLength) { 114 this.maxLength = maxLength; 115 } 116 public boolean isExistenceCheck() { 117 return this.existenceCheck; 118 } 119 public void setExistenceCheck(boolean existenceCheck) { 120 this.existenceCheck = existenceCheck; 121 } 122 public boolean isLookupParam() { 123 return this.lookupParam; 124 } 125 public void setLookupParam(boolean lookupParam) { 126 this.lookupParam = lookupParam; 127 } 128 public boolean isLookupResult() { 129 return this.lookupResult; 130 } 131 public void setLookupResult(boolean lookupResult) { 132 this.lookupResult = lookupResult; 133 } 134 public boolean isOnInquiry() { 135 return this.onInquiry; 136 } 137 public void setOnInquiry(boolean onInquiry) { 138 this.onInquiry = onInquiry; 139 } 140 141 public String getControlDefinition() { 142 return controlDefinition; 143 } 144 145 public void setControlDefinition(String controlDefinition) { 146 this.controlDefinition = controlDefinition; 147 } 148 149 public String getFieldSecurity() { 150 return fieldSecurity; 151 } 152 153 public void setFieldSecurity(String fieldSecurity) { 154 this.fieldSecurity = fieldSecurity; 155 } 156 157 158}