com.sap.ip.me.api.persist.meta
Class AttributeType

java.lang.Object
  extended bycom.sap.ip.me.api.persist.meta.AttributeType
All Implemented Interfaces:
MeComparator

public abstract class AttributeType
extends java.lang.Object
implements MeComparator

Title: Description: Copyright: Copyright (c) 2002 Company:

Version:
1.0
Author:

Field Summary
static AttributeType BIGDECIMAL
          BIGDECIMAL AttributeType
static AttributeType BIGINTEGER
          BIGINTEGER AttributeType
static AttributeType BINARY
          Describes binary large objects (BLOB's) Size Limit depends on the storage solution.
static AttributeType BOOLEAN
          Description of the Field
static AttributeType BYTE
          Description of the Field
static java.lang.String CODE_PAGE
           
static AttributeType DATE
          Description of the Field
static AttributeType DECIMAL
          Description of the Field
static AttributeType DOUBLE
          Description of the Field
static AttributeType FLOAT
          Description of the Field
static AttributeType INTEGER
          Description of the Field
 java.lang.Class javaType
          Description of the Field
 int jdbcType
          Description of the Field
static AttributeType LONG
          Description of the Field
static java.lang.String NULL_STR
           
static AttributeType SHORT
          Description of the Field
static AttributeType SQLDATE
          SQLDATE AttributeType
static AttributeType SQLTIME
          SQLTIME AttributeType
 java.lang.String sqlType
          Description of the Field
static AttributeType STRING
          Description of the Field
 
Method Summary
 java.lang.Object cloneMutable(java.lang.Object o)
          provide clone instance, if o is mutable class
abstract  int compare(byte[] b1, byte[] b2)
           
protected  int compare(java.util.Date d1, java.util.Date d2)
           
protected  int compare(long i1, long i2)
           
abstract  int compare(java.lang.Object o1, java.lang.Object o2)
          Description of the Method
abstract  boolean contains(byte[] b, java.lang.Object o)
           
 boolean equals(byte[] b, java.lang.Object o)
           
 boolean equals(java.lang.Object o)
          Description of the Method
abstract  java.lang.Object getDefaultValue(int len, int dec)
           
 boolean greaterThan(byte[] b, java.lang.Object o)
           
abstract  boolean isValidType(java.lang.Object obj)
          check if the given objects has the rigth type
 boolean lowerThan(byte[] b, java.lang.Object o)
           
 boolean notEqual(byte[] b, java.lang.Object o)
           
abstract  boolean startWith(byte[] b, java.lang.Object o)
           
abstract  int toByte(byte[] arr, int off, java.lang.Object obj, int len, int dec)
          This method converts the object to byte array representation.
abstract  int toByteLen(int len, int dec)
           
 java.lang.String toString()
          Description of the Method
abstract  java.lang.Object toValue(byte[] arr, int off)
          This method convert the byte array representation to a value object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CODE_PAGE

public static final java.lang.String CODE_PAGE
See Also:
Constant Field Values

NULL_STR

public static final java.lang.String NULL_STR
See Also:
Constant Field Values

STRING

public static final AttributeType STRING
Description of the Field


INTEGER

public static final AttributeType INTEGER
Description of the Field


SHORT

public static final AttributeType SHORT
Description of the Field


LONG

public static final AttributeType LONG
Description of the Field


FLOAT

public static final AttributeType FLOAT
Description of the Field


DOUBLE

public static final AttributeType DOUBLE
Description of the Field


BOOLEAN

public static final AttributeType BOOLEAN
Description of the Field


BYTE

public static final AttributeType BYTE
Description of the Field


BINARY

public static final AttributeType BINARY
Describes binary large objects (BLOB's) Size Limit depends on the storage solution. (For DB2e it is currently 32 kb)


DATE

public static final AttributeType DATE
Description of the Field


DECIMAL

public static final AttributeType DECIMAL
Description of the Field


SQLDATE

public static final AttributeType SQLDATE
SQLDATE AttributeType


SQLTIME

public static final AttributeType SQLTIME
SQLTIME AttributeType


BIGDECIMAL

public static final AttributeType BIGDECIMAL
BIGDECIMAL AttributeType


BIGINTEGER

public static final AttributeType BIGINTEGER
BIGINTEGER AttributeType


javaType

public final java.lang.Class javaType
Description of the Field


jdbcType

public final int jdbcType
Description of the Field


sqlType

public final java.lang.String sqlType
Description of the Field

Method Detail

equals

public final boolean equals(java.lang.Object o)
Description of the Method

Specified by:
equals in interface MeComparator
Parameters:
o - Description of the Parameter
Returns:
Description of the Return Value

toString

public java.lang.String toString()
Description of the Method

Returns:
Description of the Return Value

isValidType

public abstract boolean isValidType(java.lang.Object obj)
check if the given objects has the rigth type

Parameters:
obj - the value object
Returns:
true if type matches false otherwise

compare

public abstract int compare(java.lang.Object o1,
                            java.lang.Object o2)
Description of the Method

Specified by:
compare in interface MeComparator
Parameters:
o1 - Description of the Parameter
o2 - Description of the Parameter
Returns:
Description of the Return Value

compare

public abstract int compare(byte[] b1,
                            byte[] b2)
Parameters:
b1 -
b2 -
Returns:

toByte

public abstract int toByte(byte[] arr,
                           int off,
                           java.lang.Object obj,
                           int len,
                           int dec)
This method converts the object to byte array representation. The caller has to ensure the length of the buffer and the offset.

Parameters:
arr - the destination byte array
off - the offset in byte array
obj - the value object (see types above)
len - Description of the Parameter
Returns:
the number of bytes written
Throws:
java.lang.IllegalArgumentException - if Object type is unsufficent

toValue

public abstract java.lang.Object toValue(byte[] arr,
                                         int off)
This method convert the byte array representation to a value object. The caller has to ensure the sizes and proper offsets

Parameters:
arr - Description of the Parameter
off - Description of the Parameter
Returns:
Description of the Return Value

toByteLen

public abstract int toByteLen(int len,
                              int dec)
Parameters:
len - the len of value object
Returns:
the maxium count of bytes nedded in array

contains

public abstract boolean contains(byte[] b,
                                 java.lang.Object o)
Returns:

startWith

public abstract boolean startWith(byte[] b,
                                  java.lang.Object o)
Returns:

getDefaultValue

public abstract java.lang.Object getDefaultValue(int len,
                                                 int dec)

cloneMutable

public java.lang.Object cloneMutable(java.lang.Object o)
provide clone instance, if o is mutable class

Parameters:
o -
Returns:

equals

public boolean equals(byte[] b,
                      java.lang.Object o)

notEqual

public boolean notEqual(byte[] b,
                        java.lang.Object o)

greaterThan

public boolean greaterThan(byte[] b,
                           java.lang.Object o)

lowerThan

public boolean lowerThan(byte[] b,
                         java.lang.Object o)

compare

protected final int compare(long i1,
                            long i2)

compare

protected final int compare(java.util.Date d1,
                            java.util.Date d2)


Copyright © 2003 SAP AG. All Rights Reserved.