com.latencybusters.lbm.sdm
Class LBMSDMFieldUint64

java.lang.Object
  extended by com.latencybusters.lbm.sdm.LBMSDM
      extended by com.latencybusters.lbm.sdm.LBMSDMField
          extended by com.latencybusters.lbm.sdm.LBMSDMFieldUint64
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
LBMSDMArrayUint64

public class LBMSDMFieldUint64
extends LBMSDMField
implements java.lang.Cloneable

Implements an unsigned 64 bit integer SDM Field


Field Summary
protected  LBMSDMRawUint64 internalValue
          The internal data storage for this field
 
Fields inherited from class com.latencybusters.lbm.sdm.LBMSDMField
elements, MAX_FIELD_NAME_LENGTH, name, type, TYPE_ARRAY_BLOB, TYPE_ARRAY_BOOLEAN, TYPE_ARRAY_DECIMAL, TYPE_ARRAY_DOUBLE, TYPE_ARRAY_FLOAT, TYPE_ARRAY_INT16, TYPE_ARRAY_INT32, TYPE_ARRAY_INT64, TYPE_ARRAY_INT8, TYPE_ARRAY_MESSAGE, TYPE_ARRAY_STRING, TYPE_ARRAY_TIMESTAMP, TYPE_ARRAY_UINT16, TYPE_ARRAY_UINT32, TYPE_ARRAY_UINT64, TYPE_ARRAY_UINT8, TYPE_ARRAY_UNICODE, TYPE_BLOB, TYPE_BOOLEAN, TYPE_DECIMAL, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT16, TYPE_INT32, TYPE_INT64, TYPE_INT8, TYPE_INVALID, TYPE_MESSAGE, TYPE_STRING, TYPE_TIMESTAMP, TYPE_UINT16, TYPE_UINT32, TYPE_UINT64, TYPE_UINT8, TYPE_UNICODE
 
Fields inherited from class com.latencybusters.lbm.sdm.LBMSDM
DEBUG_BASIC, debug_level, DEBUG_VERBOSE_PARSING
 
Constructor Summary
protected LBMSDMFieldUint64(short type, java.lang.String name)
          Constructor for array subclasses
  LBMSDMFieldUint64(java.lang.String name)
          Constructor for an empty unsigned 64 bit integer field.
  LBMSDMFieldUint64(java.lang.String name, java.math.BigInteger v)
          Constructor for a unsigned 64 bit integer field with a known BigInteger
  LBMSDMFieldUint64(java.lang.String name, LBMSDMRawUint64 v)
          Constructor for a unsigned 64 bit integer field with a known LBMSDMRawUint64
 
Method Summary
 LBMSDMFieldUint64 clone()
          Get a copy of this object
static int fixed_size()
          Get the length of base field
 int format(byte[] buf, int offset)
          Format the unsigned 64 bit integer value into a byte buffer
protected static int format(byte[] buf, int offset, LBMSDMRawUint64 v)
          Format an unsigned 64 bit integer value into a byte buffer
 int get_base_len()
          Get the length of formatted field This is used by the respective array class
 int get_len()
          Get the length of formatted field
 LBMSDMRawUint64 get()
          Get the raw unsigned 64 bit integer field as an int
 int parse(byte[] buf, int offset)
          Parse a byte buffer and store the value
 void set(java.math.BigInteger v)
          Set the raw unsigned 64 bit integer from a BigInteger object.
 void set(LBMSDMRawUint64 v)
          Set the raw unsigned 64 bit integer from an LBMSDMRawUint64 object.
 java.math.BigInteger toBigInteger()
          Get the unsigned 64 integer as a big integer
 java.lang.String toDbgString()
          Get a string useful for debugging
 java.lang.String toString()
          Get the string form of the unsigned 64 bit integer
 
Methods inherited from class com.latencybusters.lbm.sdm.LBMSDMField
add_element, append, format_name, format_type, get_name, getType, getType, getTypeString, internalString, isNull, length, name_len, remove, sameBaseType, sameType, set_name, set, setNull, type_len
 
Methods inherited from class com.latencybusters.lbm.sdm.LBMSDM
log, set_debug_level
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

internalValue

protected LBMSDMRawUint64 internalValue
The internal data storage for this field

Constructor Detail

LBMSDMFieldUint64

public LBMSDMFieldUint64(java.lang.String name)
                  throws LBMSDMException
Constructor for an empty unsigned 64 bit integer field.

Parameters:
name - The field name
Throws:
LBMSDMException

LBMSDMFieldUint64

public LBMSDMFieldUint64(java.lang.String name,
                         java.math.BigInteger v)
                  throws LBMSDMException
Constructor for a unsigned 64 bit integer field with a known BigInteger

Parameters:
name - The field name
v - The BigInteger to be used as the field value
Throws:
LBMSDMUnsignedException - when the passed in int is negative
LBMSDMOutOfRangeException - when the passed in int is greater than 18446744073709551615
LBMSDMException - when an unexpected error occurs within LBMSDM

LBMSDMFieldUint64

public LBMSDMFieldUint64(java.lang.String name,
                         LBMSDMRawUint64 v)
                  throws LBMSDMException
Constructor for a unsigned 64 bit integer field with a known LBMSDMRawUint64

Parameters:
name - The field name
v - The LBMSDMRawUint64 to be used as the field value
Throws:
LBMSDMException - when an unexpected error occurs within LBMSDM

LBMSDMFieldUint64

protected LBMSDMFieldUint64(short type,
                            java.lang.String name)
Constructor for array subclasses

Parameters:
type - The field type to be created
name - The name of the field to be created
Method Detail

get

public LBMSDMRawUint64 get()
Get the raw unsigned 64 bit integer field as an int

Returns:
An LBMSDMRawUint64 in the range 0-18446744073709551615

fixed_size

public static int fixed_size()
Get the length of base field

Returns:
The number of bytes a formatted unsigned 16 bit integer will use

get_len

public int get_len()
Get the length of formatted field

Overrides:
get_len in class LBMSDMField
Returns:
The number of bytes a formatted unsigned 16 bit integer will use

get_base_len

public final int get_base_len()
Get the length of formatted field This is used by the respective array class

Returns:
The number of bytes a formatted unsigned 16 bit integer will use

set

public void set(LBMSDMRawUint64 v)
         throws LBMSDMException
Set the raw unsigned 64 bit integer from an LBMSDMRawUint64 object.

Parameters:
v - The LBMSDMRawUint64 value to be set
Throws:
LBMSDMUnsignedException - when the passed in int is negative
LBMSDMOutOfRangeException - when the passed in int is greater than 18446744073709551615
LBMSDMException - when an unexpected error occurs within LBMSDM

set

public void set(java.math.BigInteger v)
         throws LBMSDMException
Set the raw unsigned 64 bit integer from a BigInteger object.

Parameters:
v - The BigInteger value to be set
Throws:
LBMSDMUnsignedException - when the passed in int is negative
LBMSDMOutOfRangeException - when the passed in int is greater than 18446744073709551615
LBMSDMException - when an unexpected error occurs within LBMSDM

toDbgString

public java.lang.String toDbgString()
Get a string useful for debugging

Overrides:
toDbgString in class LBMSDMField
Returns:
A string representation of this object

format

protected static int format(byte[] buf,
                            int offset,
                            LBMSDMRawUint64 v)
                     throws LBMSDMException
Format an unsigned 64 bit integer value into a byte buffer

Parameters:
buf - The buffer to contain the formatted value
offset - The offset in to the buffer to start formatting
v - The value of the int64 to be formatted
Returns:
The offset after formatting the raw int object
Throws:
LBMSDMException

format

public int format(byte[] buf,
                  int offset)
           throws LBMSDMException
Format the unsigned 64 bit integer value into a byte buffer

Overrides:
format in class LBMSDMField
Parameters:
buf - The buffer to contain the formatted value
offset - The offset in to the buffer to start formatting
Returns:
The offset after formatting the object
Throws:
LBMSDMException - when an unexpected error occurs within LBMSDM

toString

public java.lang.String toString()
Get the string form of the unsigned 64 bit integer

Overrides:
toString in class java.lang.Object
Returns:
A String in the form of the unsigned 64 bit integer

parse

public int parse(byte[] buf,
                 int offset)
          throws LBMSDMException
Parse a byte buffer and store the value

Overrides:
parse in class LBMSDMField
Parameters:
buf - The byte buffer to be parsed for the unsigned 64 bit integer
offset - The offset to begin parsing the buffer
Returns:
The next offset to be parsed
Throws:
LBMSDMCannotConvertException - if there is not enough data in the buffer
LBMSDMException - when an unexpected error occurs within LBMSDM

clone

public LBMSDMFieldUint64 clone()
                        throws java.lang.CloneNotSupportedException
Get a copy of this object

Overrides:
clone in class LBMSDMField
Returns:
A new object with a copy
Throws:
java.lang.CloneNotSupportedException

toBigInteger

public java.math.BigInteger toBigInteger()
                                  throws LBMSDMException
Get the unsigned 64 integer as a big integer

Returns:
The LBMSDMRawUint64 object
Throws:
LBMSDMException - if a big integer can not be returned


All of the documentation and software included in this and any other Informatica Inc "Ultra Messaging" Release is Copyright (C) 2004-2014, Informatica Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with 29West Inc. Copyright © 2004-2014, Informatica, Inc. All Rights Reserved.