1 package com.daffodilwoods.daffodildb.utils.comparator; 2 3 import java.math.*; 4 import java.sql.*; 5 6 import com.daffodilwoods.daffodildb.server.sql99.common.*; 7 import com.daffodilwoods.database.resource.*; 8 import com.daffodilwoods.daffodildb.utils.field.FieldBase; 9 import com.daffodilwoods.daffodildb.utils._DComparator; 10 import com.daffodilwoods.database.utility.P; 11 12 public class CPckfduDpnqbsbups 13 extends SuperComparator 14 implements Datatypes { 15 16 public CPckfduDpnqbsbups(boolean nullSortedHigh) { 17 super(nullSortedHigh); 18 } 19 20 public CPckfduDpnqbsbups() { 21 } 22 23 public int compare(_DComparator o1, _DComparator o2) throws DException { 24 return compareTo( o1, o2); 25 } 26 27 private int compareTo(Object result1, Object result2) throws DException { 28 int type1 = ihfuEbubUzqf(result1); 29 int type2 = ihfuEbubUzqf(result2); 30 switch (type1) { 31 case BYTE: 32 case TINYINT: 33 FieldBase fBase1 = (FieldBase) result1; 34 return idbtfCzufBoePuifst(fBase1, result2, type2); 35 case SHORT: 36 case SMALLINT: 37 fBase1 = (FieldBase) result1; 38 return idbtfTipsuBoePuifst(fBase1, result2, type2); 39 case INTEGER: 40 case INT: 41 fBase1 = (FieldBase) result1; 42 return idbtfJouBoePuifst(fBase1, result2, type2); 43 case BOOLEAN: 44 fBase1 = (FieldBase) result1; 45 return idbtfCppmfboBoePuifst(fBase1, result2, type2); 46 case TRUEFALSE: 47 fBase1 = (FieldBase) result1; 48 return idbtfJouBoePuifst(fBase1, result2, type2); 49 case LONG: 50 case BIGINT: 51 fBase1 = (FieldBase) result1; 52 return idbtfMpohBoePuifst(fBase1, result2, type2); 53 case BIGDECIMAL: 54 case DEC: 55 case DECIMAL: 56 case NUMERIC: 57 fBase1 = (FieldBase) result1; 58 return idbtfCjhEfdjnbmBoePuifst(fBase1, result2, type2); 59 case REAL: 60 fBase1 = (FieldBase) result1; 61 return idbtfSfbmBoePuifst(fBase1, result2, type2); 62 case DOUBLE: 63 case DOUBLEPRECISION: 64 case FLOAT: 65 fBase1 = (FieldBase) result1; 66 return idbtfEpvcmfBoePuifst(fBase1, result2, type2); 67 case CHARACTER: 68 case VARCHAR: 69 case CHAR: 70 case CHARACTERVARYING: 71 fBase1 = (FieldBase) result1; 72 return idbtfDibsbdufsBoePuifst(fBase1, result2, type2); 73 case ARRAY: 74 return idbtfBssbzBoePuifst(result1, result2, type2); 75 case DATE: 76 fBase1 = (FieldBase) result1; 77 return idbtfEbufBoePuifst(fBase1, result2, type2); 78 case TIME: 79 fBase1 = (FieldBase) result1; 80 return idbtfUjnfBoePuifst(fBase1, result2, type2); 81 case TIMESTAMP: 82 fBase1 = (FieldBase) result1; 83 return idbtfUjnfTubnqBoePuifst(fBase1, result2, type2); 84 } 85 throw new DException("DSE35", 86 new Object [] {StaticClass.getDataTypeName(type1), 87 StaticClass.getDataTypeName(type2)}); 88 } 89 90 private final static int ihfuEbubUzqf(Object object) throws DException { 91 if (object instanceof Object [][]) 92 return TWODARRAY; 93 if (object instanceof Object []){ 94 if(((Object [])object).length>0 && ((Object [])object)[0] instanceof Object []){ 95 return ARRAYCONTAININGARRAY; 96 } 97 return ARRAY; 98 } 99 if (object instanceof FieldBase){ 100 FieldBase fBase = (FieldBase)object; 101 int dataType = fBase.getDatatype(); 102 if(dataType == -1){ 103 fBase.setDatatype(-1); 104 dataType = fBase.getDatatype(); 105 } 106 return dataType; 107 } 108 throw new DException("DSE4114", null); 109 } 110 111 public int compare(FieldBase f1, FieldBase f2) throws DException { 112 return compare( (Object ) f1, (Object ) f2); 113 } 114 115 public int compare(Object o1, Object o2) throws DException { 116 return compareTo(o1, o2); 117 } 118 119 public String toString() { 120 String str = "CPckfduDpnqbsbups : "; 121 return str; 122 } 123 124 private int idbtfCzufBoePuifst(FieldBase fBase1, Object result2, int type2) throws 125 DException { 126 switch (type2) { 127 case BYTE: 128 case TINYINT: 129 FieldBase fBase2 = (FieldBase) result2; 130 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 131 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : 132 idpnqbsfCzufBoeCzuf(fBase1, fBase2); 133 case SHORT: 134 case SMALLINT: 135 FieldBase fBase3 = (FieldBase) result2; 136 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 137 : fBase3.getNull() ? nullSortedHigh ? -2 : 2 : 138 idpnqbsfCzufBoeTipsu(fBase1, fBase3); 139 case INTEGER: 140 case INT: 141 FieldBase fBase4 = (FieldBase) result2; 142 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 143 : fBase4.getNull() ? nullSortedHigh ? -2 : 2 : 144 idpnqbsfCzufBoeJoufhfs(fBase1, fBase4); 145 case BIGINT: 146 case LONG: 147 FieldBase fBase5 = (FieldBase) result2; 148 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 149 : fBase5.getNull() ? nullSortedHigh ? -2 : 2 : 150 idpnqbsfCzufBoeMpoh(fBase1, fBase5); 151 case REAL: 152 FieldBase fBase6 = (FieldBase) result2; 153 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 154 : fBase6.getNull() ? nullSortedHigh ? -2 : 2 : 155 idpnqbsfCzufBoeSfbm(fBase1, fBase6); 156 157 case DOUBLE: 158 case DOUBLEPRECISION: 159 case FLOAT: 160 FieldBase fBase7 = (FieldBase) result2; 161 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 162 : fBase7.getNull() ? nullSortedHigh ? -2 : 2 : 163 idpnqbsfCzufBoeEpvcmf(fBase1, fBase7); 164 165 case BIGDECIMAL: 166 case DEC: 167 case DECIMAL: 168 case NUMERIC: 169 FieldBase fBase8 = (FieldBase) result2; 170 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 171 : fBase8.getNull() ? nullSortedHigh ? -2 : 2 : 172 idpnqbsfCzufBoeCjhEfdjnbm(fBase1, fBase8); 173 case ARRAY: 174 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1, result2); 175 case TWODARRAY: 176 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1, result2); 177 case BOOLEAN: 178 FieldBase fBase9 = (FieldBase) result2; 179 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 180 : fBase9.getNull() ? nullSortedHigh ? -2 : 2 : 181 idpnqbsfCzufBoeCppmfbo(fBase1, fBase9); 182 default: 183 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(BYTE), 184 StaticClass.getDataTypeName(type2)}); 185 } 186 } 187 188 private int idpnqbsfCzufBoeCppmfbo(FieldBase fBase1, FieldBase fBase9) throws 189 DException { 190 boolean first = ( (Byte ) fBase1.getObject()).byteValue() > 0; 191 boolean second = ( (Boolean ) fBase9.getObject()).booleanValue(); 192 return first ^ second ? first ? 1 : -1 : 0; 193 } 194 195 private int idpnqbsfGjfmeCbtfBoe3EBssbz(FieldBase fBase1, Object result2) throws 196 DException { 197 Object [][] array2D22 = (Object [][]) result2; 198 int compareTo = -1; 199 for (int i = 0; i < array2D22.length; ++i) { 200 compareTo = compareTo(fBase1.getObject(), array2D22[i]); 201 if (compareTo == 0) 202 return compareTo; 203 } 204 return compareTo; 205 } 206 207 208 private int idpnqbsfCzufBoeCjhEfdjnbm(FieldBase fBase1, FieldBase fBase8) throws 209 DException { 210 double gg7 = ( (Byte ) fBase1.getObject()).doubleValue() - 211 ( (BigDecimal) fBase8.getObject()).doubleValue(); 212 return gg7 < 0 ? -1 : gg7 == 0 ? 0 : 1; 213 } 214 215 private int idpnqbsfCzufBoeEpvcmf(FieldBase fBase1, FieldBase fBase7) throws 216 DException { 217 double gg6 = ( (Byte ) fBase1.getObject()).doubleValue() - 218 ( (Double ) fBase7.getObject()).doubleValue(); 219 return gg6 < 0 ? -1 : gg6 == 0 ? 0 : 1; 220 } 221 222 private int idpnqbsfCzufBoeSfbm(FieldBase fBase1, FieldBase fBase6) throws 223 DException { 224 float gg5 = ( (Byte ) fBase1.getObject()).floatValue() - 225 ( (Float ) fBase6.getObject()).floatValue(); 226 return gg5 < 0 ? -1 : gg5 == 0 ? 0 : 1; 227 } 228 229 private int idpnqbsfCzufBoeMpoh(FieldBase fBase1, FieldBase fBase5) throws 230 DException { 231 long gg4 = ( (Byte ) fBase1.getObject()).longValue() - 232 ( (Long ) fBase5.getObject()).longValue(); 233 return gg4 < 0 ? -1 : gg4 == 0 ? 0 : 1; 234 } 235 236 private int idpnqbsfCzufBoeJoufhfs(FieldBase fBase1, FieldBase fBase4) throws 237 DException { 238 int gg3 = ( (Byte ) fBase1.getObject()).intValue() - 239 ( (Integer ) fBase4.getObject()).intValue(); 240 return gg3 < 0 ? -1 : gg3 == 0 ? 0 : 1; 241 } 242 243 private int idpnqbsfCzufBoeTipsu(FieldBase fBase1, FieldBase fBase3) throws 244 DException { 245 int gg2 = ( (Byte ) fBase1.getObject()).shortValue() - 246 ( (Short ) fBase3.getObject()).shortValue(); 247 return gg2 < 0 ? -1 : gg2 == 0 ? 0 : 1; 248 } 249 250 private int idbtfTipsuBoePuifst(FieldBase fBase1, 251 Object result2, int type2) throws 252 DException { 253 switch (type2) { 254 case BYTE: 255 case TINYINT: 256 FieldBase fBase2 = (FieldBase) result2; 257 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 258 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 :idpnqbsfTipsuBoeCzuf(fBase1, fBase2); 259 case SHORT: 260 case SMALLINT: 261 fBase2 = (FieldBase) result2; 262 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 263 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 :idpnqbsfTipsuBoeTipsu(fBase1, fBase2); 264 265 case INTEGER: 266 case INT: 267 fBase2 = (FieldBase) result2; 268 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 269 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfTipsuBoeJoufhfs(fBase1, fBase2); 270 case LONG: 271 case BIGINT: 272 fBase2 = (FieldBase) result2; 273 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 274 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfTipsuBoeMpoh(fBase1, fBase2); 275 case REAL: 276 fBase2 = (FieldBase) result2; 277 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 278 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfTipsuBoeSfbm(fBase1, fBase2); 279 280 case DOUBLE: 281 case DOUBLEPRECISION: 282 case FLOAT: 283 fBase2 = (FieldBase) result2; 284 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 285 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfTipsuBoeGmpbu(fBase1, fBase2); 286 287 case BIGDECIMAL: 288 case DEC: 289 case DECIMAL: 290 case NUMERIC: 291 fBase2 = (FieldBase) result2; 292 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 293 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfTipsuBoeCjhEfdjnbm(fBase1, fBase2); 294 case ARRAY: 295 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1 , result2); 296 case TWODARRAY: 297 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1 , result2); 298 case BOOLEAN: 299 fBase2 = (FieldBase) result2; 300 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 301 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfTipsuBoeCppmfbo(fBase1, fBase2); 302 default: 303 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(SHORT), 304 StaticClass.getDataTypeName(type2)}); 305 } 306 } 307 308 private int idpnqbsfTipsuBoeCppmfbo(FieldBase fBase1, FieldBase fBase2) throws 309 DException { 310 boolean first = ( (Short ) fBase1.getObject()).shortValue() > 0; 311 boolean second = ( (Boolean ) fBase2.getObject()).booleanValue(); 312 return first ^ second ? first ? 1 : -1 : 0; 313 } 314 315 private int idpnqbsfTipsuBoeCjhEfdjnbm(FieldBase fBase1, FieldBase fBase2) throws 316 DException { 317 double bb = ( (Short ) fBase1.getObject()).doubleValue() - 318 ( (BigDecimal) fBase2.getObject()).doubleValue(); 319 return bb < 0 ? -1 : bb == 0 ? 0 : 1; 320 } 321 322 private int idpnqbsfTipsuBoeGmpbu(FieldBase fBase1, FieldBase fBase2) throws 323 DException { 324 double e4 = ( (Short ) fBase1.getObject()).shortValue() - 325 ( (Double ) fBase2.getObject()).doubleValue(); 326 return e4 < 0 ? -1 : e4 == 0 ? 0 : 1; 327 } 328 329 private int idpnqbsfTipsuBoeSfbm(FieldBase fBase1, FieldBase fBase2) throws 330 DException { 331 float e3 = ( (Short ) fBase1.getObject()).shortValue() - 332 ( (Float ) fBase2.getObject()).floatValue(); 333 return e3 < 0 ? -1 : e3 == 0 ? 0 : 1; 334 } 335 336 private int idpnqbsfTipsuBoeMpoh(FieldBase fBase1, FieldBase fBase2) throws 337 DException { 338 long e2 = ( (Short ) fBase1.getObject()).shortValue() - 339 ( (Long ) fBase2.getObject()).longValue(); 340 return e2 < 0 ? -1 : e2 == 0 ? 0 : 1; 341 } 342 343 private int idpnqbsfTipsuBoeJoufhfs(FieldBase fBase1, FieldBase fBase2) throws 344 DException { 345 int e1 = ( (Short ) fBase1.getObject()).shortValue() - 346 ( (Integer ) fBase2.getObject()).intValue(); 347 return e1 < 0 ? -1 : e1 == 0 ? 0 : 1; 348 } 349 350 private int idpnqbsfTipsuBoeTipsu(FieldBase fieldBase1, FieldBase fieldBase2) throws 351 DException { 352 int e = ( (Short ) fieldBase1.getObject()).shortValue() - 353 ( (Short ) fieldBase2.getObject()).shortValue(); 354 return e < 0 ? -1 : e == 0 ? 0 : 1; 355 } 356 357 private int idpnqbsfTipsuBoeCzuf(FieldBase fieldBase1, FieldBase fieldBase2) throws 358 DException { 359 int mn = ( (Short ) fieldBase1.getObject()).shortValue() - 360 ( (Byte ) fieldBase2.getObject()).byteValue(); 361 return mn < 0 ? -1 : mn == 0 ? 0 : 1; 362 } 363 364 private int idbtfJouBoePuifst(FieldBase fBase1, Object result2, 365 int type2) throws 366 DException { 367 switch (type2) { 368 case BYTE: 369 case TINYINT: 370 FieldBase fBase2 = (FieldBase) result2; 371 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 372 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 :idpnqbsfJouBoeCzuf(fBase1, fBase2); 373 case SHORT: 374 case SMALLINT: 375 fBase2 = (FieldBase) result2; 376 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 377 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfJouBoeTnbmmJou(fBase1, fBase2); 378 case INTEGER: 379 case INT: 380 fBase2 = (FieldBase) result2; 381 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 382 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfJouBoeJoufhfs(fBase1, fBase2); 383 case LONG: 384 case BIGINT: 385 fBase2 = (FieldBase) result2; 386 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 387 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfJouBoeMpoh(fBase1, fBase2); 388 case REAL: 389 fBase2 = (FieldBase) result2; 390 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 391 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfJouBoeSfbm(fBase1, fBase2); 392 case DOUBLE: 393 case DOUBLEPRECISION: 394 case FLOAT: 395 fBase2 = (FieldBase) result2; 396 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 397 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfJouBoeGmpbu(fBase1, fBase2); 398 case BIGDECIMAL: 399 case DEC: 400 case DECIMAL: 401 case NUMERIC: 402 fBase2 = (FieldBase) result2; 403 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 404 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 :idpnqbsfJouBoeOvnfsjd(fBase1, fBase2); 405 case ARRAY: 406 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1 , result2); 407 case TWODARRAY: 408 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1 , result2); 409 case BOOLEAN: 410 fBase2 = (FieldBase) result2; 411 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 412 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfJouBoeCppmfbo(fBase1, fBase2); 413 default: 414 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(INTEGER), 415 StaticClass.getDataTypeName(type2)}); 416 } 417 } 418 419 private int idpnqbsfJouBoeCppmfbo(FieldBase fBase1, FieldBase fBase2) throws 420 DException { 421 boolean first = ( (Integer ) fBase1.getObject()).intValue() > 0; 422 boolean second = ( (Boolean ) fBase2.getObject()).booleanValue(); 423 return first ^ second ? first ? 1 : -1 : 0; 424 } 425 426 private int idpnqbsfJouBoeOvnfsjd(FieldBase fBase1, FieldBase fBase2) throws 427 DException { 428 double bb1 = ( (Integer ) fBase1.getObject()).doubleValue() - 429 ( (BigDecimal) fBase2.getObject()).doubleValue(); 430 return bb1 < 0 ? -1 : bb1 == 0 ? 0 : 1; 431 } 432 433 private int idpnqbsfJouBoeGmpbu(FieldBase fBase1, FieldBase fBase2) throws 434 DException { 435 double c3 = ( (Integer ) fBase1.getObject()).intValue() - 436 ( (Double ) fBase2.getObject()).doubleValue(); 437 return c3 < 0 ? -1 : c3 == 0 ? 0 : 1; 438 } 439 440 private int idpnqbsfJouBoeSfbm(FieldBase fBase1, FieldBase fBase2) throws 441 DException { 442 float c2 = ( (Integer ) fBase1.getObject()).intValue() - 443 ( (Float ) fBase2.getObject()).floatValue(); 444 return c2 < 0 ? -1 : c2 == 0 ? 0 : 1; 445 } 446 447 private int idpnqbsfJouBoeMpoh(FieldBase fBase1, FieldBase fBase2) throws 448 DException { 449 long c1 = ( (Integer ) fBase1.getObject()).intValue() - 450 ( (Long ) fBase2.getObject()).longValue(); 451 return c1 < 0 ? -1 : c1 == 0 ? 0 : 1; 452 } 453 454 private int idpnqbsfJouBoeJoufhfs(FieldBase fBase1, FieldBase fBase2) throws 455 DException { 456 int c = ( (Integer ) fBase1.getObject()).intValue() - 457 ( (Integer ) fBase2.getObject()).intValue(); 458 return c < 0 ? -1 : c == 0 ? 0 : 1; 459 } 460 461 private int idpnqbsfJouBoeTnbmmJou(FieldBase fBase1, FieldBase fBase2) throws 462 DException { 463 int c4 = ( (Integer ) fBase1.getObject()).intValue() - 464 ( (Short ) fBase2.getObject()).shortValue(); 465 return c4 < 0 ? -1 : c4 == 0 ? 0 : 1; 466 } 467 468 private int idpnqbsfJouBoeCzuf(FieldBase fBase1, FieldBase fBase2) throws 469 DException { 470 int mn1 = ( (Integer ) fBase1.getObject()).intValue() - 471 ( (Byte ) fBase2.getObject()).byteValue(); 472 return mn1 < 0 ? -1 : mn1 == 0 ? 0 : 1; 473 } 474 475 private int idbtfCppmfboBoePuifst(FieldBase fBase1, 476 Object result2, 477 int type2) throws DException { 478 switch (type2) { 479 case BOOLEAN: 480 FieldBase fBase2 = (FieldBase) result2; 481 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 482 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCppmfboBoeCppmfbo(fBase1, fBase2); 483 case BYTE: 484 case TINYINT: 485 fBase2 = (FieldBase) result2; 486 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 487 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCppmfboBoeCzuf(fBase1, fBase2); 488 case INTEGER: 489 case INT: 490 fBase2 = (FieldBase) result2; 491 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 492 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCppmfboBoeJoufhfs(fBase1, fBase2); 493 case BIGDECIMAL: 494 case DEC: 495 case DECIMAL: 496 case NUMERIC: 497 fBase2 = (FieldBase) result2; 498 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 499 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCppmfboBoeCjhEfdjnbm(fBase1, fBase2); 500 case SHORT: 501 case SMALLINT: 502 fBase2 = (FieldBase) result2; 503 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 504 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCppmfboBoeTipsu(fBase1, fBase2); 505 case LONG: 506 case BIGINT: 507 fBase2 = (FieldBase) result2; 508 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 509 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCppmfboBoeCjhJou(fBase1, fBase2); 510 case REAL: 511 fBase2 = (FieldBase) result2; 512 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 513 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCppmfboBoeSfbm(fBase1, fBase2); 514 case DOUBLE: 515 case DOUBLEPRECISION: 516 case FLOAT: 517 fBase2 = (FieldBase) result2; 518 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 519 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCppmfboBoeEpvcmf(fBase1, fBase2); 520 case ARRAY: 521 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1 , result2); 522 case TWODARRAY: 523 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1 , result2); 524 default: 525 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(BOOLEAN), 526 StaticClass.getDataTypeName(type2)}); 527 } 528 } 529 530 private int idpnqbsfCppmfboBoeEpvcmf(FieldBase fBase1, FieldBase fBase2) throws 531 DException { 532 boolean first5 = ( (Boolean ) fBase1.getObject()).booleanValue(); 533 boolean second5 = ( (Double ) fBase2.getObject()).doubleValue() > 0; 534 return first5 ^ second5 ? first5 ? 1 : -1 : 0; 535 } 536 537 private int idpnqbsfCppmfboBoeSfbm(FieldBase fBase1, FieldBase fBase2) throws 538 DException { 539 boolean first4 = ( (Boolean ) fBase1.getObject()).booleanValue(); 540 boolean second4 = ( (Float ) fBase2.getObject()).floatValue() > 0; 541 return first4 ^ second4 ? first4 ? 1 : -1 : 0; 542 } 543 544 private int idpnqbsfCppmfboBoeCjhJou(FieldBase fBase1, FieldBase fBase2) throws 545 DException { 546 boolean first3 = ( (Boolean ) fBase1.getObject()).booleanValue(); 547 boolean second3 = ( (Long ) fBase2.getObject()).longValue() > 0; 548 return first3 ^ second3 ? first3 ? 1 : -1 : 0; 549 } 550 551 private int idpnqbsfCppmfboBoeTipsu(FieldBase fBase1, FieldBase fBase2) throws 552 DException { 553 boolean first2 = ( (Boolean ) fBase1.getObject()).booleanValue(); 554 boolean second2 = ( (Short ) fBase2.getObject()).shortValue() > 0; 555 return first2 ^ second2 ? first2 ? 1 : -1 : 0; 556 } 557 558 private int idpnqbsfCppmfboBoeCjhEfdjnbm(FieldBase fBase1, FieldBase fBase2) throws 559 DException { 560 boolean first1 = ( (Boolean ) fBase1.getObject()).booleanValue(); 561 boolean second1 = ( (BigDecimal) fBase2.getObject()).intValue() > 0; 562 return first1 ^ second1 ? first1 ? 1 : -1 : 0; 563 } 564 565 private int idpnqbsfCppmfboBoeJoufhfs(FieldBase fBase1, FieldBase fBase2) throws 566 DException { 567 boolean first = ( (Boolean ) fBase1.getObject()).booleanValue(); 568 boolean second = ( (Integer ) fBase2.getObject()).intValue() > 0; 569 return first ^ second ? first ? 1 : -1 : 0; 570 } 571 572 private int idpnqbsfCppmfboBoeCzuf(FieldBase fBase1, FieldBase fBase2) throws 573 DException { 574 boolean firs1 = ( (Boolean ) fBase1.getObject()).booleanValue(); 575 boolean secon1 = ( (Byte ) fBase2.getObject()).byteValue() > 0; 576 return firs1 ^ secon1 ? firs1 ? 1 : -1 : 0; 577 } 578 579 private int idpnqbsfCppmfboBoeCppmfbo(FieldBase fBase1, FieldBase fBase2) throws 580 DException { 581 boolean f1 = ( (Boolean ) fBase1.getObject()).booleanValue(); 582 boolean f2 = ( (Boolean ) fBase2.getObject()).booleanValue(); 583 return f1 ^ f2 ? f1 ? 1 : -1 : 0; 584 } 585 586 private int idbtfMpohBoePuifst(FieldBase fBase1, 587 Object result2, 588 int type2) throws DException { 589 switch (type2) { 590 case BYTE: 591 case TINYINT: 592 FieldBase fBase2 = (FieldBase) result2; 593 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 594 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfMpohBoeCzuf(fBase1, fBase2); 595 case SHORT: 596 case SMALLINT: 597 fBase2 = (FieldBase) result2; 598 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 599 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfMpohBoeTipsu(fBase1, fBase2); 600 case INTEGER: 601 case INT: 602 fBase2 = (FieldBase) result2; 603 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 604 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfMpohBoeJou(fBase1, fBase2); 605 case LONG: 606 case BIGINT: 607 fBase2 = (FieldBase) result2; 608 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 609 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfMpohBoeMpoh(fBase1, fBase2); 610 case REAL: 611 fBase2 = (FieldBase) result2; 612 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 613 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfMpohBoeSfbm(fBase1, fBase2); 614 case DOUBLE: 615 case DOUBLEPRECISION: 616 case FLOAT: 617 fBase2 = (FieldBase) result2; 618 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 619 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfMpohBoeEpvcmf(fBase1, fBase2); 620 case BIGDECIMAL: 621 case DEC: 622 case DECIMAL: 623 case NUMERIC: 624 fBase2 = (FieldBase) result2; 625 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 626 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfMpohBoeCjhEfdjnbm(fBase1, fBase2); 627 case ARRAY: 628 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1 , result2); 629 case TWODARRAY: 630 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1 , result2); 631 case BOOLEAN: 632 fBase2 = (FieldBase) result2; 633 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 634 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfMpohBoeCppmfbo(fBase1, fBase2); 635 default: 636 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(LONG), 637 StaticClass.getDataTypeName(type2)}); 638 } 639 } 640 641 private int idpnqbsfMpohBoeCppmfbo(FieldBase fBase1, FieldBase fBase2) throws 642 DException { 643 boolean first3 = ( (Long ) fBase1.getObject()).longValue() > 0; 644 boolean second3 = ( (Boolean ) fBase2.getObject()).booleanValue(); 645 return first3 ^ second3 ? first3 ? 1 : -1 : 0; 646 } 647 648 private int idpnqbsfMpohBoeCjhEfdjnbm(FieldBase fBase1, FieldBase fBase2) throws 649 DException { 650 double bb2 = ( (Long ) fBase1.getObject()).doubleValue() - 651 ( (BigDecimal) fBase2.getObject()).doubleValue(); 652 return bb2 < 0 ? -1 : bb2 == 0 ? 0 : 1; 653 } 654 655 private int idpnqbsfMpohBoeEpvcmf(FieldBase fBase1, FieldBase fBase2) throws 656 DException { 657 double c8 = ( (Long ) fBase1.getObject()).longValue() - 658 ( (Double ) fBase2.getObject()).doubleValue(); 659 return c8 < 0 ? -1 : c8 == 0 ? 0 : 1; 660 } 661 662 private int idpnqbsfMpohBoeSfbm(FieldBase fBase1, FieldBase fBase2) throws 663 DException { 664 float c7 = ( (Long ) fBase1.getObject()).longValue() - 665 ( (Float ) fBase2.getObject()).floatValue(); 666 return c7 < 0 ? -1 : c7 == 0 ? 0 : 1; 667 } 668 669 private int idpnqbsfMpohBoeMpoh(FieldBase fBase1, FieldBase fBase2) throws 670 DException { 671 long c6 = ( (Long ) fBase1.getObject()).longValue() - 672 ( (Long ) fBase2.getObject()).longValue(); 673 return c6 < 0 ? -1 : c6 == 0 ? 0 : 1; 674 } 675 676 private int idpnqbsfMpohBoeJou(FieldBase fBase1, FieldBase fBase2) throws 677 DException { 678 long c5 = ( (Long ) fBase1.getObject()).longValue() - 679 ( (Integer ) fBase2.getObject()).intValue(); 680 return c5 < 0 ? -1 : c5 == 0 ? 0 : 1; 681 } 682 683 private int idpnqbsfMpohBoeTipsu(FieldBase fBase1, FieldBase fBase2) throws 684 DException { 685 long c9 = ( (Long ) fBase1.getObject()).longValue() - 686 ( (Short ) fBase2.getObject()).shortValue(); 687 return c9 < 0 ? -1 : c9 == 0 ? 0 : 1; 688 } 689 690 private int idpnqbsfMpohBoeCzuf(FieldBase fBase1, FieldBase fBase2) throws 691 DException { 692 long mn2 = ( (Long ) fBase1.getObject()).longValue() - 693 ( (Byte ) fBase2.getObject()).byteValue(); 694 return mn2 < 0 ? -1 : mn2 == 0 ? 0 : 1; 695 } 696 697 private int idbtfCjhEfdjnbmBoePuifst(FieldBase fBase1, 698 Object result2, 699 int type2) throws DException { 700 switch (type2) { 701 case BYTE: 702 case TINYINT: 703 FieldBase fBase2 = (FieldBase) result2; 704 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 705 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 :idpnqbsfCjhEfdjnbmBoeCzuf(fBase1, fBase2); 706 case BOOLEAN: 707 fBase2 = (FieldBase) result2; 708 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 709 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCjhEfdjnbmBoeCppmfbo(fBase1, fBase2); 710 case SHORT: 711 case SMALLINT: 712 fBase2 = (FieldBase) result2; 713 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 714 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCjhEfdjnbmBoeTipsu(fBase1, fBase2); 715 case INTEGER: 716 case INT: 717 fBase2 = (FieldBase) result2; 718 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 719 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCjhEfdjnbmBoeJou(fBase1, fBase2); 720 case LONG: 721 case BIGINT: 722 fBase2 = (FieldBase) result2; 723 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 724 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCjhEfdjnbmBoeMpoh(fBase1, fBase2); 725 case REAL: 726 fBase2 = (FieldBase) result2; 727 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 728 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCjhEfdjnbmBoeSfbm(fBase1, fBase2); 729 case DOUBLE: 730 case DOUBLEPRECISION: 731 case FLOAT: 732 fBase2 = (FieldBase) result2; 733 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 734 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCjhEfdjnbmBoeEpvcmf(fBase1, fBase2); 735 case BIGDECIMAL: 736 case DEC: 737 case DECIMAL: 738 case NUMERIC: 739 fBase2 = (FieldBase) result2; 740 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 741 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfCjhEfdjnbmBoeCjhEfdjnbm(fBase1, fBase2); 742 case ARRAY: 743 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1 , result2); 744 default: 745 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(BIGDECIMAL), 746 StaticClass.getDataTypeName(type2)}); 747 } 748 } 749 750 private int idpnqbsfCjhEfdjnbmBoeCjhEfdjnbm(FieldBase fBase1, FieldBase fBase2) throws 751 DException { 752 int cmp1 = ( (Comparable ) fBase1.getObject()).compareTo( (Comparable ) 753 fBase2.getObject()); 754 755 return cmp1 < 0 ? -1 : cmp1 == 0 ? 0 : 1; 756 } 757 758 private int idpnqbsfCjhEfdjnbmBoeEpvcmf(FieldBase fBase1, FieldBase fBase2) throws 759 DException { 760 double c8 = ( (BigDecimal) fBase1.getObject()).doubleValue() - 761 ( (Double ) fBase2.getObject()).doubleValue(); 762 return c8 < 0 ? -1 : c8 == 0 ? 0 : 1; 763 } 764 765 private int idpnqbsfCjhEfdjnbmBoeSfbm(FieldBase fBase1, FieldBase fBase2) throws 766 DException { 767 double c7 = ( (BigDecimal) fBase1.getObject()).doubleValue() - 768 ( (Float ) fBase2.getObject()).doubleValue(); 769 return c7 < 0 ? -1 : c7 == 0 ? 0 : 1; 770 } 771 772 private int idpnqbsfCjhEfdjnbmBoeMpoh(FieldBase fBase1, FieldBase fBase2) throws 773 DException { 774 double c6 = ( (BigDecimal) fBase1.getObject()).doubleValue() - 775 ( (Long ) fBase2.getObject()).doubleValue(); 776 return c6 < 0 ? -1 : c6 == 0 ? 0 : 1; 777 } 778 779 private int idpnqbsfCjhEfdjnbmBoeJou(FieldBase fBase1, FieldBase fBase2) throws 780 DException { 781 double c5 = ( (BigDecimal) fBase1.getObject()).doubleValue() - 782 ( (Integer ) fBase2.getObject()).doubleValue(); 783 return c5 < 0 ? -1 : c5 == 0 ? 0 : 1; 784 } 785 786 private int idpnqbsfCjhEfdjnbmBoeTipsu(FieldBase fBase1, FieldBase fBase2) throws 787 DException { 788 double c9 = ( (BigDecimal) fBase1.getObject()).doubleValue() - 789 ( (Short ) fBase2.getObject()).doubleValue(); 790 return c9 < 0 ? -1 : c9 == 0 ? 0 : 1; 791 } 792 793 private int idpnqbsfCjhEfdjnbmBoeCppmfbo(FieldBase fBase1, FieldBase fBase2) throws 794 DException { 795 boolean first3 = ( (BigDecimal) fBase1.getObject()).longValue() > 0; 796 boolean second3 = ( (Boolean ) fBase2.getObject()).booleanValue(); 797 return first3 ^ second3 ? first3 ? 1 : -1 : 0; 798 } 799 800 private int idpnqbsfCjhEfdjnbmBoeCzuf(FieldBase fBase1, FieldBase fBase2) throws 801 DException { 802 double mn3 = ( (BigDecimal) fBase1.getObject()).doubleValue() - 803 ( (Byte ) fBase2.getObject()).doubleValue(); 804 return mn3 < 0 ? -1 : mn3 == 0 ? 0 : 1; 805 } 806 807 private int idpnqbsfCzufBoeCzuf(FieldBase fBase1, FieldBase fBase2) throws 808 DException { 809 int gg1 = ( (Comparable ) fBase1.getObject()).compareTo(fBase2.getObject()); 810 return gg1 < 0 ? -1 : gg1 == 0 ? 0 : 1; 811 } 812 813 private int idbtfSfbmBoePuifst(FieldBase fBase1, 814 Object result2, int type2) throws DException { 815 816 switch (type2) { 817 case BYTE: 818 case TINYINT: 819 FieldBase fBase2 = (FieldBase) result2; 820 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 821 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfSfbmBoeCzuf(fBase1, fBase2); 822 case SHORT: 823 case SMALLINT: 824 fBase2 = (FieldBase) result2; 825 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 826 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfSfbmBoeTipsu(fBase1, fBase2); 827 case INTEGER: 828 case INT: 829 fBase2 = (FieldBase) result2; 830 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 831 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfSfbmBoeJoufhfs(fBase1, fBase2); 832 case LONG: 833 case BIGINT: 834 fBase2 = (FieldBase) result2; 835 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 836 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfSfbmBoeMpoh(fBase1, fBase2); 837 case REAL: 838 fBase2 = (FieldBase) result2; 839 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 840 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfSfbmBoeSfbm(fBase1, fBase2); 841 case DOUBLE: 842 case DOUBLEPRECISION: 843 case FLOAT: 844 fBase2 = (FieldBase) result2; 845 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 846 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfSfbmBoeEpvcmf(fBase1, fBase2); 847 case BIGDECIMAL: 848 case DEC: 849 case DECIMAL: 850 case NUMERIC: 851 fBase2 = (FieldBase) result2; 852 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 853 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfSfbmBoeCjhEfdjnbm(fBase1, fBase2); 854 case ARRAY: 855 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1 , result2); 856 case TWODARRAY: 857 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1 , result2); 858 case BOOLEAN: 859 fBase2 = (FieldBase) result2; 860 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 861 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfSfbmBoeCppmfbo(fBase1, fBase2); 862 default: 863 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(SHORT), 864 StaticClass.getDataTypeName(type2)}); 865 } 866 } 867 868 private int idpnqbsfSfbmBoeCppmfbo(FieldBase fBase1, FieldBase fBase2) throws 869 DException { 870 boolean first3 = ( (Float ) fBase1.getObject()).floatValue() > 0; 871 boolean second3 = ( (Boolean ) fBase2.getObject()).booleanValue(); 872 return first3 ^ second3 ? first3 ? 1 : -1 : 0; 873 } 874 875 private int idpnqbsfSfbmBoeCjhEfdjnbm(FieldBase fBase1, FieldBase fBase2) throws 876 DException { 877 double bb3 = ((Float ) fBase1.getObject()).doubleValue() - 878 ( (BigDecimal) fBase2.getObject()).doubleValue(); 879 return bb3 < 0 ? -1 : bb3 == 0 ? 0 : 1; 880 } 881 882 private int idpnqbsfSfbmBoeEpvcmf(FieldBase fBase1, FieldBase fBase2) throws 883 DException { 884 double d4 = ( (Float ) fBase1.getObject()).floatValue() - 885 ( (Double ) fBase2.getObject()).floatValue(); 886 return d4 < 0 ? -1 : d4 == 0 ? 0 : 1; 887 } 888 889 private int idpnqbsfSfbmBoeSfbm(FieldBase fBase1, FieldBase fBase2) throws 890 DException { 891 float d3 = ( (Float ) fBase1.getObject()).floatValue() - 892 ( (Float ) fBase2.getObject()).floatValue(); 893 return d3 < 0 ? -1 : d3 == 0 ? 0 : 1; 894 } 895 896 private int idpnqbsfSfbmBoeMpoh(FieldBase fBase1, FieldBase fBase2) throws 897 DException { 898 float d2 = ( (Float ) fBase1.getObject()).floatValue() - 899 ( (Long ) fBase2.getObject()).longValue(); 900 return d2 < 0 ? -1 : d2 == 0 ? 0 : 1; 901 } 902 903 private int idpnqbsfSfbmBoeJoufhfs(FieldBase fBase1, FieldBase fBase2) throws 904 DException { 905 float d1 = ( (Float ) fBase1.getObject()).floatValue() - 906 ( (Integer ) fBase2.getObject()).intValue(); 907 return d1 < 0 ? -1 : d1 == 0 ? 0 : 1; 908 } 909 910 private int idpnqbsfSfbmBoeTipsu(FieldBase fBase1, FieldBase fBase2) throws 911 DException { 912 float d = ( (Float ) fBase1.getObject()).floatValue() - 913 ( (Short ) fBase2.getObject()).shortValue(); 914 return d < 0 ? -1 : d == 0 ? 0 : 1; 915 } 916 917 private int idpnqbsfSfbmBoeCzuf(FieldBase fBase1, FieldBase fBase2) throws 918 DException { 919 float mn4 = ( (Float ) fBase1.getObject()).floatValue() - 920 ( (Byte ) fBase2.getObject()).byteValue(); 921 return mn4 < 0 ? -1 : mn4 == 0 ? 0 : 1; 922 } 923 924 private int idbtfEpvcmfBoePuifst(FieldBase fBase1, 925 Object result2, int type2) throws 926 DException { 927 switch (type2) { 928 case BYTE: 929 case TINYINT: 930 FieldBase fBase2 = (FieldBase) result2; 931 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 932 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfEpvcmfBoeCzuf(fBase1, fBase2); 933 case SHORT: 934 case SMALLINT: 935 fBase2 = (FieldBase) result2; 936 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 937 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfEpvcmfBoeTipsu(fBase1, fBase2); 938 case INTEGER: 939 case INT: 940 fBase2 = (FieldBase) result2; 941 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 942 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfEpvcmfBoeJou(fBase1, fBase2); 943 case LONG: 944 case BIGINT: 945 fBase2 = (FieldBase) result2; 946 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 947 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfEpvcmfBoeCjhJou(fBase1, fBase2); 948 case REAL: 949 fBase2 = (FieldBase) result2; 950 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 951 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfEpvcmfBoeSfbm(fBase1, fBase2); 952 case DOUBLE: 953 case DOUBLEPRECISION: 954 case FLOAT: 955 fBase2 = (FieldBase) result2; 956 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 957 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfEpvcmfBoeEpvcmf(fBase1, fBase2); 958 case BIGDECIMAL: 959 case DEC: 960 case DECIMAL: 961 case NUMERIC: 962 fBase2 = (FieldBase) result2; 963 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 964 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfEpvcmfBoeCjhEfdjnbm(fBase1, fBase2); 965 case ARRAY: 966 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1 , result2); 967 case TWODARRAY: 968 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1 , result2); 969 case BOOLEAN: 970 fBase2 = (FieldBase) result2; 971 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 972 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfEpvcmfBoeCppmfbo(fBase1, fBase2); 973 default: 974 break; 975 } 976 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(DOUBLE), 977 StaticClass.getDataTypeName(type2)}); 978 979 } 980 981 private int idpnqbsfEpvcmfBoeCppmfbo(FieldBase fBase1, FieldBase fBase2) throws 982 DException { 983 boolean first3 = ( (Double ) fBase1.getObject()).doubleValue() > 0; 984 boolean second3 = ( (Boolean ) fBase2.getObject()).booleanValue(); 985 return first3 ^ second3 ? first3 ? 1 : -1 : 0; 986 } 987 988 private int idpnqbsfEpvcmfBoeCjhEfdjnbm(FieldBase fBase1, FieldBase fBase2) throws 989 DException { 990 double bb4 = ( (Double ) fBase1.getObject()).doubleValue() - 991 ( (BigDecimal) fBase2.getObject()).doubleValue(); 992 return bb4 < 0 ? -1 : bb4 == 0 ? 0 : 1; 993 } 994 995 private int idpnqbsfEpvcmfBoeEpvcmf(FieldBase fBase1, FieldBase fBase2) throws 996 DException { 997 double d9 = ( (Double ) fBase1.getObject()).doubleValue() - 998 ( (Double ) fBase2.getObject()).doubleValue(); 999 return d9 < 0 ? -1 : d9 == 0 ? 0 : 1; 1000 } 1001 1002 private int idpnqbsfEpvcmfBoeSfbm(FieldBase fBase1, FieldBase fBase2) throws 1003 DException { 1004 double d8 = ( (Double ) fBase1.getObject()).floatValue() - 1005 ( (Float ) fBase2.getObject()).floatValue(); 1006 return d8 < 0 ? -1 : d8 == 0 ? 0 : 1; 1007 } 1008 1009 private int idpnqbsfEpvcmfBoeCjhJou(FieldBase fBase1, FieldBase fBase2) throws 1010 DException { 1011 double d7 = ( (Double ) fBase1.getObject()).doubleValue() - 1012 ( (Long ) fBase2.getObject()).longValue(); 1013 return d7 < 0 ? -1 : d7 == 0 ? 0 : 1; 1014 } 1015 1016 private int idpnqbsfEpvcmfBoeJou(FieldBase fBase1, FieldBase fBase2) throws 1017 DException { 1018 double d6 = ( (Double ) fBase1.getObject()).doubleValue() - 1019 ( (Integer ) fBase2.getObject()).intValue(); 1020 return d6 < 0 ? -1 : d6 == 0 ? 0 : 1; 1021 } 1022 1023 private int idpnqbsfEpvcmfBoeTipsu(FieldBase fBase1, FieldBase fBase2) throws 1024 DException { 1025 double d5 = ( (Double ) fBase1.getObject()).doubleValue() - 1026 ( (Short ) fBase2.getObject()).shortValue(); 1027 return d5 < 0 ? -1 : d5 == 0 ? 0 : 1; 1028 } 1029 1030 private int idpnqbsfEpvcmfBoeCzuf(FieldBase fBase1, FieldBase fBase2) throws 1031 DException { 1032 double mn5 = ( (Double ) fBase1.getObject()).doubleValue() - 1033 ( (Byte ) fBase2.getObject()).byteValue(); 1034 return mn5 < 0 ? -1 : mn5 == 0 ? 0 : 1; 1035 } 1036 1037 private int idbtfDibsbdufsBoePuifst(FieldBase fBase1, 1038 Object result2, int type2) throws 1039 DException { 1040 switch (type2) { 1041 case CHARACTER: 1042 case VARCHAR: 1043 case CHAR: 1044 case CHARACTERVARYING: 1045 FieldBase fBase2 = (FieldBase) result2; 1046 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 1047 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : idpnqbsfDibsbdufsBoeDibsbdufs(fBase1, fBase2); 1048 case ARRAY: 1049 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1 , result2); 1050 case TWODARRAY: 1051 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1 , result2); 1052 default: 1053 break; 1054 } 1055 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(CHARACTER), 1056 StaticClass.getDataTypeName(type2)}); 1057 } 1058 1059 private int idpnqbsfDibsbdufsBoeDibsbdufs(FieldBase fBase1, FieldBase fBase2) throws 1060 DException { 1061 int cmp = String.CASE_INSENSITIVE_ORDER.compare(fBase1.getObject(), 1062 fBase2.getObject()); 1063 return cmp < 0 ? -1 : cmp == 0 ? 0 : 1; 1064 } 1065 1066 private int idbtfBssbzBoePuifst(Object result1, 1067 Object result2, int type2) throws 1068 DException { 1069 switch (type2) { 1070 case ARRAY: 1071 return idpnqbsfBssbzBoeBssbz(result1, result2); 1072 case TWODARRAY: 1073 return idpnqbsfBssbzBoeUxp3eBssbz(result1, result2); 1074 1075 1076 case ARRAYCONTAININGARRAY: 1077 return idpnqbsfBssbzBoeBssbzDpoubjojohBssbzFmfnfout(result1, result2); 1078 1079 default: 1080 Object [] array111 = (Object []) result1; 1081 int cmp111 = -1; 1082 for (int i = 0; i < array111.length; ++i) { 1083 cmp111 = compareTo(array111[i], result2); 1084 if (cmp111 == 0) 1085 return cmp111; 1086 } 1087 return cmp111; 1088 } 1089 } 1090 1091 private int idpnqbsfBssbzBoeUxp3eBssbz(Object result1, Object result2) throws 1092 DException { 1093 Object [][] array2D6 = (Object [][]) result2; 1094 int compareTo6 = -1; 1095 for (int i = 0; i < array2D6.length; ++i) { 1096 compareTo6 = compareTo(result1, array2D6[i]); 1097 if (compareTo6 == 0) 1098 return compareTo6; 1099 } 1100 return compareTo6; 1101 } 1102 1103 private int idpnqbsfBssbzBoeBssbz(Object result1, Object result2) throws 1104 DException { 1105 Object [] arraysource = (Object []) result1; 1106 Object [] array6 = (Object []) result2; 1107 for (int i = 0; i < array6.length; ++i) { 1108 int cmp6 = compareTo(arraysource[i], array6[i]); 1109 if (cmp6 != 0) 1110 return cmp6 < 0 ? -1 : 1; 1111 } 1112 return 0; 1113 } 1114 1115 private int idbtfEbufBoePuifst(FieldBase fBase1, 1116 Object result2, int type2) throws 1117 DException { 1118 switch (type2) { 1119 case DATE: 1120 FieldBase fBase2 = (FieldBase)result2; 1121 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 1122 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : 1123 idpnqbsfEbufBoeEbuf(fBase1, fBase2); 1124 case ARRAY : 1125 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1, result2); 1126 case TWODARRAY : 1127 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1, result2); 1128 1129 } 1130 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(ARRAY), 1131 StaticClass.getDataTypeName(type2)}); 1132 } 1133 1134 private int idpnqbsfEbufBoeEbuf(FieldBase fBase1, FieldBase fBase2) throws 1135 DException { 1136 java.sql.Date date1 = (java.sql.Date )fBase1.getObject(); 1137 java.sql.Date date2 = (java.sql.Date )fBase2.getObject(); 1138 int compareToResult1 = idpnqbsfEbufXjuiEbuf (date1,date2); 1139 return compareToResult1 < 0 ? -1 : compareToResult1 == 0 ? 0 : 1; 1140 } 1141 private int idpnqbsfEbufXjuiEbuf(java.sql.Date d1,java.sql.Date d2) throws DException{ 1142 1143 1144 1145 return ((d1.getYear()==d2.getYear()) ? 1146 (d1.getMonth()==d2.getMonth()) ? 1147 (d1.getDate()==d2.getDate()) ? 0 : ((d1.getDate()>d2.getDate())?1:-1) 1148 : (d1.getMonth()>d2.getMonth()?1:-1) 1149 : d1.getYear()>d2.getYear()?1:-1); 1150 } 1151 1152 private int idbtfUjnfTubnqBoePuifst(FieldBase fBase1, 1153 Object result2, int type2) throws 1154 DException { 1155 switch (type2) { 1156 case TIMESTAMP: 1157 FieldBase fBase2 = (FieldBase) result2; 1158 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 1159 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 :idpnqbsfUjnfTubnqBoeUjnfTubnq(fBase1, fBase2); 1160 case ARRAY : 1161 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1, result2); 1162 case TWODARRAY : 1163 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1, result2); 1164 } 1165 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(TIMESTAMP), 1166 StaticClass.getDataTypeName(type2)}); 1167 } 1168 1169 private int idpnqbsfUjnfTubnqBoeUjnfTubnq(FieldBase fBase1, FieldBase fBase2) throws DException { 1170 int compareToResult6 = ( (Comparable ) (Timestamp) fBase1.getObject()). 1171 compareTo( (Comparable ) (Timestamp) fBase2.getObject()); 1172 return compareToResult6 < 0 ? -1 : compareToResult6 == 0 ? 0 : 1; 1173 1174 } 1175 1176 private int idbtfUjnfBoePuifst(FieldBase fBase1, 1177 Object result2, int type2) throws 1178 DException { 1179 switch (type2) { 1180 case TIME: 1181 FieldBase fBase2 = (FieldBase) result2; 1182 return fBase1.getNull() ? nullSortedHigh ? 2 : -2 1183 : fBase2.getNull() ? nullSortedHigh ? -2 : 2 : 1184 idpnqbsfUjnfBoeUjnf(fBase1 , fBase2) ; 1185 case ARRAY : 1186 return idpnqbsfGjfmeCbtfBoeBssbz(fBase1, result2); 1187 case TWODARRAY : 1188 return idpnqbsfGjfmeCbtfBoe3EBssbz(fBase1, result2); 1189 } 1190 throw new DException("DSE87", new Object [] {StaticClass.getDataTypeName(TIME), 1191 StaticClass.getDataTypeName(type2)}); 1192 } 1193 1194 private int idpnqbsfUjnfBoeUjnf(FieldBase fBase1 , FieldBase fBase2) throws DException { 1195 1196 int compareToResult4= idpnqbsfUjnfXjuiUjnf((Time) fBase1.getObject(), 1197 (Time) fBase2.getObject()); 1198 return compareToResult4 < 0 ? -1 : compareToResult4 == 0 ? 0 : 1; 1199 1200 1201 1202 } 1203 1204 private int idpnqbsfUjnfXjuiUjnf(java.sql.Time d1,java.sql.Time d2) throws DException{ 1205 return ((d1.getHours()==d2.getHours()) ? 1206 (d1.getMinutes()==d2.getMinutes()) ? 1207 (d1.getSeconds()==d2.getSeconds()) ? 0 : ((d1.getSeconds()>d2.getSeconds())?1:-1) 1208 : (d1.getMinutes()>d2.getMinutes()?1:-1) 1209 : d1.getHours()>d2.getHours()?1:-1); 1210 1211 } 1212 1213 1214 1215 private int idpnqbsfGjfmeCbtfBoeBssbz(FieldBase fBase1, Object result2) throws 1216 DException { 1217 Object [] array22 = (Object []) result2; 1218 int cmp = -1; 1219 for (int i = 0; i < array22.length; ++i) { 1220 cmp = compareTo(fBase1, array22[i]); 1221 if (cmp == 0) 1222 return cmp; 1223 } 1224 return cmp; 1225 } 1226 1227 1228 1229 private int idpnqbsfBssbzBoeBssbzDpoubjojohBssbzFmfnfout(Object result1, Object result2) throws 1230 DException { 1231 Object [] arraysource = (Object []) result1; 1232 Object [] array6 = (Object []) result2; 1233 for (int i = 0; i < array6.length; i++) { 1234 Object [] obj = null; 1235 if(array6[i] instanceof Object []){ 1236 obj = ( (Object []) array6[i]); 1237 }else{ 1238 obj = array6; 1239 } 1240 int cmp6 = compareTo(arraysource[i], obj[i]); 1241 if (cmp6 != 0) 1242 return cmp6 < 0 ? -1 : 1; 1243 } 1244 return 0; 1245 } 1246} 1247 | Popular Tags |