com.sun.mdm.index.objects
Class ObjectField

java.lang.Object
  extended bycom.sun.mdm.index.objects.ObjectField
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class ObjectField
extends java.lang.Object
implements java.io.Externalizable

Object Field definition

See Also:
Serialized Form

Field Summary
static java.lang.String OBJECTMETA_BLOB_STRING
          blob type string
static int OBJECTMETA_BLOB_TYPE
          blob type
static java.lang.String OBJECTMETA_BOOL_STRING
          bool type string
static int OBJECTMETA_BOOL_TYPE
          bool type
static java.lang.String OBJECTMETA_BYTE_STRING
          byte type string
static int OBJECTMETA_BYTE_TYPE
          byte type
static java.lang.String OBJECTMETA_CHAR_STRING
          char type string
static int OBJECTMETA_CHAR_TYPE
          char type
static java.lang.String OBJECTMETA_DATE_STRING
          date type string
static int OBJECTMETA_DATE_TYPE
          date type
static java.lang.String OBJECTMETA_FLOAT_STRING
          float type string
static int OBJECTMETA_FLOAT_TYPE
          float type
static java.lang.String OBJECTMETA_INT_STRING
          int type string
static int OBJECTMETA_INT_TYPE
          int type
static java.lang.String OBJECTMETA_LINK_STRING
          link type string
static int OBJECTMETA_LINK_TYPE
          link type - for SBR
static java.lang.String OBJECTMETA_LONG_STRING
          long type string
static int OBJECTMETA_LONG_TYPE
          long type
static java.lang.String OBJECTMETA_STRING_STRING
          string type string
static int OBJECTMETA_STRING_TYPE
          string type
static java.lang.String OBJECTMETA_TIMESTAMP_STRING
          timestamp type string
static int OBJECTMETA_TIMESTAMP_TYPE
          timestamp type
static java.lang.String OBJECTMETA_UNDEFINED_STRING
          undefined type string
static int OBJECTMETA_UNDEFINED_TYPE
          undefined field type
(package private) static long serialVersionUID
           
static int version
           
 
Constructor Summary
ObjectField()
           
ObjectField(java.lang.String name, int type)
          Creates a new instance of ObjectFieldFlag
ObjectField(java.lang.String name, int type, java.lang.Object value)
          Creates new ObjectField
ObjectField(java.lang.String name, int type, java.lang.Object value, FieldFlag flag)
          Creates new ObjectField
ObjectField(java.lang.String name, int type, java.lang.Object value, int flag)
           
 
Method Summary
 ObjectField copy()
          self copy
static boolean equals(ObjectField field1, ObjectField field2)
          checks if two ObjectFields are the same
static java.lang.Class getClass(int type)
          gets Class
 FieldFlag getFieldFlag()
           
 boolean getFlag(int mask)
          Getter for Flag attribute of the ObjectField object
 java.lang.String getName()
          Getter for Name attribute of the ObjectField object
 int getType()
          Getter for Type attribute of the ObjectField object
static java.lang.String getTypeString(int type)
          gets string for int type
 java.lang.Object getValue()
          Getter for Value attribute of the ObjectField object
 boolean hasReadAccess()
          check to see if the field has read access
 boolean hasUpdateAccess()
          check to see if the field has update access
 boolean isChanged()
          check to see if the field is changed
 boolean isKeyType()
          checks if the field is of Key
 boolean isNull()
          checks if the field is holding NULL value
 boolean isNullable()
          checks if the field is nullable
 boolean isSearched()
          checks if the field is searched on
static boolean isValueValid(int type, java.lang.Object value)
          check if field value type matches
 boolean isVisible()
          checks if the field is visible
 void readExternal(java.io.ObjectInput in)
           
 void setChanged(boolean flag)
          sets if the field is changed
 void setFlag(int mask, boolean flag)
          sets the bit flag by bit mask
 void setKeyType(boolean flag)
          set if the field is of key
 void setNull(boolean flag)
          sets if the field is holding NULL value
 void setNullable(boolean flag)
          sets if the field is nullable
 void setReadAccess(boolean flag)
          set field's read access
 void setSearched(boolean flag)
          sets if the field is searched on
 void setUpdateAccess(boolean flag)
          set field's update access
 void setValue(java.lang.Object value)
          sets the value into the field
 void setVisible(boolean flag)
          sets if the field is visible
 java.lang.String toString()
          toString
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OBJECTMETA_BLOB_STRING

public static final java.lang.String OBJECTMETA_BLOB_STRING
blob type string

See Also:
Constant Field Values

OBJECTMETA_BLOB_TYPE

public static final int OBJECTMETA_BLOB_TYPE
blob type

See Also:
Constant Field Values

OBJECTMETA_BOOL_STRING

public static final java.lang.String OBJECTMETA_BOOL_STRING
bool type string

See Also:
Constant Field Values

OBJECTMETA_BOOL_TYPE

public static final int OBJECTMETA_BOOL_TYPE
bool type

See Also:
Constant Field Values

OBJECTMETA_BYTE_STRING

public static final java.lang.String OBJECTMETA_BYTE_STRING
byte type string

See Also:
Constant Field Values

OBJECTMETA_BYTE_TYPE

public static final int OBJECTMETA_BYTE_TYPE
byte type

See Also:
Constant Field Values

OBJECTMETA_CHAR_STRING

public static final java.lang.String OBJECTMETA_CHAR_STRING
char type string

See Also:
Constant Field Values

OBJECTMETA_CHAR_TYPE

public static final int OBJECTMETA_CHAR_TYPE
char type

See Also:
Constant Field Values

OBJECTMETA_DATE_STRING

public static final java.lang.String OBJECTMETA_DATE_STRING
date type string

See Also:
Constant Field Values

OBJECTMETA_DATE_TYPE

public static final int OBJECTMETA_DATE_TYPE
date type

See Also:
Constant Field Values

OBJECTMETA_FLOAT_STRING

public static final java.lang.String OBJECTMETA_FLOAT_STRING
float type string

See Also:
Constant Field Values

OBJECTMETA_FLOAT_TYPE

public static final int OBJECTMETA_FLOAT_TYPE
float type

See Also:
Constant Field Values

OBJECTMETA_INT_STRING

public static final java.lang.String OBJECTMETA_INT_STRING
int type string

See Also:
Constant Field Values

OBJECTMETA_INT_TYPE

public static final int OBJECTMETA_INT_TYPE
int type

See Also:
Constant Field Values

OBJECTMETA_LINK_STRING

public static final java.lang.String OBJECTMETA_LINK_STRING
link type string

See Also:
Constant Field Values

OBJECTMETA_LINK_TYPE

public static final int OBJECTMETA_LINK_TYPE
link type - for SBR

See Also:
Constant Field Values

OBJECTMETA_LONG_STRING

public static final java.lang.String OBJECTMETA_LONG_STRING
long type string

See Also:
Constant Field Values

OBJECTMETA_LONG_TYPE

public static final int OBJECTMETA_LONG_TYPE
long type

See Also:
Constant Field Values

OBJECTMETA_STRING_STRING

public static final java.lang.String OBJECTMETA_STRING_STRING
string type string

See Also:
Constant Field Values

OBJECTMETA_STRING_TYPE

public static final int OBJECTMETA_STRING_TYPE
string type

See Also:
Constant Field Values

OBJECTMETA_TIMESTAMP_STRING

public static final java.lang.String OBJECTMETA_TIMESTAMP_STRING
timestamp type string

See Also:
Constant Field Values

OBJECTMETA_TIMESTAMP_TYPE

public static final int OBJECTMETA_TIMESTAMP_TYPE
timestamp type

See Also:
Constant Field Values

OBJECTMETA_UNDEFINED_STRING

public static final java.lang.String OBJECTMETA_UNDEFINED_STRING
undefined type string

See Also:
Constant Field Values

OBJECTMETA_UNDEFINED_TYPE

public static final int OBJECTMETA_UNDEFINED_TYPE
undefined field type

See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

version

public static final int version
See Also:
Constant Field Values
Constructor Detail

ObjectField

public ObjectField()

ObjectField

public ObjectField(java.lang.String name,
                   int type)
Creates a new instance of ObjectFieldFlag

Parameters:
name - String field name
type - int field type

ObjectField

public ObjectField(java.lang.String name,
                   int type,
                   java.lang.Object value)
            throws ObjectException
Creates new ObjectField

Parameters:
name - field name
type - field type
value - field value
Throws:
ObjectException - ObjectException

ObjectField

public ObjectField(java.lang.String name,
                   int type,
                   java.lang.Object value,
                   FieldFlag flag)
            throws ObjectException
Creates new ObjectField

Parameters:
name - field name
type - field type
value - field value
flag - initial field flag
Throws:
ObjectException - ObjectException

ObjectField

public ObjectField(java.lang.String name,
                   int type,
                   java.lang.Object value,
                   int flag)
            throws ObjectException
Method Detail

copy

public ObjectField copy()
                 throws ObjectException
self copy

Returns:
ObjectField
Throws:
ObjectException - ObjectException

equals

public static boolean equals(ObjectField field1,
                             ObjectField field2)
                      throws ObjectException
checks if two ObjectFields are the same

Parameters:
field1 - ObjectField
field2 - ObjectField
Returns:
boolean
Throws:
ObjectException - ObjectException

getClass

public static java.lang.Class getClass(int type)
                                throws ObjectException
gets Class

Parameters:
type - field type
Returns:
Class
Throws:
ObjectException - ObjectException

getFieldFlag

public FieldFlag getFieldFlag()

getFlag

public boolean getFlag(int mask)
                throws ObjectException
Getter for Flag attribute of the ObjectField object

Parameters:
mask - int flag mask
Returns:
boolean
Throws:
ObjectException - ObjectException

getName

public java.lang.String getName()
Getter for Name attribute of the ObjectField object

Returns:
String

getType

public int getType()
Getter for Type attribute of the ObjectField object

Returns:
int type

getTypeString

public static java.lang.String getTypeString(int type)
gets string for int type

Parameters:
type - int value
Returns:
String

getValue

public java.lang.Object getValue()
Getter for Value attribute of the ObjectField object

Returns:
Object value

hasReadAccess

public boolean hasReadAccess()
check to see if the field has read access

Returns:
boolean

hasUpdateAccess

public boolean hasUpdateAccess()
check to see if the field has update access

Returns:
boolean

isChanged

public boolean isChanged()
check to see if the field is changed

Returns:
boolean

isKeyType

public boolean isKeyType()
checks if the field is of Key

Returns:
boolean

isNull

public boolean isNull()
checks if the field is holding NULL value

Returns:
boolean;

isNullable

public boolean isNullable()
checks if the field is nullable

Returns:
boolean;

isSearched

public boolean isSearched()
checks if the field is searched on

Returns:
boolean

isValueValid

public static boolean isValueValid(int type,
                                   java.lang.Object value)
check if field value type matches

Parameters:
type - field type
value - field value
Returns:
boolean

isVisible

public boolean isVisible()
checks if the field is visible

Returns:
boolean

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

setChanged

public void setChanged(boolean flag)
sets if the field is changed

Parameters:
flag - changed

setFlag

public void setFlag(int mask,
                    boolean flag)
             throws ObjectException
sets the bit flag by bit mask

Parameters:
mask - flag
flag - flag
Throws:
ObjectException - ObjectException

setKeyType

public void setKeyType(boolean flag)
set if the field is of key

Parameters:
flag - key type

setNull

public void setNull(boolean flag)
sets if the field is holding NULL value

Parameters:
flag - null

setNullable

public void setNullable(boolean flag)
sets if the field is nullable

Parameters:
flag - nullable

setReadAccess

public void setReadAccess(boolean flag)
set field's read access

Parameters:
flag - read access

setSearched

public void setSearched(boolean flag)
sets if the field is searched on

Parameters:
flag - searched

setUpdateAccess

public void setUpdateAccess(boolean flag)
set field's update access

Parameters:
flag - update access

setValue

public void setValue(java.lang.Object value)
              throws ObjectException
sets the value into the field

Parameters:
value - value
Throws:
ObjectException - ObjectException

setVisible

public void setVisible(boolean flag)
sets if the field is visible

Parameters:
flag - visible

toString

public java.lang.String toString()
toString

Returns:
String

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException


Sun Microsystems, Inc.