1 21 22 package org.apache.derby.iapi.types; 23 24 import org.apache.derby.iapi.services.io.ArrayInputStream; 25 26 import org.apache.derby.iapi.error.StandardException; 27 import org.apache.derby.iapi.types.Orderable; 28 import org.apache.derby.iapi.services.io.Storable; 29 30 import java.io.InputStream ; 31 import java.io.IOException ; 32 import java.sql.Date ; 33 import java.sql.ResultSet ; 34 import java.sql.PreparedStatement ; 35 import java.sql.Time ; 36 import java.sql.Timestamp ; 37 import java.sql.SQLException ; 38 import java.util.Calendar ; 39 40 98 99 public interface DataValueDescriptor extends Storable, Orderable 100 { 101 102 115 int getLength() throws StandardException; 116 117 125 String getString() throws StandardException; 126 127 134 String getTraceString() throws StandardException; 135 136 147 boolean getBoolean() throws StandardException; 148 149 157 byte getByte() throws StandardException; 158 159 167 short getShort() throws StandardException; 168 169 177 int getInt() throws StandardException; 178 179 187 long getLong() throws StandardException; 188 189 197 float getFloat() throws StandardException; 198 199 207 double getDouble() throws StandardException; 208 209 217 int typeToBigDecimal() throws StandardException; 218 219 227 byte[] getBytes() throws StandardException; 228 229 237 Date getDate(java.util.Calendar cal) throws StandardException; 238 239 248 Time getTime(java.util.Calendar cal) throws StandardException; 249 250 258 Timestamp getTimestamp(java.util.Calendar cal) throws StandardException; 259 260 272 Object getObject() throws StandardException; 273 274 283 InputStream getStream() throws StandardException; 284 285 291 public DataValueDescriptor getClone(); 292 293 297 public DataValueDescriptor getNewNull(); 298 299 311 public void setValueFromResultSet( 312 ResultSet resultSet, 313 int colNumber, 314 boolean isNullable) 315 throws StandardException, SQLException ; 316 317 318 325 public void setInto(PreparedStatement ps, int position) throws SQLException , StandardException; 326 327 334 public void setInto(ResultSet rs, int position) throws SQLException , StandardException; 335 336 343 public void setValue(int theValue) throws StandardException; 344 345 346 353 public void setValue(double theValue) throws StandardException; 354 355 364 365 public void setValue(float theValue) throws StandardException; 366 367 374 public void setValue(short theValue) throws StandardException; 375 376 383 public void setValue(long theValue) throws StandardException; 384 385 391 public void setValue(byte theValue) throws StandardException; 392 393 394 400 public void setValue(boolean theValue) throws StandardException; 401 402 408 public void setValue(byte[] theValue) throws StandardException; 409 410 421 public void setBigDecimal(Number bigDecimal) throws StandardException; 422 423 429 public void setValue(String theValue) throws StandardException; 430 431 437 public void setValue(Time theValue) throws StandardException; 438 439 446 public void setValue(Time theValue, Calendar cal) throws StandardException; 447 448 454 public void setValue(Timestamp theValue) throws StandardException; 455 456 463 public void setValue(Timestamp theValue, Calendar cal) throws StandardException; 464 465 471 public void setValue(Date theValue) throws StandardException; 472 473 480 public void setValue(Date theValue, Calendar cal) throws StandardException; 481 482 488 public void setValue(DataValueDescriptor theValue) throws StandardException; 489 490 491 494 495 void setToNull(); 496 497 502 public void normalize(DataTypeDescriptor dtd, DataValueDescriptor source) 503 throws StandardException; 504 505 512 public BooleanDataValue isNullOp(); 513 514 522 public BooleanDataValue isNotNull(); 523 524 529 public String getTypeName(); 530 531 545 public void setObjectForCast( 546 Object value, 547 boolean instanceOfResultType, 548 String resultTypeClassName) 549 throws StandardException; 550 551 568 public void readExternalFromArray( 569 ArrayInputStream ais) 570 throws IOException , ClassNotFoundException ; 571 572 588 int typePrecedence(); 589 590 601 public BooleanDataValue equals(DataValueDescriptor left, 602 DataValueDescriptor right) 603 throws StandardException; 604 605 616 public BooleanDataValue notEquals(DataValueDescriptor left, 617 DataValueDescriptor right) 618 throws StandardException; 619 620 631 public BooleanDataValue lessThan(DataValueDescriptor left, 632 DataValueDescriptor right) 633 throws StandardException; 634 635 646 public BooleanDataValue greaterThan(DataValueDescriptor left, 647 DataValueDescriptor right) 648 throws StandardException; 649 650 661 public BooleanDataValue lessOrEquals(DataValueDescriptor left, 662 DataValueDescriptor right) 663 throws StandardException; 664 665 676 public BooleanDataValue greaterOrEquals(DataValueDescriptor left, 677 DataValueDescriptor right) 678 throws StandardException; 679 680 681 693 public DataValueDescriptor coalesce(DataValueDescriptor[] list, DataValueDescriptor returnValue) 694 throws StandardException; 695 696 710 public BooleanDataValue in(DataValueDescriptor left, 711 DataValueDescriptor[] inList, 712 boolean orderedList) 713 throws StandardException; 714 715 731 int compare(DataValueDescriptor other) throws StandardException; 732 733 759 boolean compare( 760 int op, 761 DataValueDescriptor other, 762 boolean orderedNulls, 763 boolean unknownRV) 764 throws StandardException; 765 766 774 public void setValue(InputStream theStream, int valueLength) throws StandardException; 775 776 782 public void checkHostVariable(int declaredLength) throws StandardException; 783 784 789 int estimateMemoryUsage(); 790 } 791 | Popular Tags |